Closed (fixed)
Project:
X Autoload
Version:
7.x-4.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2014 at 00:25 UTC
Updated:
9 Mar 2014 at 16:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
donquixote commentedSeems this is a scenario i did not test and did not prepare for.
A Drupal "extension" can be a module or theme, but it can also be a theme engine, apparently. I assume you only get to deal with that if you actually have a theme engine installed other than what is there in Drupal by default.
There are two ways to fix this:
1. We agree that theme engines don't ever need special autoloading support, and skip this case.
2. We add some special logic for theme engines.
I strongly in favor of option 1, until someone actually makes a solid case why we need to support theme engines.
Supporting theme engines also would mean we need to have an equivalent for drupal_get_path('module', *).
Patch or PR will follow, stay tuned.
Comment #2
donquixote commentedI don't like to upload patches.
https://github.com/donquixote/drupal-xautoload/compare/7.x-4.x-2199913-t...
Can you try and report if it works?
And also let us know what is special about your install, if you really have an extra theme engine installed.
I would like to fix this asap.
Comment #3
sonictruth commentedThat fixed it. We don't have any extra theme engines installed—we've only ever used phptemplate that comes with Drupal. The only probably interesting thing about this site is that it uses translation heavily.
Thanks for the quick fix though.
Comment #4
sonictruth commentedHere's a patch if anyone else needs it
Comment #5
donquixote commentedI am going to commit this soon (next days).
But I would still like to know why this happens for some people (you) and not for others.
Can you get a backtrace?
Comment #6
sonictruth commentedHere's a backtrace from just before the fix you posted. I hope it helps. Note that I prepended the paths with *path_to_drupal* instead of the real path on my hdd.
Comment #7
donquixote commentedThanks.
What I can read from this is that it happens when it wants to register *all* currently active extensions.
And this means at least one theme engine is in the system table and marked as active.
Comment #8
sonictruth commentedJust looked in the system table and there is a theme_engine row for phptemplate. I also checked a fresh D7 and it doesn't have any theme_engine rows. The site in question was upgraded to D7 from D6. Is it possible that is a hang over from D6?
Comment #9
donquixote commentedWow, yes, this could be the explanation.
Which still means I should merge the fix and release it. But at least now we know what we are doing and why :)
Thanks for the digging and reporting!
Comment #10
sonictruth commentedNo problems, thanks for the quick fix.
Comment #11
donquixote commentedFixed in 7.x-4.2