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.

Command icon 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:

Comments

arakwar created an issue. See original summary.

arakwar’s picture

Issue summary: View changes
brightbold’s picture

I 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.

jigarius’s picture

This morning I got the same issue.

jigarius’s picture

Status: Active » Needs review

Since 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.

fago’s picture

Status: Needs review » Reviewed & tested by the community

fix is simple and solves the problem by better defensive coding!

joseph.olstad’s picture

Good!

  • heddn committed 42770b5e on 2.0.x
    Issue #3157548 by arakwar, heddn: Translation page not accessible when a...
heddn’s picture

Version: 8.x-1.0-alpha1 » 2.0.x-dev
Status: Reviewed & tested by the community » Fixed

Thanks for the fixes here.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.