Jump to content

Products missing from BO, but are displayed fine in the FO


Recommended Posts

Hello to all !!!

This is something i have to deal with for the first, and i hope the last time in the framework.

I was editing some particular products through the Back Office. After saving the settings, i was using the 'go back' button of the browser. After doing that a few times, i noticed something really weird.

Something that i do not believe many people have ever seen!!!!!

All of the products from a particular sub-category are missing!!! They simply do not display in the 'Catalogue' in the BO.

As far as i know, products are using records from the same table, in order to display both in the website and the BO. These records DO exist in my database and no changes have occurred whatsoever......

They are displayed fine in the website but i can not access (see) them in the BO.

I'm sure this is extremely peculiar situation and not many people would know about this. I just thought to post this issue for the shake of information and maybe someone knows a bit more about it.

I'm sure this is a Prestashop bug and has to do with the way it deals with cookies, but i really cant get my head around it !!!

Best Regards to all!

Link to comment
Share on other sites

Firebug error log - with picture attached :


500 - Internal Server Error

http://MYDOMAIN/MY_ADMIN_FOLDER/index.php?tab=AdminCatalog&id_category=5&viewcategory&token;=f338d1a6488526ce09ac52cf9b726370




Does anyone know how to deal with Tokens in Prestashop?

Thanks!

15403_xigrSejN3xAZCdPHlqpI_t

Link to comment
Share on other sites

  • 1 month later...

Hi

I had exactly the same problem. Having looked into it I found out that the problem is caused due to memory limits. In the table that is not displayed correctly a miniaturized image is shown for every product. When the table is being generated it is checked whether the miniaturized image for a given product to show already exists. If that's not the case a new miniaturized image is generated. It's this operation that might cause problems. If the image that has to be resized has a high resolution (mine was 3264x2448 px big) it might happen that the resize operation fails because the operations exceeds the amount of memory that a PHP script is allowed to allocate (configured in php.ini).

There are two ways you can handle this problem:

A) Download the images that belong the product that causes the problem onto your computer. (Through FTP). The image that you have to download are located in /img/p and start with the id of the product. According to your screenshot it's the product with id 134. You should therefore find at least one image with the name 134-XX.jpg where XX is an number. Having done that resize the images you just downloaded locally on your computer (e.g. with Gimp or any other suitable tool) and upload them again replacing the images on the server. Resizing should work now, even with limited memory.

B) Faster, easier and working for every image (without having to touch all images that cause problems) is the following approach: Add the following line after line 15 in the file /images.inc.php:

ini_set('memory_limit',"128M");



So you'll have:

..
if (!file_exists(_PS_TMP_IMG_DIR_.$cacheImage))
{
   ini_set('memory_limit',"128M");
   $imageGd = ($imageType == 'gif' ? imagecreatefromgif($image) : imagecreatefromjpeg($image));
..

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...