Problem/Motivation
When using 8.x-1.0 version on D9 and saving an update of the node with update threads option on there is a fatal PHP error - call to undefined method Node::url() on line 200 of the module. Apparently this has been deprecated for Drupal 9. So we need to replace it with ->toUrl()->toString() instead.
Steps to reproduce
Install on the Drupal 9 site.
Set option update threads.
Update an article.
See hook_entity_update being called and fail on the $entity->original->url() line.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | disqus-broken-url-3246092-2.patch | 702 bytes | amykhailova |
Comments
Comment #2
amykhailova commentedHere is the patch.
Comment #3
amykhailova commentedComment #4
gaurav.kapoor commented@amykhailova Thanks for spotting this and providing a patch. I verified this in my local and surprisingly the issue exists in improved 2.0.1-alpha1 as well. So, I will push this patch to the latest development release and tag a new release as well.
Comment #6
gaurav.kapoor commented