Undefined property: EE::$TMPL
HI I am writing a custom module for my work place and we use the Low Variables module (which is awesome)
however the error i am getting is as follows:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: EE::$TMPL
Filename: low_variables/mod.low_variables.php
Line Number: 362
Fatal error: Call to a member function fetch_param() on a non-object in {file_system}/third_party/low_variables/mod.low_variables.php on line 362
It seems to be loosing the EE super object?
my extension is running a hook to update the global vars/snippets.
Replies
Scott Jones 9 Aug 2012 12:39
FYI im using EE v2.5.2 and low variables v2.3.0
Low 9 Aug 2012 14:46
As you might guess, I cannot replicate this.
Are you sure you're not overwriting the EE super object with something else?
Scott Jones 9 Aug 2012 15:40
HI,
Yeah i thought it might be a tough one. It might be worth sending you my code for the extension (it basically loads the EE template library, loads the Global Vars/snippets and for each snippet/GV parses it through the template library in order to allow the user to have module code in the snippets, eg {exp:module:function})
I can send the code but the basics are as follows:
as you can see not a lot going on. i am running this as an extension though bu i cant see that im overwriting the EE super object..
Low 10 Aug 2012 08:59
Do you need to load the Template library? Isn't it already loaded? That might cause some issues, perhaps.
Scott Jones 10 Aug 2012 10:41
If i take out the template loading then it crashes at the start..i am using the following hook point: core_template_route
Low 10 Aug 2012 10:47
What if you load it like this:
...and then use $this->EE->TMPL in your addon.
Scott Jones 10 Aug 2012 12:39
hmm although that should have worked it was giving me an error:
undefined EE:TMPL
will take a look into it.