Problem/Motivation

When I add addtoany to a display in layout builder. Once I save then go back to edit the display in layout builder.
It causes a white screen and the following error. `The "node" entity cannot have a URI as it does not have an ID`.

Steps to reproduce

Step 1: Add addtoany to a display in layout builder.
Step 2: Save the display and navigate out of layout builder.
Step 3: Go back to your display and click manage layout.

Proposed resolution

Add a check when inside of layout builder.

Remaining tasks

Add a null check when inside of layout builder so you can still manage your layout in layout builder.

Comments

sstapleton created an issue. See original summary.

sstapleton’s picture

Status: Needs work » Needs review
sstapleton’s picture

sstapleton’s picture

Please see patch included.

  • micropat committed 86f9fcab on 8.x-1.x authored by sstapleton
    Issue #3372598 by sstapleton: The "node" entity cannot have a URI as it...

  • micropat committed f040ec9b on 2.0.x authored by sstapleton
    Issue #3372598 by sstapleton: The "node" entity cannot have a URI as it...
micropat’s picture

Status: Needs review » Fixed

Fixed in the latest releases. Thanks @sstapleton!

Status: Fixed » Closed (fixed)

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

leducdubleuet’s picture

Version: 2.0.4 » 2.0.5
StatusFileSize
new566 bytes

I believe this fix was not implemented in release 2.0.5 and the exact same bug is back unfortunately when using the layout builder.

Here is a patch to bring back the fix adapted for current release.

Should we open a new issue or this one can be re-opened to be fixed again?

Thank you!

leducdubleuet’s picture

I understand what happened, the fix was removed by the patch committed on this other issue : https://www.drupal.org/project/addtoany/issues/3138220

oana.hulpoi’s picture

Hi,
The issue is still present in 2.0.7 and I confirm that the patch by @leducdubleuet fixes the issue in layout builder.
Thank you!