Problem/Motivation

Error: Call to undefined method Drupal\node\Entity\Node::URL() in industrial_zymphonies_theme_preprocess_breadcrumb() (line 185 of webroot/web/themes/contrib/industrial_zymphonies_theme/industrial_zymphonies_theme.theme)

Node::URL() was deprecated, and removed in Drupal 9

Steps to reproduce

Install theme in fresh Drupal 9 site, navigate to a page with a breadcrumb.

Proposed resolution

Change from node->URL to node->toURL

sed -i 's/node->URL/node->toURL/g' /web/themes/contrib/industrial_zymphonies_theme/industrial_zymphonies_theme.theme

CommentFileSizeAuthor
#4 node-url-tostring.patch450 bytesreinaldoc
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    jgruttner created an issue. See original summary.

    jgruttner’s picture

    Issue summary: View changes
    saranyamariappan’s picture

    Assigned: Unassigned » saranyamariappan
    Status: Active » Needs work

    Validating the issue on D9

    reinaldoc’s picture

    Assigned: saranyamariappan » reinaldoc
    Status: Needs work » Reviewed & tested by the community
    StatusFileSize
    new450 bytes

    patch attached.

    $ cd /path/drupal/themes/industrial_zymphonies_theme/
    $ patch -p0 < /tmp/node-url-tostring.patch