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.

Syntax Errors After 2.5.2 Update

June 28, 2012 3:19pm

Subscribe [4]
  • #1 / Jun 28, 2012 3:19pm

    risdgd

    6 posts

    I updated to 2.5.2 from 1.6.2. The installation went smoothly but now I’m getting syntax errors:

    Error

    The following tag has a syntax error:

    {exp:gallery:entries}

    Please correct the syntax in your template.


    I’m not an EE guru, didn’t set this site up. I don’t understand how a syntax error can bring a website down.

  • #2 / Jun 28, 2012 7:47pm

    MadWebDesigns

    147 posts

    Hi risdgd,

    This sounds like you have an add-on/module installed that needs to be updated to work with EE 2.5.2. Do you know which modules/add-ons you have installed?

    Mike

  • #3 / Jun 29, 2012 9:21am

    risdgd

    6 posts

    I updated the modules, also enabled and disabled the extensions. No change.

    There are two plugins installed: Magpie RSS Parser and XML Encode.

    Here is a template which has the {exp:gallery:entries} code:

    {embed="gallery/.gallery_header"}
    <div class="rightside">
    {exp:gallery:entries gallery="events" orderby="date" sort="desc" columns="5" rows="7" paginate="bottom"}
    {entries}
    {row_start} {/row_start}
    {row}
    <div class="galleryblock">
    <a href="http://{image_url}">{caption}" title="{title}" rel="lightbox[events]">_{exp:imgsizer:size src="{image_url}"  width="90" height="90" border="0" alt="{title}" }</a>
    </div>
    {/row}
    {row_end} {/row_end}
    {/entries}
    {paginate}
    <div class="spacer"></div>
    <div class="backtotop">
    {if previous_page}
    <a href="http://{auto_path}">« previous page</a>  
    {/if}
    {if next_page}
    <a href="http://{auto_path}">more images »</a>
    {/if}
    </div>
    {/paginate}
    {/exp:gallery:entries}
    </div>
    {embed="includes/.footer"}

  • #4 / Jun 29, 2012 9:28am

    Boyink!

    5011 posts

    That’s the native 1X gallery module, which didn’t get included in EE2.  There’s been talk of a migration tool but we haven’t seen it yet.

    In the short term you’ll have to remove that code from the template to get the site to load (minus the photo gallery).

  • #5 / Jun 29, 2012 11:25am

    risdgd

    6 posts

    Would I remove every instance of “gallery” in the code? Could you possibly mark up the code so I know what to delete? Many thanks.

  • #6 / Jun 29, 2012 11:35am

    Boyink!

    5011 posts

    EE works by processing tag pairs - in this case {exp:gallery:entries} {/exp:gallery:entries}.  What this does is instruct EE’s brain to find the gallery module (which is now missing) and do what’s in between the tags.  In this case it’s get the images and mark them up as you see.

    So basically you need to remove the tag pairs and everything in between, so as EE reads through the code it doesn’t try to use a Module that’s no longer in the system. 

    You can also try commenting it out - :

    {!-- {exp:gallery:entries].......{/exp:gallery:entries} --}
  • #7 / Jun 29, 2012 1:26pm

    Shane Eckert

    7174 posts

    Hey risdgd,

    I am glad that Mike has been able to help you!

    Is there anything else I can do to help?

    Cheers,

  • #8 / Jul 02, 2012 1:40pm

    risdgd

    6 posts

    Commenting out the instances of the gallery module got me to the home page. Now I have another problem. All my links are dead. I’m getting this error:

    The system path does not appear to be set correctly. Please open your path.php file and correct the path.

    I compared the new path.php file with the old one from EE 1.6.2 and they look the same. You can view the home page here: gdrisd.com.

     

  • #9 / Jul 03, 2012 4:43pm

    Shane Eckert

    7174 posts

    Hey risdgd,

    Did you follow the update guide when updating?

    Can you tell me what you have for $system_path variable in the main index.php file?

    Did you rename your system folder?

    Please let me know!

    Cheers,

  • #10 / Jul 05, 2012 8:36am

    risdgd

    6 posts

    Yes I followed the update guide.

    The system folder was renamed ‘core’. This was the name of the system folder the original developer used.

    Here is the main index.php:

    <?php
    
     $system_path = './core';
    
    
    
     $debug = 0;
    
    /*
     * --------------------------------------------------------------------
     *  CUSTOM CONFIG VALUES
     * --------------------------------------------------------------------
     *
     * The $assign_to_config array below will be passed dynamically to the
     * config class. This allows you to set custom config items or override
     * any default config values found in the config.php file.  This can
     * be handy as it permits you to share one application between more then
     * one front controller file, with each file containing different 
     * config values.
     *
     * Un-comment the $assign_to_config array below to use this feature
     *
     * NOTE: This feature can be used to run multiple EE "sites" using
     * the old style method.  Instead of individual variables you'll
     * set array indexes corresponding to them.
     *
     */
    // $assign_to_config['template_group'] = '';
    // $assign_to_config['template'] = '';
    // $assign_to_config['site_index'] = '';
    // $assign_to_config['site_404'] = '';
    // $assign_to_config['global_vars'] = array(); // This array must be associative
    
    
    /*
     * --------------------------------------------------------------------
     *  END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE
     * --------------------------------------------------------------------
     */
    
    
    /*
     * ---------------------------------------------------------------
     *  Disable all routing, send everything to the frontend
     * ---------------------------------------------------------------
     */
     $routing['directory'] = '';
     $routing['controller'] = 'ee';
     $routing['function'] = 'index';
    
    /*
     * --------------------------------------------------------------------
     *  Mandatory config overrides
     * --------------------------------------------------------------------
     */
     $assign_to_config['subclass_prefix'] = 'EE_';
    
    /*
     * --------------------------------------------------------------------
     *  Resolve the system path for increased reliability
     * --------------------------------------------------------------------
     */
    
     if (realpath($system_path) !== FALSE)
     {
      $system_path = realpath($system_path).'/';
     }
    
     // ensure there's a trailing slash
     $system_path = rtrim($system_path, '/').'/';
    
     // Is the sytsem path correct?
     if ( ! is_dir($system_path))
     {
      exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
     }
    
    /*
     * --------------------------------------------------------------------
     *  Now that we know the path, set the main constants
     * --------------------------------------------------------------------
     */ 
     // The name of THIS file
     define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
    
     // The PHP file extension
     define('EXT', '.php');
    
      // Path to the system folder
     define('BASEPATH', str_replace("\\", "/", $system_path.'codeigniter/system/'));
     
     // Path to the "application" folder
     define('APPPATH', $system_path.'expressionengine/');
     
     // Path to the front controller (this file)
     define('FCPATH', str_replace(SELF, '', __FILE__));
     
     // Name of the "system folder"
     define('SYSDIR', trim(strrchr(trim(str_replace("\\", "/", $system_path), '/'), '/'), '/'));
    
     // The $debug value as a constant for global access
     define('DEBUG', $debug);  unset($debug);
    
    /*
     * --------------------------------------------------------------------
     *  Set the error reporting level
     * --------------------------------------------------------------------
     */ 
     if (DEBUG == 1)
     {
      error_reporting(E_ALL);
      @ini_set('display_errors', 1);
     }
     else
     {
      error_reporting(0); 
     }
    
    /*
     *---------------------------------------------------------------
     * LOAD THE BOOTSTRAP FILE
     *---------------------------------------------------------------
     *
     * And away we go…
     *
     */
     require_once BASEPATH.'core/CodeIgniter'.EXT;
    
    /* End of file index.php */
    /* Location: ./index.php */
  • #11 / Jul 05, 2012 1:53pm

    Shane Eckert

    7174 posts

    Hey risdgd,

    So your system folder is renamed, right? Core is a funny name for system directory. When you look via FTP, are you seeing a system folder there?

    path.php no longer exists in 2.X. Where we set the path is in index.php and admin.php.

    In your config.php file, can you tell me what version it says you are on? Should be =“252”.

    Thank you,

     

  • #12 / Jul 05, 2012 2:34pm

    risdgd

    6 posts

    So your system folder is renamed, right? Core is a funny name for system directory. When you look via FTP, are you seeing a system folder there?

    Should I rename the system folder?
    I see the ‘core’ folder, but no system folder either in the main directory or in the ‘core’ (system) folder.

    path.php no longer exists in 2.X. Where we set the path is in index.php and admin.php.

    Admin.php path: $system_path = ‘./core’;
    Index.php path: $system_path = ‘./core’;

    In your config.php file, can you tell me what version it says you are on? Should be =“252”.

    I don’t see a config.php file but the version of EE I am running is 2.5.2.
    Any chance we can discuss this over the phone? Might be quicker to diagnose.
    Many thanks, Shane.

  • #13 / Jul 05, 2012 2:38pm

    Shane Eckert

    7174 posts

    Hello risdgd,

    At this time we do not offer phone support.

    The config file is in system/expressionengine/config/config.php.

    If the system folder was renamed to core, then that makes sense.

    So the version number on the dashboard does read as 2.5.2?

    When you ran the Server Wizard before upgrading, did it pass all the tests?

    Cheers,

  • #14 / Jul 05, 2012 3:09pm

    risdgd

    6 posts

    config.php verision is 252

    Site is being hosted by enginehosting.com so I would think it would pass the server wizard. I don’t remember if I ran it.

    Let me know if there’s anything else I should try. Reinstall?

  • #15 / Jul 05, 2012 4:30pm

    Shane Eckert

    7174 posts

    Hey risdgd,

    I would like to take a quick look and see if I can find a quick resolution.

    Please be on the lookout for an email from EllisLab.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases