Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you preview an entity who is not saved and a field with smartrim is filled, it returns:
Drupal\Core\Entity\EntityMalformedException: The "node" entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\Entity->toUrl() (linea 179 di /var/www/teatro.it/core/lib/Drupal/Core/Entity/Entity.php).
Comment | File | Size | Author |
---|---|---|---|
#2 | smart_trim-2883027-2.patch | 1.8 KB | aniaorome |
Comments
Comment #2
aniaorome CreditAttribution: aniaorome at PitechPlus commentedThat comes from the fact that Smart trim tries to generate the link to the entity, but that doesn't exist yet.
Quickest solution is to check if the entity is new or not, and then generate the url only if the latter is true.
Comment #3
Chris Matthews CreditAttribution: Chris Matthews commentedComment #4
markie CreditAttribution: markie at Mediacurrent commentedI think this issue has been addressed in another ticket, the check for an id is done. Can you confirm and close or re-roll against the current build
Comment #5
AnybodyNo reply since 3 years.