Formatting of validity check throws a warning on line 76

Created on 1 March 2024, about 1 year ago
Updated 21 June 2024, 10 months ago

When the tokens are resolved, the module checks that they be be rendered before attempting to, this list can generate invalid sequences in certain situations. For instance, this occurs when rendering an entity through an entity reference.

For instance:

If node have view modes "default" and "teaser" and term have view modes "default", "thumbnail", when you use the following token "[node:field_tags:entity:render:thumbnail]", line 76 will check for "node.thumbnail", which isn't valid and will throw a warning.

The problematic line is:

if (($view_mode = $all_view_modes[$data['entity_type'] . '.' . $view_mode_name])) {

When the check detects an invalid combination, it doesn't run anymore code, but it also throws a warning.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada spotzero

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024