Exception during node preview

Created on 16 February 2023, over 1 year ago
Updated 19 February 2023, over 1 year ago

Problem/Motivation

When trying to preview un-saved node with the social share buttons website crashes with the Drupal\Core\Entity\EntityMalformedException: The "node" entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\EntityBase->toUrl() (line 161 of /app/web/core/lib/Drupal/Core/Entity/EntityBase.php). message in the watchdog.

Steps to reproduce

  1. Enable this module
  2. Place social share buttons on the default display
  3. go to the node create page and click Preview button

Proposed resolution

Don't crash and use website URL to render social share buttons and match expected layout

Remaining tasks

  • Patch - done
  • Review
  • Commit

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡³πŸ‡ΏNew Zealand RoSk0 Wellington

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024