I was trying to debug failures in #1290694: Provide consistency for attributes and classes arrays provided by template_preprocess(), and I noticed that template_preprocess doesn't run for theme_field.

CommentFileSizeAuthor
#1 drupal-1625158-1.patch1.43 KBtim.plunkett
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
FileSize
1.43 KB

This attempts to prove that.

Status: Needs review » Needs work

The last submitted patch, drupal-1625158-1.patch, failed testing.

tim.plunkett’s picture

Apparently this is not a bug?

#1333122: Fix documentation in theme() and template_preprocess() is working to change the docs to clarify that template_preprocess() only runs for template files, and not for theme functions.

I'm leaving this open for now and about theme('field'), because there IS a field.tpl.php, it just explains that its not used by default.

c4rl’s picture

Status: Needs work » Closed (works as designed)
Issue tags: -Needs backport to D7

I think the conversion to Twig should fix this since all theme callbacks will become template-based now. I'm going to close this for now and we can follow-up in #1898062: field.module - Convert PHPTemplate templates to Twig for Drupal 8.