7

Go to line 706 in /system/expressionengine/third_party/campaigner/ext.campaigner.php and change it from: $this->EE->javascript->generate_json($js_member_fields)); to: json_encode($js_member_fields)); And yes, this line needs double parentheses at the end, since it's a continuation of line 705.


6

By default EE prevents the advanced conditional parser from processing anything between <script> tags. Try adding this config variable: $config['protect_javascript'] = 'n';


6

I think you're looking for this page in the EE Developer docs. Basically, if you only need the JS in the Control Panel (so not on the front-end of the site), put your JS files in the /your_addon_package/javascript/ folder and then use $this->EE->cp->load_package_js('my_file'); to load it. If you need the JS outside of the CP as well, you need to ...


5

UPDATE: Store 2 includes the fix mentioned below. It will be an option in the next version. In the meantime, you can fix it by opening mod.store.php, going down to about line 235, and changing this: (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(script); to this: document.getElementsByTagName("body")[0]....


4

The main problem here is this: keywords="{segment_3}" You probably don't have keywords in the third segment, but an entire encoded query. You're feeding that query as keywords to the URL tag, essentially encoding it twice. If you use the URL tag and you want to work from an existing search action, use query="{segement_3}" to pass all the details from the ...


4

Answering my own question as I think this is useful. Adrian at Expresso helped me out. Basically, we output the menus and also output custom buttons. Then we just hide the menus with CSS. This presumably avoids writing lots of new custom Javascript or introducing new dependencies to the way the form is processed by Store. See this jsFiddle EE code {!-- ...


4

The cleanest way is to create an accessory add-on that will add your js to all pages in the cp. Here's a basic example called "Default Value." Change the name and code as needed. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * ExpressionEngine Developer Accessory * * @package Default Value * @category ...


4

You have this tagged as PHP, but this sounds more like a job for JavaScript. The Search module is already preventing empty searches, which is why you get that error page. Lots of ways to accomplish this, here is one way if you are using jQuery: $(document).ready(function() { $('#search').submit(function() { if ($('#keywords').val() == '') { ...


3

What about: {modifiers} {modifier_name}: {modifier_options} <label><input type="radio" name="{modifier_input_name}" value="{option_id}" /> {option_name}</label> {/modifier_options} {/modifiers}


3

EE won't parse tags that are stored outside of templates unless you do some trickery to send them back into the parser. Keep them in templates if you need the tags parsed. Though I should note that the parsing abilities for CSS and Javascript templates seem limited. While you are at it be sure to look into a minimizing module, this doesn't solve your ...


3

NB This P&T support thread seems to suggest that CKEditor (which is the editor WYGWAM is based should automatically strip <script> tags, so might be worth checking your themes/third_party/wygwam/lib/ckeditor/config.js file and asking on their Get Satisfaction if that isn't the case for you. That aside. even if you can do this in CKEditor, my ...


3

I have just spent many hours trying to resolve the very same issue, however, I was relunctant to upgrade PHP. On my production server, JavaScript was taking 5 seconds to load slowing down the responsiveness of every page within the control panel. However, the issue did not occur on my local (MAMP) server. I went through a process of disabling all the ...


3

Because this isn't happening in your local development environment, I would guess it's not EE related but instead is caused by something on the server or is DNS related. But here are some things to try/check: Log out of EE, clear all cookies and cache, then log back in Disable extensions temporarily by adding this to your config.php file $conf['...


3

Go to this field via Admin > Channel Administration > Channel Fields > Group > Field and switch the formatting back to XHTML confirm and then back again to none. When switching EE should show a checkbox before confirming asking if you want existing fields to be reformatted. Check this. Alternatively keep as XHTML in EE and use a plugin to alter the rendered ...


3

update looks like this task is not so simple as looks like - can't find where some notice even is registered (like for save custom field setting - looks like it is flashdata). I made a quick example using HubSpot Messaging + ee_notice replacement as combination of JS & hooks - CP Notice before Why just don't replace it with ext.? function cp_js_end( ...


3

For my specific case, it appears to be addons such as Matrix and Assets by Pixel & Tonic that are causing this. By uninstalling the addons I was able to get rid of this error.


3

The error has been confirmed as a bug in EE 2.8. Bug tracker: https://support.ellislab.com/bugs/detail/20165 The issue will be fixed in the next release, and a patch has been posted to the bug tracker for any who need it.


3

Honestly, I wouldn't even mess with that plugin since that's what it's supposed to do. Just do a simple ajax call and append the data like this. Note the move of #articles to the main template, and paginate_base parameter in the embed template. Main Template <html> <head></head> <body> <section id="articles"> ...


3

OK, I feel like an idiot! Forgot about the Javascript template type. Solution: I simply created a new template, designated it as type "JavaScript", inserted my code, minus the <script> tags, then did <script src="{path="paht_to_js_template"}"></script>. Simple ;)


2

CKEditor’s instanceReady event ought to fit the bill for you: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#event:instanceReady CKEDITOR.on('instanceReady', function(ev) { // ... });


2

My specific issue was corrected by making sure that both the JavaScript files and the index file I was embedding them into were set to use the 'JavaScript' type. Earlier versions of ExpressionEngine would work with that index file set to other template types, but the latest versions are particular, and submit more strict headers with the templates.


2

Sometimes the sollution to a problem is a simple one. After uploading the matrix files in the themes directory the problem disappeared. TAKE HOME MESSAGE When in doubt reupload the themes file to try and solve the problem. ;)


2

To stop the posting of the forum, you can use jQuery submit: http://api.jquery.com/submit/ The code would look something like this: $(window).ready(function() { $('#mx_locator').submit(function() { if ($('#mx_zip').val() == '' && $('#mx_city').val() == '') { // Additional code here to light up the input or display error ...


2

You can use the Forms JS Validation plugin http://devot-ee.com/add-ons/forms-js-validation You can add basic and complex validation to your forms without modify the form tag itself.


2

I'd avoid anything based on {site_url} and opt for relative paths instead. With what you've supplied, simply placing an "/" instead of {site_url} would suffice. That being said I would also avoid placing css in a template and do it the old fashioned way to stop this errant behaviour which also gives the added benefit of making solving any css issue, that ...


2

I've seen this happen when the server was doing some aggressive security stripping. Modifying the template via FTP didn't show the issue; only submitting via the CP. So I'd talk to your host about it; and also try via FTP and make sure that works as expected. :)


2

There is nothing built into Store currently that would allow you to create modifiers on a per channel basis if you want the modifiers to adjust price or stock levels. There is currently a feature request for Global Product Variations that you can vote for. If you do not not need to adjust the price, quantity or have a unique SKU for your variations you can ...


2

Yes. You could write jQuery script that you put in the Instructions field for that entry. You could check the URL in JavaScript/jQuery for the particular Entry ID you want to isolate, and then hide the corresponding field & label. Updated: A Matrix field will still have an Instructions field in its Channel Fields definition, and that Instructions field ...


2

Two possible strategies come to mind for this: As another user suggested, create as many Name, Address, Phone and Email fields as you need or think will need, and add a suffix for each field name (eg. name_1, name_2, etc) If you're manually creating your fields in the template using {exp:freeform:form}, add brackets [] to your field names so that you save ...


2

Try This... function initialize() { var map, marker, pos; {exp:channel:entries channel="maps_channel"} {if count == 1} var mLatLng = new google.maps.LatLng({map_coordinates}); map = new google.maps.Map(document.getElementById("map-canvas"), { center: mLatLng, mapTypeId: google.maps.MapTypeId.ROADMAP, zoom: 13 ...


Only top voted, non community-wiki answers of a minimum length are eligible