Notice: Undefined index: theme_key in omega_extensions() (line 152 of /home/e-smith/files/ibays/sota4/html/sites/all/themes/omega/omega/includes/omega.inc).
Notice: Undefined index: theme_key in omega_discovery() (line 531 of /home/e-smith/files/ibays/sota4/html/sites/all/themes/omega/omega/includes/omega.inc).
Notice: Undefined index: theme_key in omega_theme_trail() (line 72 of /home/e-smith/files/ibays/sota4/html/sites/all/themes/omega/omega/includes/omega.inc).
Notice: Undefined index: in omega_theme_trail() (line 90 of /home/e-smith/files/ibays/sota4/html/sites/all/themes/omega/omega/includes/omega.inc).
Notice: Trying to get property of non-object in omega_theme_trail() (line 90 of /home/e-smith/files/ibays/sota4/html/sites/all/themes/omega/omega/includes/omega.inc).
I am not a coder so not sure why there are errors. But this only occurs when xautoload is enabled.
Comment | File | Size | Author |
---|---|---|---|
#8 | xautoload-7.x-5.x-2234647-7-preMainPhase.patch | 6.48 KB | donquixote |
Comments
Comment #1
donquixote CreditAttribution: donquixote commentedI can't reproduce this, sorry..
Can you explain what exactly to do to reproduce?
And, can you give me a stack trace?
Make sure you are visiting the site as an admin with the "access developer information" permission enabled.
Comment #2
P2790 CreditAttribution: P2790 commentedHi, thanks for the reply, I've removed xautoload but I will try it out again and post back the debug info
Comment #3
joelpittetGot this two after some weird bug happened. So thought I'd share my traceback.
Comment #4
donquixote CreditAttribution: donquixote commented@joelpittet:
This looks like you are using a very vintage version of xautoload.
I also think you are using an older version of libraries module.
But either way, this backtrace is gold!
But if you can tell me the exact version of libraries and xautoload, that would be even better.
It looks like libraries_info() is causing premature inclusion of omega/template.php, which has some ugly side effects.
Solution 1: Stop calling libraries_info() so early, and only call it from hook_init().
Solution 2: Use a newer version of libraries module, where this no longer happens.
Explanation:
We want to all the xautoload initialization stuff as early as possible, so that classes are available when they are needed.
There are different system events that trigger stuff in xautoload:
The exact mechanics have changed between xautoload versions, in an attempt to be less confusing - so I won't go into too much detail.
I should also add that a lot of things only happen after a cache miss, that is, if one class is not found.
xautoload does the following things based on these events:
This can happen as soon as Drupal is ready to provide a module list, and has no relevant side effects.
This can happen as soon as all *.module files (bootstrap and non-bootstrap modules) are included. So it can in fact happen in hook_custom_theme().
Modules that implement hook_xautoload() should simply be careful.
Problem: libraries_info(), and maybe a number of hook_libraries_info() implementations, can have side effects that make it problematic to be called too early in the request().
It seems that hook_custom_theme() is too early. hook_init() should work ok.
In fact the problem of calling libraries_info() from hook_custom_theme() is still in the latest version, so I'd say this should be fixed.
But I would still like to have the exact version of libraries, so I can try to reproduce.
Comment #5
joelpittetI think I turned on crumbs to try it out vs path_breadcrumbs, then it enabled xautoload at the same time because it seemed to be the only module I was playing with and only one that required xautoload.
Also I think a team member force reverted the git repo to a much older version by accident which may be why I have an older version there. (All kinds of crap went down tonight, thank god for db backups).
It says xautoload is 7.x-3.6 which isn't that old (2014-Feb-07) but still not sure how I got it...
Thanks for the speedy response @donquixote!
I think a lot of issues I've been having lately have been cache miss related. Redis was my friend for a while, now it's not so much:S
Comment #6
donquixote CreditAttribution: donquixote commentedCrumbs does not require xautoload. It is happy if it finds xautoload, but it has its own fallback class loader.
crumbs_example does require xautoload.
But there is no good reason to enable crumbs_example. Maybe I should make that more clear in the module description.
Ok :) Still before 7.x4.x.
Which version is libraries?
And let me know how you get along with Crumbs :)
Comment #7
joelpittetI don't recall enabling that crumbs example, explicitly recall not enabling it so no idea what xautoload came from because crumbs_example seems to be the only dependency I have installed.
Libraries is at 7.x-2.2
Crumbs looks pretty cool, but sounds too magical from the description. It may be the best solution yet, but I didn't get much of a chance to try it out before my staging site imploded.
I'm trying to just turn on breadcrumbs for products because of the taxonomy hierarchy depth. But the requirement is that only the leaf terms are clickable links (not the parents), though the parents need to be shown as well as the product display node title. I've got that more or less working in path_breadcrumbs but gotta figure out still how to turn it off for other paths. Not sure yet if crumbs can be up to the task to do that yet?
Comment #8
donquixote CreditAttribution: donquixote commentedhttps://github.com/donquixote/drupal-xautoload/compare/7.x-5.x-2234647-7...
This should fix the problem which occurs with older versions of libraries.
Comment #9
donquixote CreditAttribution: donquixote commentedIf you use a more recent version of libraries, you probably don't need this, but it could still save you from some side effects of other hook_libraries_info() implementations.
Comment #10
donquixote CreditAttribution: donquixote commented#8 applies to is 7.x-5.x.
Sounds like something non-standard. Can you post an issue in Crumbs? Or talk to me on IRC.
Even if this turns out to be not possible yet, it is always interesting to know real-world use cases.
Comment #12
donquixote CreditAttribution: donquixote commented8: xautoload-7.x-5.x-2234647-7-preMainPhase.patch queued for re-testing.
Comment #13
donquixote CreditAttribution: donquixote commentedThe latest 7.x-5.x should fix all of this. Can you try?
Comment #14
donquixote CreditAttribution: donquixote commentedSupposedly fixed in 7.x-5.x.
Please reopen if not.
Comment #16
BillyTom CreditAttribution: BillyTom commentedI am using 7.x-5.1 from 2014-Nov-20 and I get this notice after I clear the cache. It does not show up on subsequent page views.
If I read this correctly then should #8 not already be included in 7.x-5.1?
Comment #17
GuyPaddock CreditAttribution: GuyPaddock at Inveniem commentedSorry to necro this, but I just ran into this issue on X Autoload 7.x-5.7 with Libraries 7.x-2.3 and Omega 7.x-4.4.
As we've had this combination in our install profile for some time without issue, the only thing I can identify that would be different on the site that's exhibiting the issue is that it is using a sub-theme of a sub-theme of Omega. In other words, there's the Omega base theme, then a theme we've built, and then a sub-theme based on our theme that the client is using.