- 🇨🇴Colombia wilsotoa Cucuta, Norte de Santander
Hi, I have been testing with two patches and it seems that the error is because when I update the block and save the translation it creates a new revision in the instantiated block but does not update the revision in the source language, but even applying these patches when I go to the source layout it reports changes without saving then I modify the block and save the changes but it still has the revision id out of date.
https://www.drupal.org/files/issues/2021-07-06/layout_builder_st-3222423... →
https://www.drupal.org/files/issues/2023-04-25/layout_builder_st-3108061... → @wilsotoa
You don't have to enable translations for the custom block type (In your case "a column").
You only have to enable it in the custom blocks type you want to add in the entity reference field. With that once you add an entity reference block in your custom block, it will appear in the rest of the translations. To get the translation of that block you have to go to /admin/content/block, and there in your block, generate the translation in the language you want to appear already translated in your custom block.- 🇨🇴Colombia wilsotoa Cucuta, Norte de Santander
Hello @fruizalejos, thank you for your response.
In my case this does not solve the problem, since the content editor user does not have access to /admin/content/block and they handle the block translations from the translated layout. - First commit to issue fork.
- Merge request !15Issue #3450720: Approach using presave hook and shutdown function to save... → (Open) created by s_leu
Created an MR that addressed this issue, also updated IS, steps to reproduce and title.
- heddn Nicaragua
This leads to an infinite loop on any content created and translated with this patch installed. Not on the first addition of the translation, but rather on subsequent saves. This infinite loop happens on any translation, including the original. Something in the setup of the content during the cloning is causing this. Because if I comment out the presave and shutdown function, then try to resave, it still infinite loops.
- heddn Nicaragua
That last fix solves the issue with null blocks. What it doesn't fix is that the handler is a presave. So on initial block placement, there aren't block IDs to clone into the additional languages. This needs to move into a post save hook handler so the blocks can IDs that get cloned into additional languages.
- heddn Nicaragua
Reworked into a post save (hook_update) handler. That seemed to fix things.
- 🇨🇦Canada joseph.olstad
This seems much more complicated than the other available solution
- 🇨🇦Canada joseph.olstad
Seems that there's several issues here, not sure which one is a duplicate.
🐛 Nontranslatable custom block fields are not synchronized between translations Needs review