Problem/Motivation

When attempting to save a node with the "Create new menu link" box checked, get the following error message

Drupal\Core\Entity\EntityStorageException: The entity URI 'entity:node/' is invalid. You must specify the entity id in the URL. e.g., entity:node/1 for loading the canonical path to node entity with id 1. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 861 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Steps to reproduce

Save a node with the "create new menu link" box checked.

Proposed resolution

Look into a fix, maybe something in here is related Add support for Quick Node Clone module
.

API changes

Data model changes

CommentFileSizeAuthor
#5 Unique_alias1.png93.88 KBtushar1
#5 Unique_alias.png106.07 KBtushar1
#3 3608401.patch858 bytesshank115
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

mdranove created an issue. See original summary.

mdranove’s picture

Issue summary: View changes
shank115’s picture

StatusFileSize
new858 bytes

Try this patch.

shank115’s picture

Status: Active » Needs review
tushar1’s picture

StatusFileSize
new106.07 KB
new93.88 KB

Tested on Drupal 11.4 with Unique Alias Checker 1.5.0. I enabled the module, configured menu settings, and tested both creating and editing nodes with "Provide a menu link" enabled. I was unable to reproduce the reported EntityStorageException. Additional reproduction steps or environmental details may be needed to verify the fix.

mdranove’s picture

Status: Needs review » Needs work

Repro steps

  1. Have a pathauto pattern enabled for a content type with the [node:menu-link:parent] token as part of the pattern.
  2. Attempt to create a node of a content type that the pattern applies to
  3. In the node form, check the "Provide a menu link" box. Attempt to save.
  4. Error message from issue description appears.