- Issue created by @admirlju
- @admirlju opened merge request.
- Status changed to Needs work
over 1 year ago 2:08pm 7 September 2023 The problem was related to the demo block view, when an entity type of node was removed from a recently read there would be a non-existent relationship. For now, if an entity type is disabled, the code also disables the view.
Will have to add a warning that the view got disabled and check if someone tries to enable it when the entity type is disabled for recently read.
When we disable the recently read entity type, the relationship doesn't exist anymore, so before disabling the view I also remove that specific relationship. If there are existing blocks for the view, those are now also removed. When views get disabled or blocks removed I now display a warning.
- Status changed to Needs review
over 1 year ago 8:15am 8 September 2023 Rebased the repository, to make it easier for maintainers. Switching status to Needs Review.
- First commit to issue fork.
- 🇸🇮Slovenia deaom
Removed the part of code, that removes the relationship from view, as that means that users can't place a block anymore even if they set the content types again, if they do not add a relationship back again or disable and then enable the module again. The block gets deleted/removed from being placed so it's no longer present on the page and therefore there is no error when revisiting pages that were added to the block basically. If users decide to again place the block, they can do so, by first setting entity type back in the configuration. If they do not, the same problem appears. Not sure if this should be handled here or not, to not allow placing a block if there were entities already added. Leaving it open for discussion.
I still believe we should at least disable the view, so the admin doesn't even have an option to re-add the block. And if need be the admins can enable the previously disabled views.
Also personally the default view you get at install feels like a demo view, that admins can use as reference, how to make for any other entity.
- Status changed to Needs work
over 1 year ago 12:47pm 4 October 2023 Also looking at the changes now it will delete any block, that is made with the View module, that has any relationship (not just recently_read relationships).
- Status changed to Needs review
over 1 year ago 7:14am 5 October 2023 I'm experiencing exactly the same problem with Drupal 10.3.0. In my case, it happened when I uninstalled "Forum" module. I tried clearing all caches, I tried clearing views cache, nothing helped. If I reinstall "Forum" module, the problem goes away. Uninstall again, it's back.
Is there a way to manually change the site's state so that this problem goes away? I haven't tried uninstalling "Views" module as it would be too drastic and would require a lot of recovery work, but I'm hoping there's something else that can be done?
I checked all the blocks on the site and none of them has any references to forum or forum content. Very weird.