Problem/Motivation

If you have a look at https://api.drupal.org/api/drupal/core%21modules%21system%21templates%21... it points to

@see template_preprocess_status_messages()

this function though no longer exists, yeah, the logic for that moved entirely into the template, see core/themes/classy/templates/misc/status-messages.html.twig

Proposed resolution

Clean up as many of those templates to no longer point to non existing functions.

Here's a grep to get a list of all:
grep -ihREo --include="*.twig" '(\w*)\(\)' core | sort | uniq

And to get the file names they are in:
grep -iREo --include="*.twig" '(\w*)\(\)' core | sort

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner created an issue. See original summary.

Sagar Ramgade’s picture

The patch attached removes all the references to template_preprocess_status_messages().

rang501’s picture

Removes the following references:
template_preprocess_config_translation_manage_form_element
template_preprocess_dropbutton_wrapper
template_preprocess_menu_local_tasks
template_preprocess_page_title
template_preprocess_tablesort_indicator
template_preprocess_update_version
template_preprocess_views_ui_container

Patch is attached. I think there's no references left in template files.

joelpittet’s picture

Issue summary: View changes
Status: Needs review » Needs work

This is pretty good I did notice bartik is referencing bartik_preprocess_page() which doesn't exist. Could you do a search through all @see's in twig templates to see the functions exist?

Here's a grep to get a list of all:
grep -ihREo --include="*.twig" '(\w*)\(\)' core | sort | uniq

And to get the file names they are in:
grep -iREo --include="*.twig" '(\w*)\(\)' core | sort

jaakko’s picture

Assigned: Unassigned » jaakko
Issue tags: +drupalcampfi
jaakko’s picture

Assigned: jaakko » Unassigned
Status: Needs work » Needs review
FileSize
4.22 KB

Removing following references:
template_preprocess_page_title()
template_preprocess_views_ui_container()
template_preprocess_update_version()
bartik_preprocess_page()
bartik_preprocess_field()
template_preprocess_views_ui_container()
template_preprocess_update_version()

lauriii’s picture

Antti J. Salminen’s picture

Found two additions. I think this should be all of them, I compared lists of undefined ones with the ones in the patch and only came up with these. Looks good to me otherwise.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Documentation

Nice hunting

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 8: remove_references_to-2587685-8.patch, failed testing.

joelpittet’s picture

Status: Needs work » Reviewed & tested by the community

Back to black

The last submitted patch, 7: remove_references_to-2587685-7.patch, failed testing.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 8: remove_references_to-2587685-8.patch, failed testing.

joelpittet’s picture

Issue tags: +Needs reroll
AjitS’s picture

Assigned: Unassigned » AjitS

Working on it now.

AjitS’s picture

Assigned: AjitS » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
14.03 KB

Rerolled.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Perfect, I diffed the diffs and the re-roll looks great.

The last submitted patch, 7: remove_references_to-2587685-7.patch, failed testing.

The last submitted patch, 8: remove_references_to-2587685-8.patch, failed testing.

  • catch committed ed3bd48 on
    Issue #2587685 by Antti J. Salminen, lauriii, jaakko, AjitS, Sagar...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

iMiksu’s picture

Issue tags: -drupalcampfi

Cleaning up drupalcampfi tags.