Problem/Motivation
After upgrading from 9.4.8 to 9.5.9, users could no longer create /save a new node of a specific content type. We get the WSOD and two exception messages:
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 /mnt/drupal_sync/www_drupal95/core/lib/Drupal/Core/Entity/EntityBase.php).
Drupal\Core\Entity\EntityStorageException: The "node" entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of /mnt/drupal_sync/www_drupal95/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
The content type has many fields, many of which are entity reference nodes. The error message does not provide much to go on when troubleshooting.
Comments
Comment #2
cilefen commentedHave all schema updates been executed on the affected site?
Are all contributed modules at the latest versions?
Can you generate the stack trace for the exception?
Comment #4
pameeela commentedNo additional info provided so I'm closing this, if anyone is able to reproduce it please update the issue summary with steps.
Comment #5
rosscullen commentedHave similar issue:
Was using layout builder for one of my content types:
admin/structure/types/manage/example/display/default/layout
I was manually adding new fields to include and now it won't let me back in.
Getting error in my log messages:
"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 /home/example.com/public_html/example.com/core/lib/Drupal/Core/Entity/EntityBase.php).
Using Drupal 11.0.2