Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-1625158-1.patch | 1.43 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettThis attempts to prove that.
Comment #3
tim.plunkettApparently 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.
Comment #4
c4rl CreditAttribution: c4rl commentedI 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.