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.

Javascript causes Channel tags to not display

January 08, 2012 3:57pm

Subscribe [3]
  • #1 / Jan 08, 2012 3:57pm

    fxidesigns

    131 posts

    I am trying to implement a photo gallery using Galleria and Matrix on my site. 

    In the process I am having issues with JQUERY and getting it to run on my page. 

    I updated an existing template and added to links to my JS, but when I put a simple test script in the body, EE no longer renders any of the info in the BODY tags.

    So basically it seems that anytime I add a SCRIPT tag into template EE stop generating my channel tags.

    Please help.

    Code Below

    <head>
    script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js" /script
    script src="galleria/galleria-1.2.6.min.js" /script
    </head>
    
    <body>
    
    {exp:channel:entries channel="Content" limit="1"}
    
    
    <h1>{formatted_title}</h1>
    {body}
    
    
    {/exp:channel:entries}
    
            script
                $("body").text("jQuery works");
           /script
    
    </body>

    FYI I had to remove the <> around the script tags otherwise the forum removes them…..


    Joe

     

  • #2 / Jan 09, 2012 9:54am

    zizther

    228 posts

    Does it show without the JS?

  • #3 / Jan 09, 2012 9:59am

    fxidesigns

    131 posts

    Yep works perfectly without the JS.

  • #4 / Jan 09, 2012 11:22am

    zizther

    228 posts

    Is it being affected by any script tag or will it work if it was just the jQuery with no plugins.

    Not sure why any script tag would interfere with EE.

  • #5 / Jan 09, 2012 12:48pm

    fxidesigns

    131 posts

    Nope all js scripts cause the issue.

    Can anyone please help?!?  I’m desperate.

    FYI this happens on all my EE sites so I think this is a bug.

  • #6 / Jan 09, 2012 6:09pm

    fxidesigns

    131 posts

    How come its been over 24 hours, and no one from EE has responded?  How do I get support around here?

  • #7 / Jan 09, 2012 8:44pm

    Sean C. Smith

    3818 posts

    Hi fxidesigns,

    Sorry for the delay in responding. Weekends generally have slower response times. We respond to all support requests in the order they arrive in the queue.

    Your issue is definitely very unusual. Is the code above the exact code in your template? What version of EE are you using? When you have script tags in your template the page displayed is blank, correct? What do you see when you view source? Have you checked the page using firebug to see if there are any errors being reported? Could you turn on Template Debugging and post what you see when you view the page? You can turn this on by going to Admin > System Administration > Output and Debugging Preferences.

    Sean

  • #8 / Jan 09, 2012 10:10pm

    fxidesigns

    131 posts

    Hm… well guess what this has nothing to do with EE.  I tried using the VIEW SOURCE directly in an html page and the same thing happened.  I think the issue has to do with $(“body”).text(“jQuery works”);  I think that replaces all the BODY with the output from the script….

    So please ignore this is NOT an issue with EE.

  • #9 / Jan 10, 2012 6:29pm

    Sean C. Smith

    3818 posts

    Hi fxidesigns,

    Since it’s working, I’m going to close this thread. Don’t hesitate to post again when you need some more help.

    Sean

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

ExpressionEngine News!

#eecms, #events, #releases