- Issue created by @suryabhi
- Merge request !11195Issue #3506418: The node entity cannot have a URI as it does not have an ID → (Closed) created by suryabhi
- 🇺🇸United States smustgrave
Issue summary is incomplete so didn't give a deep review
But also don't agree with the fix of changing the exception to a log.
- 🇨🇭Switzerland berdir Switzerland
This doesn't happen by default, it needs something that calls toUrl() on that node in preprocess, a template, formatter or so.
- 🇳🇿New Zealand quietone
Also, changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies → .
- 🇨🇴Colombia tesla863 Chia
Hi
Steps to reproduce it:
- Go to created a node, for example a basic page
- Set the title and click on the "Preview" button:
- You could see the error "The website encountered an unexpected error. Try again later." and the exception in the drupal log: "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)."