Problem/Motivation

Preprocess functions are not running on Drupal above version 11.0. This is because drupal_common_theme() has been replaced with ThemeCommonElements::commonElements() and the latter includes the initial preprocess key in the values it returns. When this key is present, Drupal does not look for template_preprocess_*() functions so they do not run. The result is required processing does not happen. This causes content configured to display as a list to not appear as a list.

In preparation for Drupal 12, the template_preprocess_*() functions will need to be replaced with OO code; see change record template_preprocess_HOOK are defined as callbacks in the theme hook.

Proposed resolution

Unset those keys.

Remaining tasks

Implement.

User interface changes

None.

API changes

None.

Data model changes

None.

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

liam morland created an issue. See original summary.

liam morland’s picture

Assigned: liam morland » Unassigned
Status: Active » Needs review

  • liam morland committed 03fbce97 on 2.2.x
    fix: #3603080 Remove `initial preprocess` to allow discovery of...
liam morland’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.