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.
Problem/Motivation
Whenever I try and build the sitemap for the first time, I always hit this error:
InvalidArgumentException: Field changed is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField()
because of this building the site map always fails.
Proposed resolution
Figure out why the module is looking for a changed
field on an entity that doesn't have that field.
Remaining tasks
- Write Patch
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2747373.4.patch | 815 bytes | alexpott |
Comments
Comment #2
davidwbarratt CreditAttribution: davidwbarratt at Golf Channel commentedNevermind, looks like I had an entity that was using
Drupal\Core\Entity\EntityChangedTrait
without actually having thechanged
field.Comment #3
Karthikeyan Kathiresan CreditAttribution: Karthikeyan Kathiresan commentedHi davidwbarratt,
I'm also facing the same issue. Can you please help me to solve this issue ?
Thanks
Comment #4
alexpottThe way the code is looking for the method is a bit old skool - why not just use the interface. Maybe the interface did not exist when this code was written though... it was added in #2044583: Add EntityChangedInterface to allow entities with "changed" field to be properly cached. This will be more reliable.
Comment #6
juampynr CreditAttribution: juampynr at Lullabot commentedCommitted. Thanks!