ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

curly braces not parsed properly inside of javascript embeds

August 11, 2011 12:40pm

Subscribe [2]
  • #1 / Aug 11, 2011 12:40pm

    northk

    51 posts

    This question may be related to a resolved thread.

    Greetings, I believe I am having a similar problem as reported in the above thread. I have a javascript embed that EE does not parse properly. Here is the code from my embed:

    {exp:channel:entries channel="home" dynamic="no" disable="categories|member_data|pagination" limit="1"}
    // following two lines do not parse correctly
            var params = { allowScriptAccess: "always" };
            var atts = { id: "video-player-ID" };
            ...more stuff here…
    {/exp:channel:entries}

    Instead the two vars are rendered without anything inside curly braces, so the code looks like this:
    var params = ;
    var atts = ;

    This causes a Javascript parsing error. So I modified system/expressionengine/config/config.php so it has:
    $config[‘debug’] = “1”;

    This appears to solve the problem. But, I’m wondering if there are ramifications to this which I should know about. For example performance or security (or other parsing) implications. I’m also wondering if this will still work when I upgrade to a newer version of EE (I’m on 2.2.1 right now). Please let me know.

    Thanks,
    -NorthK

  • #2 / Aug 12, 2011 4:56am

    John Henry Donovan

    12339 posts

    NorthK ,

    Debug should be set to 1 and is what is there by default if you install from scratch.
    There are no ramifications from this. Your parsing works as a result of this.

    An upgrade will be no issue for you.

    Does that help?

  • #3 / Aug 12, 2011 11:38am

    northk

    51 posts

    John Henry,

    OK thanks. That’s what I wanted to hear!

    -North

  • #4 / Aug 12, 2011 5:30pm

    John Henry Donovan

    12339 posts

    No problems. If you run into any issues feel free as always to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases