Support use of URL path in hook_preprocess_feed_icon

Created on 16 July 2023, 12 months ago
Updated 21 July 2023, 11 months ago

Problem/Motivation

The contrib port of Bartik, as well as Claro, Stark, and Seven, all handle the url variable in theme_feed_icon as an absolute path, but when Olivero is the active theme, the `*_preprocess_feed_icon()` functions receive it as a Drupal\Core\Url instead of a string causing errors in e.g. g2_preprocess_feed_icon.

It may be important to note that theme.inc does not define the type of that variable.

Steps to reproduce

  • Enable Bartik, Claro, Stark, or Seven as default theme.
  • Enable the WOTD feed icon
  • Observe error on any page carrying the block
  • Enable Olivero instead
  • Observe no error on any page carrying the block
  • Remove templates/views/views-view--frontpage.html.twig
  • Observe error again : the issue appears to be cause by the presence of that specific template in Olivero

Proposed resolution

Support both string and object format for that parameter.

Remaining tasks

Do it.

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Fixed

Version

1.0

Component

User interface

Created by

🇫🇷France fgm Paris, France

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

Comments & Activities

Production build 0.69.0 2024