Creating a new issue clone as the original issue got closed as fixed but there are more people with the same issue still.
#3110455: Metatags depending on URL cause errors for unsaved entities after updating to Drupal 8.8.0
Original IS:
Hi,
I recently updated to Drupal Core 8.8.0 and then 8.8.1 and I am now getting the following error on various pages like `/node/add/page`: 1 error has been found: Title
In the Drupal Log report I see:
Location: /node/add/page?_wrapper_format=drupal_ajax&ajax_form=1
Referrer: /node/add/page
Message: 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 192 of /app/web/core/lib/Drupal/Core/Entity/EntityBase.php).
Severity: Error
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | yoast_seo-(2.0.0-alpha10)-3418620-5.patch | 1.14 KB | drumanuel |
| #2 | yoast_seo-3110455-22.patch | 1.14 KB | bramdriesen |
| #2 | yoast_seo-3110455-21.patch | 917 bytes | bramdriesen |
Comments
Comment #2
bramdriesenUploading patches.
#21 by: bojan_dev
#22 by: StanleyFernandes
We are using #22 for quite some time in prod now.
Comment #3
bramdriesenComment #4
drumanuel commentedGot this issue on Drupal 10.3. Patch does not apply.
Comment #5
drumanuel commentedCreated a patch for 2.0.0-alpha10
Comment #6
carma03 commentedConfirming patch yoast_seo-3110455-22.patch works for me on D10.2.6, PHP 8.1.29, Apache 2.4.41 and MySQL5.7.
Thanks @BramDriesen and @Drumanuel
Comment #7
bramdriesenLet's go for RTBC then!
Comment #9
kingdutchThanks for the contribution! I've gone with the smaller fix:
The other patch also changed the logic of the title by moving
$entity->isNew()outside of the loop altogether, which seemed to do something differently than what was needed for the bug report.If this issue persists, please ping me on Slack and we can replace it by one of the other patches.