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 am having a problem with the media modules filter. I am using media-7.x-1.2. On line 174 of includes/media.filter.inc, there is a call to file_load():
$file = file_load($tag_info['fid']);
This call somehow initiates the theme engine, which invalidates the theme switching the themekey. Can you think of any workarounds? I tried digging into file_load, but it uses an entity_load, so it seems like this is buried deep in Drupal core's internals.
Thanks!
Comments
Comment #1
mkalkbrennerSorry for the delay. I had to focus on Apache Solr Multilingual over the last weeks.
I have a setup here were ThemeKey works fine in combination with the media module.
1. What's the output of ThemeKey Debug's "Trace rule switching" when your problems occur?
2. What happens, if you clear the page cache? There's currently an issue regarding a potential bug in core:
#1222536: Bug in Redirect module causes ThemeKey issue - Must page reload in browser to switch theme
Comment #2
mkalkbrennersee #2086335: Bootstrap issue with theme initialization causes hook_custom_theme() never to be invoked