Hi,
I sadly can't provide instructions to reproduce the bug, but I got this error :
Call to a member function isTranslatable() on null in Drupal\layout_builder_st\Element\LayoutBuilder->createContextualLinkElement() (line 159 of modules/contrib/layout_builder_st/src/Element/LayoutBuilder.php).
I saw that this module assume that Drupal found a block, but I got in a situation where our block doesn't exists (may be linked to another issue).
But when this happens, the layout builder pages for the translation breaks.
Adding some defense around that would at least help to not get lock in a scenario where we have to delete a whole page for one broken block.
EDIT : We found out that manually accessing the "Discard changes" page allowed us to remove the problematic block from our page. We suspect that this block was removed from the parent page while the translated page was still being worked on.
Issue fork layout_builder_st-3157548
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3157548-translation-page-not
changes, plain diff MR !1
Comments
Comment #2
arakwarComment #3
brightboldI ran in to the same problem. I had tried everything — reverting revisions, deleting and re-adding the translation of the page, reverting the layout overrides — and nothing resolved the problem. So thank you @arakwar for saving the day with your workaround. I visited /es/node/1/layout/discard-changes and clicked the "Confirm" button; this removed the deleted block and made the layout accessible again.
Comment #4
jigariusThis morning I got the same issue.
Comment #6
jigariusSince I am in a hurry, I've created a PR that helps get rid of the error. I'm not sure if that could be a long-term solution though, but it accounts for missing blocks.
Comment #7
fagofix is simple and solves the problem by better defensive coding!
Comment #8
joseph.olstadGood!
Comment #10
heddnThanks for the fixes here.