- πΊπ¦Ukraine nginex
Here is improved d10 version of the patch based on #66 patch.
Tried to create an interdiff but it failed. Also if we use MR approach we need to switch the target branch for the fork and rebase it.
- Status changed to Needs review
over 1 year ago 10:44am 26 July 2023 - last update
over 1 year ago Custom Commands Failed - Status changed to Needs work
over 1 year ago 2:08pm 7 August 2023 - πΊπΈUnited States smustgrave
For the CC failure.
But can the IS be completed also, with the proposed solution
And if this requires π Allow synced Layout override Translations: translating labels and inline blocks Needs work then this should be postponed till that lands.
- πΊπ¦Ukraine HitchShock Ukraine
The last patch isn't compatible with the event dispatcher. The first argument must be an event object.
Updated a patch a bit. - πΊπ¦Ukraine HitchShock Ukraine
Also, the code
if ($section_storage->getTranslatedComponentConfiguration($component->getUuid())) {
in LayoutEntityDisplayMapper::hasTranslatable() breaks the 'Translate layout' feature on the content view mode.How to reproduce it:
- enable config_translation module
- enable layout builder for content type
- configure Layout Builder for some view mode
- try to make a translation of the layoutI see to issues here:
- The ConfigTranslationOverviewAccess::doCheckAccess() uses hasTranslatable() function and in this case $section_storage doesn't have language context
- even I'll add the language context the result still will be wrong, cuz getTranslatedComponentConfiguration() expects that config already contains the translation, it means that it doesn't work for 'add' translation action - last update
12 months ago Custom Commands Failed - π¨π¦Canada circuscowboy
I am trying to solve the layout builder translation issues for the first time and I am running into difficulties.
If I use patch 75 on its own I get the following error message:
Error: Interface "Drupal\layout_builder\TranslatableSectionStorageInterface" not found in /var/www/pwnhc/web/core/modules/layout_builder/src/DefaultsSectionStorageInterface.php on line 12 #0 /var/www/pwnhc/vendor/composer/ClassLoader.php(571): include()
If I apply the patch in this issue, https://www.drupal.org/project/drupal/issues/2946333 π Allow synced Layout override Translations: translating labels and inline blocks Needs work based off this merge request https://git.drupalcode.org/project/drupal/-/merge_requests/5956#note_259636 then that error goes away and I get a button called "Translate Layout".
The old merge request listed above (https://git.drupalcode.org/project/drupal/-/merge_requests/1504#note_194458) no longer applies to 10.2 - If this new patch would have fully worked I would replace it in the description.
I am having 2 issues with the 2 patches. Firstly I am using a path based URL and the path is duplicated in the Translate Layout button link so it goes to a page not found.
Details
- The manage display page is http://web2.local/pwnhc/en/admin/structure/types/manage/events/display
- The translate button points to http://web2.local/pwnhc/pwnhc/en/admin/structure/types/manage/events/dis...
- It should point to http://web2.local/pwnhc/en/admin/structure/types/manage/events/display/t...
Secondly with the corrected link I gotten 2 different outputs
- An access denied error on the page. This was on an existing content type
- On a new content type I go this: Error: Call to a member function get() on null in Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage->getTranslatedComponentConfiguration() (line 481 of /var/www/pwnhc/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php).
If anyone can guide me to get better results I would appreciate it.
As documented in [ https://www.drupal.org/project/drupal/issues/3420019] β ( https://www.drupal.org/project/drupal/issues/3420019 π TranslatableSectionStorageInterface not found Closed: won't fix ) patch #72 correctly applies to a Drupal 10.2.2 instance, but it breaks the site.
- π¨π¦Canada liquidcms
Sorry, lost in where this is at. I swear (back in D9 at some point) i had tabs when in LB and one of those was to "Translate layout"; but now (D10.2.2.) NO tabs.
I have a vanilla D10.2.2 site with these patches:
- https://www.drupal.org/files/issues/2024-06-28/3044993-79.patch β
- https://www.drupal.org/files/issues/2024-03-15/2946333-327_Revised_patch... βAdditionally:
- Article type set to be translatable
- Basic block set to be translatable
- Article default view mode set to use LB (for all nodes)
- Add inline basic block using LBThere is no apparent UI to access translation of this. I have tried a couple urls as mentioned above:
en/admin/structure/types/manage/article/display/translate - access denied
en/admin/structure/types/manage/article/display/default/translate - throws:Error: Call to undefined method Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage::getTranslatedComponentConfiguration() in Drupal\layout_builder\ConfigTranslation\LayoutEntityDisplayMapper->hasTranslatable() (line 55 of E:\www\SSC\d10.0\web\core\modules\layout_builder\src\ConfigTranslation\LayoutEntityDisplayMapper.php).
Any hints?
- π¨π¦Canada liquidcms
switched to patch from #75 and now i see a Translate Layout button (at least now i know what the expected ui is); but it throws this error:
Error: Call to a member function get() on null in Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage->getTranslatedComponentConfiguration() (line 481 of E:\www\SSC\d10.0\web\core\modules\layout_builder\src\Plugin\SectionStorage\DefaultsSectionStorage.php).
- π¨π¦Canada liquidcms
and now, magically, button gives Access Denied at: en/admin/structure/types/manage/article/display/translate