dthos Posted August 23, 2010 Posted August 23, 2010 Hi there, I'm new to all this so not too sure if i'm posting in the right place. I have just updated my header tags seo for version 3.2.3, I have installed the contribution and ran into a little problem the shop side is ok and shows up correctly but when i go into the admin and then go to catalog it says: Parse error: syntax error, unexpected T_ELSE in /home/mystore/public_html/admin/categories.php on line 1026 when i open up categories.php then these are the lines echo tep_draw_hidden_field('products_image', stripslashes($products_image_name)); echo tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . ' '; if (isset($HTTP_GET_VARS['pID'])) { echo tep_image_submit('button_update.gif', IMAGE_UPDATE); } else { echo tep_image_submit('button_insert.gif', IMAGE_INSERT); } echo ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr> </table></form> <?php } } else { ( <- this is line 1026?) ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('search', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); echo tep_hide_session_id() . '</form>'; ?> </td> </tr> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); echo tep_hide_session_id() . '</form>'; ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $categories_count = 0; $rows = 0; if (isset($HTTP_GET_VARS['search'])) { $search = tep_db_prepare_input($HTTP_GET_VARS['search']); I have very little (none) php knowledge but have compared the lines with what i believe to be a clean install and they appear the same also as far as i'm aware these lines have not been changed and worked prevoiusly with the earlier version of header tags. I thank you in anticipation of all help recieved. regards, Dylan Quote
♥FWR Media Posted August 23, 2010 Posted August 23, 2010 (edited) I have very little (none) php knowledge but have compared the lines with what i believe to be a clean install and they appear the same also as far as i'm aware these lines have not been changed and worked prevoiusly with the earlier version of header tags. I thank you in anticipation of all help recieved. regards, Dylan There is not enough code shown above the problem in order to be able to offer a solution. The problem is that an opening brace ( { ) in a else statement or any code block must have a matching closing brace ( } ) yours doesn't .. probably the best idea would be to load a back up of the file and affect the changes required by the contribution again. A good code block looks like: - if ( $whatever_here ) { // do something } elseif ( $whatever_here ) { // do something else } else { // If none of the above do this } Each opening brace has a closing brace. Edited August 23, 2010 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
signsfor Posted August 23, 2010 Posted August 23, 2010 Hi there, I'm new to all this so not too sure if i'm posting in the right place. I have just updated my header tags seo for version 3.2.3, I have installed the contribution and ran into a little problem the shop side is ok and shows up correctly but when i go into the admin and then go to catalog it says: Parse error: syntax error, unexpected T_ELSE in /home/mystore/public_html/admin/categories.php on line 1026 when i open up categories.php then these are the lines echo tep_draw_hidden_field('products_image', stripslashes($products_image_name)); echo tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . ' '; if (isset($HTTP_GET_VARS['pID'])) { echo tep_image_submit('button_update.gif', IMAGE_UPDATE); } else { echo tep_image_submit('button_insert.gif', IMAGE_INSERT); } echo ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr> </table></form> <?php } } else { ( <- this is line 1026?) ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('search', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); echo tep_hide_session_id() . '</form>'; ?> </td> </tr> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); echo tep_hide_session_id() . '</form>'; ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $categories_count = 0; $rows = 0; if (isset($HTTP_GET_VARS['search'])) { $search = tep_db_prepare_input($HTTP_GET_VARS['search']); I have very little (none) php knowledge but have compared the lines with what i believe to be a clean install and they appear the same also as far as i'm aware these lines have not been changed and worked prevoiusly with the earlier version of header tags. I thank you in anticipation of all help recieved. regards, Dylan Quote
signsfor Posted August 23, 2010 Posted August 23, 2010 I just had this error. My install was over an operational cart so I had to copy, paste and overwrite code changes. It turns out that right around line 1000 in the code I did not overwrite the old code but simply did a paste below it. Grab a cup of coffee, turn off email and check your update once very carefully. Good luck! Quote
dthos Posted August 23, 2010 Author Posted August 23, 2010 I just had this error. My install was over an operational cart so I had to copy, paste and overwrite code changes. It turns out that right around line 1000 in the code I did not overwrite the old code but simply did a paste below it. Grab a cup of coffee, turn off email and check your update once very carefully. Good luck! Thank you for taking the time and for such a quick response. best regards, Dylan Quote
dthos Posted August 23, 2010 Author Posted August 23, 2010 There is not enough code shown above the problem in order to be able to offer a solution. The problem is that an opening brace ( { ) in a else statement or any code block must have a matching closing brace ( } ) yours doesn't .. probably the best idea would be to load a back up of the file and affect the changes required by the contribution again. A good code block looks like: - if ( $whatever_here ) { // do something } elseif ( $whatever_here ) { // do something else } else { // If none of the above do this } Each opening brace has a closing brace. Thanks for such a speedy reply I have now done it using a clean file as you suggest, the offending code does still seem to be present but it does now appear to work. Thank you for your time. best regards, Dylan Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.