Jump to content
Bryon Black

Saving product creates thousands of duplicate features

Recommended Posts

I recently ran into a bizarre issue. I have a product, with no combinations, but it has three attributes and one custom feature. The product has been in the system for a while, and I've edited the price, description, and photos several times already. Each time, everything went smoothy. This time when I saved, the custom feature that I had configured duplicated itself thousands of times. Within a few moments, the page displayed everyone's favorite 500 Internal Server Error.

Every time I tried to access that page, I got the 500 Internal Server Error.  I tried all the usual tricks for debugging PrestaShop, and the only thing I had were memory warnings in the log file stating that the application was asking for ridiculous amounts of memory and dying out. So, knowing that my server could handle just about anything, I temporarily set ini_set('memory_limit', '-1'); and set_time_limit(0);

Then, I clicked on the product in the dashsboard, sat back and waited about 5 minutes. When the page FINALLY rendered, that's when I saw the 2300 custom features.

To "fix" the product, I used some simple queries to remove the custom features from the following tables; ps_feature_valueps_feature_product and ps_feature_lang. The custom feature was repeated 2300 times  in each table, and thus was a very easily identified pattern in the DB.

Having no luck finding other posts in the forums about this, maybe my story would help others.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More