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';


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 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

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

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

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

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

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

Ok so this was ridiculous easy to fix. What we did was move the XML from it's static file and inserted it into its own template within our active template group and it worked. So if you're having this problem just template the XML and go nuts. All we had to change in our JS here was var url = "OUR URL"; to var url = "{path='<our template group>/&...


2

I know it's a bit old but for someone looking to change some parameters (like the return value) on submit by JavaScript - the reason it's not possible is that EE uses the meta tag which is an encrypted string containing some of the information. So, to change the value you would need to recreate that encryption. Look in the file Channel_form_lib.php for more ...


2

Matt, two options for you. 1) Easy: pass a segment variable to the safecracker form, then use 2 if statements (rather than an if else) to set the return values you need. That means youll need two different links pointing to the safecracker form. 2) More work: create an extension and use the safecracker hook - channel_form_submit_entry_end to redirect to ...


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 ...


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

I often use the cp_menu_array hook for this purpose. It runs on every CP request, and unlike cp_js_end, it doesn't run in a separate HTTP request. You just have to be careful to keep the $menu value, as other extensions might be using the same hook. public function cp_menu_array($menu) { ee()->javascript->output('$("#publishForm").css("background-...


2

is not needs in path here <script src="http://whitewashed.richiesiegel.com/slider.js" type="text/javascript"></script> p.s. EE is not parsed tags in entries w/o special add-ons


2

I have found (and apparently you have too!) that using one css file that 'imports' multiple is the way to go. I point WYGWAM to my wygwam-style.css file which includes: @import url("/css/reset.css"); @import url("/css/dynamic-content.css"); Reset.css is just a basic css reset that I use on the front-end of my site, so I figured it'd be best if it was ...


2

If it's just for a slider on the front-end, forget that you're even using EE and include jQuery as you would with any other platform. HTML5 Boilerplate recommends using the Google CDN with a local fallback, so you could throw this segment in your template: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <...


2

Not sure if the markup is entirely correct, but this works: $("#shipping_method").change(function(e) { $(this.form).submit(); });


2

Why do you have 3 sets of parenthesis around the member_id tag? Does it work if you simply use {member_id}? EDIT (after comments) I'm not completely sure how this should be set up as I've never used this (will need to get up to speed on it though) but based on what I see in the docs does this work; {if logged_in} ga('create', 'UA-XXXX-Y', { 'userId': ...


2

Try adding a dynamic="off" parameter to your channel entries tag - though I'm not sure how this will pan out with Structure. {exp:channel:entries channel="marquee" limit="3" status="open" dynamic="off"}


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