- 🇷🇴Romania amateescu
Just tested this on 10.3.x and it's not reproducible anymore. I'm guessing that the problem was caused by Layout Builder, and it was fixed in the meantime.
I'm getting uncaught RuntimeException when trying to navigate to the edit manage content type display page when I'm in staging workspace. It seems to happen only with recipes content type.
Steps to reproduce:
This should result in the following exception:
RuntimeException: This entity can only be saved in the default workspace. in Drupal\workspaces\EntityOperations->entityPresave() (line 124 of core/modules/workspaces/src/EntityOperations.php).
workspaces_entity_presave(Object, 'entity_view_display')
call_user_func_array('workspaces_entity_presave', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave', Array) (Line: 349)
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('presave', Object) (Line: 500)
This has some usability considerations because of the default and recommended setting for production environments is to have error messages not visible, meaning that some users might only see a generic error message: The website encountered an unexpected error. Please try again later.
.
It seems like we need error handler that displays message to all users regardless of the error messages to display setting.
OR, as suggested in #3
Address the underlying problem: why does navigating to a page (/admin/structure/types/manage/recipe/display) executes the presave hook for the entity_view_display entity type?
Decide on a solution
Patch
Review
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Just tested this on 10.3.x and it's not reproducible anymore. I'm guessing that the problem was caused by Layout Builder, and it was fixed in the meantime.