Closed furioursus closed 10 years ago
If it is the same issue then one of your other add-ons must be calling a stash method statically, but not declaring an instance of EE as a property of the class. There's no need to replace every instance of ee(), rather all that is required is to add $this->EE = get_instance():
to the constructor of the third party add-on. Search your third_party folder files for the string 'stash::'
That wouldn’t be it, then, since there are no third party add ons calling stash, except for switchee, which I would imagine you are fully on top of being compatible in the first place. What else could I provide to help diagnose the issue? On December 18, 2013 at 12:16:12 AM, Mark Croxton (notifications@github.com) wrote:
If it is the same issue then one of your other add-ons must be calling a stash method statically, but not declaring an instance of EE as a property of the class. There's no need to replace every instance of ee(), rather all that is required is to add $this->EE = get_instance(): to the constructor of the third party add-on. Search your third_party folder files for the string 'stash::'
Please could you try that search for "stash::" anyway? Some add-ons have started using Stash internally. Then we can rule it out.
Sorry, that's what I mean, I did perform the search. Two instances came up in the stash addon files and once in switchee
Before we go any further - please uninstall Stash, remove the files from your system folder, check the tables are no longer in the db. Then grab the latest files from here and reinstall. Make sure both the module and extension are installed.
After that, if you still have a problem, please take a look at your extensions table in the db and see what other extensions are attached to template_fetch_template
and template_post_parse
and let me know.
Followed your instructions and still get the same error. I took a look at the extensions table and found the following data:
extension_id | class | method | hook | settings | priority | version | enabled |
7 | Low_variables_ext | template_fetch_template | template_fetch_template | a:8:{s:11:"license_key";s:36:"[[REDACTED]]";s:10:"can_manage";a:2:{i:0;s:1:"6";i:1;s:1:"1";}s:11:"clear_cache";s:1:"y";s:16:"register_globals";s:1:"y";s:20:"register_member_data";s:1:"y";s:13:"save_as_files";s:1:"y";s:9:"file_path";s:70:"/Users/chris/Repos/gaytravel-new/public_html/assets/template_variables";s:13:"enabled_types";a:23:{i:0;s:12:"low_checkbox";i:1;s:18:"low_checkbox_group";i:2;s:8:"dropdate";i:3;s:14:"fieldpack_list";i:4;s:14:"fieldpack_pill";i:5;s:16:"fieldpack_switch";i:6;s:11:"illuminated";i:7;s:14:"low_reorder_vt";i:8;s:6:"matrix";i:9;s:5:"playa";i:10;s:15:"low_radio_group";i:11;s:10:"low_select";i:12;s:21:"low_select_categories";i:13;s:19:"low_select_channels";i:14;s:18:"low_select_entries";i:15;s:16:"low_select_files";i:16;s:9:"low_table";i:17;s:14:"low_text_input";i:18;s:7:"low_rte";i:19;s:10:"vz_address";i:20;s:6:"vz_url";i:21;s:6:"wygwam";i:22;s:12:"low_textarea";}} | 2 | 2.4.0 | y |
32 | Ce_cache_ext | template_pre_parse | template_fetch_template | a:0:{} | 9 | 1.9.4 | y |
92 | Mo_variables_ext | run | template_fetch_template | a:22:{s:4:"ajax";s:1:"1";s:6:"secure";s:1:"1";s:3:"get";s:1:"1";s:12:"defaults_get";s:1:"1";s:8:"get_post";s:1:"1";s:17:"defaults_get_post";s:1:"1";s:4:"post";s:1:"1";s:13:"defaults_post";s:1:"1";s:6:"cookie";s:1:"1";s:15:"defaults_cookie";s:1:"1";s:9:"flashdata";s:1:"1";s:18:"defaults_flashdata";s:1:"1";s:12:"page_tracker";s:1:"1";s:16:"reverse_segments";s:1:"1";s:13:"segments_from";s:1:"1";s:9:"paginated";s:1:"1";s:7:"archive";s:1:"1";s:11:"categorized";s:1:"1";s:22:"reserved_category_word";s:1:"1";s:11:"current_url";s:1:"1";s:16:"member_variables";s:1:"1";s:25:"member_group_conditionals";s:1:"1";} | 10 | 1.1.5 | y |
126 | Stash_ext | template_fetch_template | template_fetch_template | 10 | 2.4.7 | y | |
42 | Minimee_ext | template_post_parse | template_post_parse | a:18:{s:9:"base_path";s:0:"";s:8:"base_url";s:0:"";s:9:"cachebust";s:0:"";s:10:"cache_path";s:0:"";s:9:"cache_url";s:0:"";s:7:"cleanup";s:2:"no";s:11:"combine_css";s:3:"yes";s:10:"combine_js";s:3:"yes";s:11:"css_library";s:6:"minify";s:16:"css_prepend_mode";s:3:"yes";s:15:"css_prepend_url";s:0:"";s:7:"disable";s:2:"no";s:11:"hash_method";s:4:"sha1";s:10:"js_library";s:5:"jsmin";s:10:"minify_css";s:3:"yes";s:11:"minify_html";s:2:"no";s:9:"minify_js";s:3:"yes";s:11:"remote_mode";s:4:"auto";} | 10 | 2.1.9 | y |
93 | Mo_variables_ext | cleanup | template_post_parse | a:22:{s:4:"ajax";s:1:"1";s:6:"secure";s:1:"1";s:3:"get";s:1:"1";s:12:"defaults_get";s:1:"1";s:8:"get_post";s:1:"1";s:17:"defaults_get_post";s:1:"1";s:4:"post";s:1:"1";s:13:"defaults_post";s:1:"1";s:6:"cookie";s:1:"1";s:15:"defaults_cookie";s:1:"1";s:9:"flashdata";s:1:"1";s:18:"defaults_flashdata";s:1:"1";s:12:"page_tracker";s:1:"1";s:16:"reverse_segments";s:1:"1";s:13:"segments_from";s:1:"1";s:9:"paginated";s:1:"1";s:7:"archive";s:1:"1";s:11:"categorized";s:1:"1";s:22:"reserved_category_word";s:1:"1";s:11:"current_url";s:1:"1";s:16:"member_variables";s:1:"1";s:25:"member_group_conditionals";s:1:"1";} | 10 | 1.1.5 | y |
127 | Stash_ext | template_post_parse | template_post_parse | 10 | 2.4.7 | y |
I went ahead and tried disabling every extension that used those methods or hooks, and I'm still getting the same errors, as well. They are no longer in the DB, nor are they in the file system.
Do you see stash_delete
or stash_load_template_class
being used by an add-on in the extensions table?
Do you get the error with a blank template? If not, you could start adding in tags from another template until you trigger the error, to narrow down what tag is causing the problem.
You get this error when the name parameter is blank. What could cause the name parameter to be blank? I discovered this edge case myself. Chris, try opening up mod.stash.php around line 747 where it says:
$name = $this->EE->TMPL->fetch_param('name');
And add this line after:
$name = $this->EE->TMPL->fetch_param('name');
if ($name === false) var_dump($this->EE->TMPL->tagproper);
Take a look at the dumped output. Does it have your template tag w/ encoded quotes? Meaning {exp:stash:get name="foo"}
as opposed to what you'd expect, {exp:stash:get name="foo"}
.
I haven't been able to track down exactly why this quote encoding happens, but I believe it has to do with something introduced in EE 2.6 or 2.7.
Interesting. CKEditor will convert quotes to "
. Were either of you using Stash tags in a WYSIWYG custom field? And / or, is it possible you used curly quotes for your parameters instead of straight quotes (can happen when copy-pasting code)?
My specific case was Freeform Pro. Specifically they have a hidden fieldtype, where you can set a default value. The default value may contain EE tags, like a stash get tag. This used to work for me on EE 2.5.5, but after updating the value is getting encoded. I've tried to get an answer from Solspace whether they think this is an EE thing or a Freeform issue (I think it's the former). I'll keep you posted if I figure anything out.
Okay, looks like I'm indeed getting those encoded quotes too. I'm seeing: string(42) "{exp:stash:get name='pagetitle'}"
show up now. I don't have any hidden tags here (or so I thought), nor am I using stash tags anywhere other than inside this template. Specifically though, I'm using it inside of an NSM Better Meta tag. Taking the tag out doesn't seem to remove the problem, though.
Scratch that, removing the entire stash tag pair, as well as the switchee tag around it seems to relieve the initial issue. For reference, here's what I'm working with, and what I'm about to start tweaking and adjusting:
{exp:switchee variable="{host}" parse="iwnard"}
{case value="www.gaytravel.com"}
{switchee variable="{segment_1}" parse="inward"}
{case value=""}
{exp:nsm_better_meta:template
title="Gay Travel is Your Guide to Gay Vacations, Hotels, and Destinations"
hide_site_title = "y"
}
{/case}
{case default="yes"}
{if "{embed:page_entry_id}"}
{exp:nsm_better_meta:template
entry_id="{embed:page_entry_id}"
}
{if:else}
{exp:nsm_better_meta:template
title="{exp:stash:get name='pagetitle'}"
hide_site_title = "y"
}
{/if}
{/case}
{/switchee}
{/case}
{case default="yes"}
{switchee variable="{segment_1}" parse="inward"}
{case value=""}
{exp:nsm_better_meta:template
title="Gay Travel is Your Guide to Gay Vacations, Hotels, and Destinations"
hide_site_title = "y"
robots_index="no"
robots_follow="no"
robots_archive="no"
}
{/case}
{case default="yes"}
{if "{embed:page_entry_id}"}
{exp:nsm_better_meta:template
entry_id="{embed:page_entry_id}"
robots_index="no"
robots_follow="no"
robots_archive="no"
}
{if:else}
{exp:nsm_better_meta:template
title="{exp:stash:get name='pagetitle'}"
hide_site_title = "y"
robots_index="no"
robots_follow="no"
robots_archive="no"
}
{/if}
{/case}
{/switchee}
{/case}
{/exp:switchee}
parse="iwnard"
that's going to screw things right up!
Well, crap. That looks like the culprit right there. I’m no longer getting any errors, but will update if something weird(er) happens.
On December 31, 2013 at 9:59:09 AM, Mark Croxton (notifications@github.com) wrote:
parse="iwnard" that's going to screw things right up!
— Reply to this email directly or view it on GitHub.
lol, parse=awkward
I’m running into an error with stash wherein I'm receiving two errors stating that array_key_exists. These errors/warnings are showing up and causing no small amount of grief for me and my client. I'm not quite sure where to begin. I took a look at another issue that was opened, but I'm not quite sure of how to implement the fix. Am I supposed to replace all 521 instances of
$this->EE
withee()
? I'm running EE 2.7.2 and Stash 2.4.7. The full rundown of addons is below the error message.Addons:
Release Notes
Release Notes