Preview new node with Link to content

Created on 20 November 2023, about 1 year ago
Updated 26 December 2023, 12 months ago

Problem/Motivation

Previewing a node that does not exist yet causes an error "The "node" entity cannot have a URI as it does not have an ID".

Steps to reproduce

  1. Enable DS on a view mode for a content type.
  2. Go to the "Custom wrappers" settings set the "Add link" field to the "Link to content" option and save.
  3. Create a new node set all required fields then hit "Preview" button.
  4. Inside the preview select the view mode you created and you will get the error.

Proposed resolution

Inside "ds_preprocess_ds_layout" line 548 we need to add and if condition to check if the node has ID.

🐛 Bug report
Status

Fixed

Version

3.15

Component

Code

Created by

🇯🇴Jordan yasmeensalah

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

Comments & Activities

Production build 0.71.5 2024