SetInlineBlockDependency override might no longer be needed.

Created on 25 October 2019, almost 5 years ago
Updated 30 July 2024, 2 months ago

Not sure if this was changed recently in core, but currently on Drupal 8.7.8 this throws an error when trying to create translated pages.

Notice: Undefined property: Drupal\layout_builder_at\EventSubscriber\SetInlineBlockDependencyWithContextTranslation::$entityTypeManager in Drupal\layout_builder_at\EventSubscriber\SetInlineBlockDependencyWithContextTranslation->getInlineBlockDependency() (line 24 of /var/www/html/docroot/modules/contrib/layout_builder_at/src/EventSubscriber/SetInlineBlockDependencyWithContextTranslation.php)

Error: Call to a member function getStorage() on null in Drupal\layout_builder_at\EventSubscriber\SetInlineBlockDependencyWithContextTranslation->getInlineBlockDependency() (line 24 of /var/www/html/docroot/modules/contrib/layout_builder_at/src/EventSubscriber/SetInlineBlockDependencyWithContextTranslation.php)

Seems that at some point the entityTypeManager property was removed from the SetInlineBlockDependency class. It also seems that the SetInlineBlockDependency that comes with core now works correctly with translations? It seems the EntityRepository class now has the "getActive" method that takes into account the current language as well as revisions.

Removing this service entirely from the module seems to alleviate the issues and creating translations seems to work properly.

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Justin Langley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024