Node::URL() was deprecated but used in code

Created on 15 January 2024, 6 months ago

Problem/Motivation

Opening any URL except the front page produces error

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\node\Entity\Node::URL() in simpleblog_preprocess_breadcrumb() (line 89 of themes/contrib/simpleblog/simpleblog.theme).

Steps to reproduce

Install theme via Composer, clean caches, visit any URL except front page.

Proposed resolution

In simpleblog.theme change line 89 from

'url' => $node->URL(),
to
'url' => $node->toURL(),

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

🐛 Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

🇷🇺Russia urix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024