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.

EE template code appearing in output

June 14, 2013 6:26pm

Subscribe [1]
  • #1 / Jun 14, 2013 6:26pm

    usclib

    6 posts

    We just upgraded our server to Apache v2.2.24 and PHP 5.3.25. One of our templates is now outputting EE template code. It looks like maybe a parsing issue conflicting with JSON code being output? Here’s a snippet of the source code output—note the if statement :

    $("#directory_map").goMap({
     latitude: 34.02421,
            longitude: -118.068695,
            icon: "http://lib-php-dev.usc.edu/laassubject/images/site_images/pin.png",
            hideByClick: false,
            maptype: "ROADMAP",
            zoom: 9,
            markers: [
     
     {if "34.0546" != 0 OR "34.0546" != ""} 
      {
       latitude: 34.0546,
       longitude: -117.184,
       title: "A.K. Smiley Public Library",
       html: 
       {
        content: "<a href="http://lib-php-dev.usc.edu/laassubject/index.php/directory/profile/a.k._smiley_public_library">A.K. Smiley Public Library</a>"
       }
      },
    
     {/if}
    ]
        });

    and here’s the template code:

    $("#directory_map").goMap({
     latitude: 34.02421,
            longitude: -118.068695,
            icon: "{site_url}images/site_images/pin.png",
            hideByClick: false,
            maptype: "ROADMAP",
            zoom: 9,
            markers: [
     {exp:channel:entries channel="directory" disable="categories|category_fields|member_data|pagination" limit="1000" status="open" dynamic="no" orderby="title" sort="asc"}
     {if dir-latitude != 0 OR dir-latitude != ""}
      {
       latitude: {dir-latitude},
       longitude: {dir-longitude},
       title: "{title}",
       html: 
       {
        content: "<a href="http://{url_title_path=directory/profile}">{title}</a>"
       }
      }
     {/if}
     {/exp:channel:entries}
     ]
        });

    Thanks in advance for any help.

  • #2 / Jun 14, 2013 7:55pm

    usclib

    6 posts

    Never mind, I don’t think the template code was the problem; it was a data issue. Disregard this post.

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

ExpressionEngine News!

#eecms, #events, #releases