Update regular expressions patterns for debug messages after Drupal 10.3

Created on 27 June 2024, 6 months ago
Updated 29 June 2024, 6 months ago

Problem/Motivation

Starting on Drupal 10.3, the characters that point if theme suggestions are being used or not changed. Instead of the default * (inactive) and x (active), character indicators are now ▪️ (inactive), and ✅ (active).

The change, which is documented under this issue queue ( https://www.drupal.org/project/drupal/issues/3420709 Make it more obvious that a Twig template is overridden Fixed ), and is delivered under this commit (https://git.drupalcode.org/project/drupal/-/commit/e5cd97f1f0f1904aa51da...), might break the mechanism that lists active and inactive theme suggestions.

Another change being introduced is affecting the comment that carries the template file path: BEGIN CUSTOM TEMPLATE OUTPUT, instead of BEGIN OUTPUT. This also needs to be fixed with this ticket.

Steps to reproduce

Run Visual Debugger on a Drupal site with version 10.3.x installed. When selecting an element, there will probably be issues with the visual indication of selected and unselected elements.

Proposed resolution

Improve method pasreListOnOffRegexpOutput in themeElement.js so that it can parse both characters mentioned above, both the old approach (up to Drupal 10.2.x) and the new (starting on Drupal 10.3.x). Also, let's fix a typo in the method name (parseListOnOffRegexpOutput instead of pasreListOnOffRegexpOutput).

Improve method regexGetTemplateFilePath() to account for the new file path string pattern.

Remaining tasks

Improve the method mentioned above and make it more flexible.

User interface changes

There should be no user interface changes being reflected to the end-user.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇧🇷Brazil mabho Rio de Janeiro, RJ

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