- πͺπΈSpain missvengerberg
We were having this issue with Drupal 9.4.8 and PHP 8.1. Applied patch #3 and it's working fine now. Thanks so much for the patch.
Background:
The website we are building will support two different languages, and all the content is being translated so there are versions for both.
However, we have not turned on interface translation, since we want the drupal interface to remain in English, as that is what the site editors are most comfortable using.
The Problem:
When switching to the alternate language of a page, the menu blocks items are remaining in English, and don't change unless you clear the render cache.
The Cause:
Despite the menu items being content that is translated using content translation, the rendered menu blocks are being stored in the cache using the interface language instead of the content language, such as:
cid: entity_view:block:site_name_main_menu:[languages:language_interface]=en:[route.menu_active_trails:main]=menu_trail.main|menu_link_content:8c16c3a4-f165-4ea4-b2b4-07a1cee8e592|:[theme]=site_name:[user.perm-AjQCijrXHvxvgiuYXJCT4T4GgXa1tNWosi6GEgeN5Y
The Solution?
Could we switch menu blocks over to using the content language instead of the interface language? Or should we store both, so a rendered copy of the block is stored for each interface/content language combination?
Needs work
10.1 β¨
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
We were having this issue with Drupal 9.4.8 and PHP 8.1. Applied patch #3 and it's working fine now. Thanks so much for the patch.