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.
In case the Drupal autoload registry gets corrupted, the field_collection module complicates rebuilding the registry because:
* it defines the FieldCollectionItemEntity class in its module file
* this class extends the Entity class
* the Entity class can not be found yet when the module file gets included while rebuilding the registry
To solve this, the FieldCollectionItemEntity should be moved to its own include file, this file needs to be mentioned in files[] in the module's .info file and then it gets dynamically loaded by Drupals autoloader.
Comment | File | Size | Author |
---|---|---|---|
#2 | field_collection-move-class-definition-1662710-2.patch | 35.38 KB | kristofferwiklund |
#1 | field_collection-move-class-definition-1662710.patch | 33.54 KB | Saaj |
Comments
Comment #1
Saaj CreditAttribution: Saaj commentedHere is my first attempt at a patch!
I created the patch following what Cyberwolf has stated.
Comment #2
kristofferwiklund CreditAttribution: kristofferwiklund commentedRe-rolled to the latest code-base. Otherwise it works great.
Comment #4
jmuzz CreditAttribution: jmuzz commentedThanks!
I wasn't sure if the patch would have the most recent edits so I cut and pasted the class myself. Let me know if I'd have missed something by doing this.