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.

CommentFileSizeAuthor
#2 disqus-broken-url-3246092-2.patch702 bytesamykhailova

Comments

amykhailova created an issue. See original summary.

amykhailova’s picture

StatusFileSize
new702 bytes

Here is the patch.

amykhailova’s picture

Status: Active » Needs review
gaurav.kapoor’s picture

Version: 8.x-1.0 » 2.0.1-alpha1
Status: Needs review » Reviewed & tested by the community

@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.

gaurav.kapoor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.