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.
On migrating a D6 test site, content generated by devel, I get Fatal errors from d6_comment. Previously, this site was migrating, except for files, successfully.
Importing d6_comment
PHP Fatal error: Call to a member function url() on a non-object in /opt/sites/md82/core/modules/rdf/rdf.module on line 237
PHP Stack trace:
PHP 1. {main}() /usr/local/share/drush/drush.php:0
PHP 2. drush_main() /usr/local/share/drush/drush.php:11
PHP 3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /usr/local/share/drush/drush.php:70
PHP 4. drush_dispatch() /usr/local/share/drush/lib/Drush/Boot/BaseBoot.php:62
PHP 5. call_user_func_array:{/usr/local/share/drush/includes/command.inc:178}() /usr/local/share/drush/includes/command.inc:178
PHP 6. drush_command() /usr/local/share/drush/includes/command.inc:178
PHP 7. _drush_invoke_hooks() /usr/local/share/drush/includes/command.inc:210
PHP 8. call_user_func_array:{/usr/local/share/drush/includes/command.inc:359}() /usr/local/share/drush/includes/command.inc:359
PHP 9. drush_migrate_upgrade() /usr/local/share/drush/includes/command.inc:359
PHP 10. Drupal\migrate_upgrade\MigrateUpgradeDrushRunner->import() /opt/sites/md82/modules/migrate_upgrade/migrate_upgrade.drush.inc:42
PHP 11. drush_op() /opt/sites/md82/modules/migrate_upgrade/src/MigrateUpgradeDrushRunner.php:50
PHP 12. drush_call_user_func_array() /usr/local/share/drush/includes/drush.inc:705
PHP 13. call_user_func_array:{/usr/local/share/drush/includes/drush.inc:714}() /usr/local/share/drush/includes/drush.inc:714
PHP 14. Drupal\migrate\MigrateExecutable->import() /usr/local/share/drush/includes/drush.inc:714
PHP 15. Drupal\comment\Plugin\migrate\destination\EntityComment->import() /opt/sites/md82/core/modules/migrate/src/MigrateExecutable.php:266
PHP 16. Drupal\migrate\Plugin\migrate\destination\EntityContentBase->import() /opt/sites/md82/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php:81
PHP 17. Drupal\migrate\Plugin\migrate\destination\Entity->getEntity() /opt/sites/md82/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php:76
PHP 18. Drupal\Core\Entity\EntityStorageBase->load() /opt/sites/md82/core/modules/migrate/src/Plugin/migrate/destination/Entity.php:112
PHP 19. Drupal\Core\Entity\EntityStorageBase->loadMultiple() /opt/sites/md82/core/lib/Drupal/Core/Entity/EntityStorageBase.php:217
PHP 20. Drupal\Core\Entity\Sql\SqlContentEntityStorage->doLoadMultiple() /opt/sites/md82/core/lib/Drupal/Core/Entity/EntityStorageBase.php:247
PHP 21. Drupal\Core\Entity\ContentEntityStorageBase->invokeStorageLoadHook() /opt/sites/md82/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:401
PHP 22. rdf_comment_storage_load() /opt/sites/md82/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:360
Fatal error: Call to a member function url() on a non-object in /opt/sites/md82/core/modules/rdf/rdf.module on line 237
Comment | File | Size | Author |
---|---|---|---|
#16 | interdiff-2558923-4-15.txt | 1.82 KB | phenaproxima |
#16 | 2558923-15.patch | 4.61 KB | phenaproxima |
#4 | interdiff-2558923-4.txt | 3.48 KB | phenaproxima |
#4 | 2558923-4.patch | 4.31 KB | phenaproxima |
#4 | 2558923-4-FAIL.patch | 761 bytes | phenaproxima |
Comments
Comment #2
mikeryanComment #3
phenaproximaAfter a few solid hours of debugging, I have figured out the incredibly sneaky and insidious cause of this fatal. Give me a freaking medal! :)
While importing a comment:
Comment #4
phenaproximaWith tests, and my compliments!
There's a bit of patch noise in the passing patch because I removed a few deprecated function calls from MigrateCommentTest.
Comment #5
neclimdulvancode strikes again!
Comment #7
phenaproximaEscalating. This will cause failures on any site with a substantial number of comments if the D8 RDF module is enabled -- which, in the default install profile, it is. So this is likely to be encountered by a lot of people.
Comment #8
phenaproximaWhoops. This affects D6 and D7.
Comment #10
benjy CreditAttribution: benjy at PreviousNext commentedI think this is a duplicate of #2340401: Fill commented entity during stub comment saving
Comment #11
phenaproximaThis patch doesn't change the stubbing at all -- it works around the problem by introducing better ordering into the comment sources. I think we should commit this now and continue work on that patch, since:
The other patch is good and work should continue on it; when it lands it will reinforce this one.
Comment #12
benjy CreditAttribution: benjy at PreviousNext commentedThis patch is more of a workaround where as the other patch fixes the root cause of the problem. Some people might import comments from a CSV where they can't change the order in the source for example.
And I think the comments in this patch that mention ordering to avoid fatals are a bit weird because i'd read those and think, hmm, that's the wrong fix.
However, if this issue helps the upgrade path fine, but I think the comments in the patch should be re-done to reference the issue with the "correct" fix and mention that the order is a temporary work around.
Comment #13
phenaproximaThat seems like an exceedingly fair compromise to me. If you're OK with the workaround as it is, I'll reroll the patch tomorrow, fix the comments, and get it committed.
Comment #14
benjy CreditAttribution: benjy at PreviousNext commentedYeah that's good for me.
Comment #15
neclimdulwhy not both? :)
Comment #16
phenaproximaComments fixed.
Comment #17
quietone CreditAttribution: quietone commentedApplied this patch but I'm still getting a Fatal.
Comment #18
phenaproxima@mikeryan says he's close to getting #2340401: Fill commented entity during stub comment saving completed, so I think it makes sense to close this and pursue that patch full-throttle.
Comment #19
deepeshvishwa CreditAttribution: deepeshvishwa commentedHello,
I got this error in Drupal 8.2.5 and I have fixed it. :)
Please see the details as below:
Issue: If comment created date is zero then fatal error come.
Solution: I have added any date in "created" column in "comment_field_data" in database using query and clear the cache. like that:
SELECT * FROM comment_field_data WHERE created = 0
UPDATE comment_field_data SET created = 1222056000, changed = 1222056000 WHERE cid = 7277;
I have used SQL because I have to perform for bulk records, you can try with edit comment.
If any query, please let me know.
Thanks,
Deepesh