Hot answers tagged

3

If you are using EE4 then you could use the built-in encrypt / decrypt variable modifiers. So your template entry could end up with something like this perhaps: {path='SingleSignon/Microsite'}?externalId={entry_id:encrypt}{email:encrypt} HTH


3

The issue was related to PHP. This was a mediatemple GS server and it had the PHP set to 5.3.27 FastCGI. I had to change this to 5.3.27 CGI (stable) and this seemed to clear up all the issues. Hopefully this may help someone in the future as the issue was unexpected and not clear what the issue was.


2

You can use variable modifiers. Check https://docs.expressionengine.com/latest/templates/variable-modifiers.html#variable-modifiers {filename:json}


2

That is a tricky one, but i would check out Open Api which is a nice api in which to perform CRUD operations, you might run into some cross-site ajax issues though, but it can definitely be done.


2

EE doesn't have a native API interface to communicate with, but I've been having quite a good time with Webservice API plugin from Reinos, and with it you can turn a EE install into a REST/XMLRPC/SOAP server. They've also done the hard work of connecting with many third-party add-ons. Check out the docs here.


2

Install "HTTP Header" Plugin to set the EE html template as a json. {exp:http_header content_type="application/json"}


2

Found out through some more testing that it is a strange bug with how templates are being routed. The json outputs fine on a page when seeing the rendered directly from the template. However, when the page rendered through a page, this is when it fails. Could not find a fix so far, but a workaround so far is to ajax in the json instead of directly ...


2

I'm not completely understand your issue (for template route ext. is not really matter - you can made it as you want), but possible is that you have text/html header instead of application/json? If yes, try to add terminate="yes" parameter to JSON plugin: {exp:json:entries channel="news" terminate="yes"}


2

You can use send_ajax_response() which will return JSON and works well for response to ajax requests. For your example you'd do public function mealDates() { $array = array( 'foo' => 'bar', ); return $ee()->output->send_ajax_response($array); }


2

I've just discovered the parse paramter which will let me get the bits of data I need to create my own javascript for creating markers an modal windows. https://www.objectivehtml.com/google-maps/fieldtype Use it like so... {exp:channel:entries channel="conf"} {conf_map parse="markers"} {markers} {marker:latitude}, {marker:longitude}...


1

Tags in params aren't going to be parsed unless you add this parameter: parse="inward" The parse order stuff is... hard to grok. Try adding that to your channel entry tag. https://docs.expressionengine.com/latest/templates/language.html#changing-parsing-order


1

If I use {file_name:json} it add qoutes to the begin and end but did not chance the %40 into @. Use url decode to fix the problem. Thanks


1

Probably need a dynamic="no" on your json tag.


1

You're not doing anything wrong here - you've just encountered a limitation of the template engine. If you read through the parse order in that link, you'll see that embedded templates are processed after PHP on output it processed - meaning that you cannot include the parsed contents of an embedded template inside of PHP output. If there are a lot of these ...


1

This sounds pretty good that their POS (is it just a POS? Not an ERP too?) has a rest API. That means that in the grand scheme of things it should be a nice job to push and pull data. There are a few ways to do things, but essentially, Cartthrob has hooks for most major events through the order process. You can simply fire off data to their API to inform ...


1

If it's not coming through, I'd bet it's malformed JSON, or more likely, your array structure is incorrect. https://ellislab.com/expressionengine/user-guide/development/usage/template.html#parsing-variables An easy way to test this is to dump your final array to the developer logger as json, and just compare the structure to how it should be as an array. ...


1

As we discus in comments, its most probable that you have this issue because server is not return correct charset (utf-8) by default. You can try next: for apache - add into .htaccess: AddDefaultCharset utf-8 for nginx: charset utf-8;


1

Forgive me if I'm misunderstanding, but I think Tag Caching on your query module call does what you're looking for. I'm sure Stash and CE Cache can be used here, too, if you wrap them around the query module tag.


1

I just implemented this on a project yesterday, and agree that the official docs/example is a bit skimpy on details. In any event... Create a file that includes your JSON object, prefixed with var stylez =, save it as "gmap-styles.js" in a place where your browser can see it. gmap-styles.js var stylez = [ { "featureType": "road.highway", "stylers": [ { "...


1

Assuming you're submitting the form via ajax and updating the content of the existing page(?), you could skip the complication of fetching the Freeform entry data and instead take the name and email address values directly from the DOM (the input elements) instead of the POST data, then inject them into the thank-you message content. If you're using jQuery ...


1

I'm not all that familiar with MX Notify, but I can't imagine why it's impacting the response given. You might try using Objective HTML's Postmaster instead. Being a commercial add-on it'll offer better support should you have any problems with it.


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