Jump to content



Latest News: (loading..)

- - - - -

Product Preview in Admin Suddenly NOT Working, HELP!


  • Please log in to reply
4 replies to this topic

#1   theantiquestore

theantiquestore
  • Members
  • 619 posts
  • Real Name:Rachael
  • Gender:Female

Posted 25 June 2012 - 07:19 PM

I havent changed any code but today when I click product preview in the admin I am getting a page not found error. Could this be some server software update that is causing my code to no longer work? Do you see anything wrong with this?

echo tep_draw_form('new_product', FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] :
			 '') . '&action=new_product_preview', 'post', 'enctype="multipart/form-data"');
			 ?>

<?php
			 echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added :
			 date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . '<td class="main" align="right"><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>';
			 ?>


#2   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,723 posts
  • Real Name:Chris
  • Gender:Male
  • Location:Ontario, Canada

Posted 25 June 2012 - 07:22 PM

@theantiquestore

What version of osCommerce are you using ?  Did you check to see if your hosting provider has updated the server software ?  You have a modified categories.php file, were the changes done recently ?



Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile (click here)

#3   theantiquestore

theantiquestore
  • Members
  • 619 posts
  • Real Name:Rachael
  • Gender:Female

Posted 25 June 2012 - 07:30 PM

I believe its a heavily modified 2.3, I have not modified the categories.php since 2011 and I am trying to find out what changed on the server.

#4   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,723 posts
  • Real Name:Chris
  • Gender:Male
  • Location:Ontario, Canada

Posted 25 June 2012 - 07:53 PM

@theantiquestore

If you are using v2.3.1 then the site IS PHP 5.3 compatible so I doubt the issue would be server software.

However, the categories.php is not coded properly for v2.3.1.  The preview button code should appear like this:

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a>&nbsp;' . $products['products_name']; ?></td>

So, I suggest correcting the coding issue which could have been introduced through an out-dated contribution added to the categories.php file.


Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile (click here)

#5   theantiquestore

theantiquestore
  • Members
  • 619 posts
  • Real Name:Rachael
  • Gender:Female

Posted 25 June 2012 - 07:57 PM

I did a rebuild of apache and php on the server and it fixed itself.