Jump to content

[SOLVED] My custom AdminTab module is adding new records.... twice!?


Recommended Posts

Hi, I'm new here and new to using and developing for PrestaShop.

I've created a custom Admin Module to handle product reviews which all appears to be working smoothly apart from the fact that every time I create a new record it is being inserted into the database twice.

For the life of me I can't work out why this is happening. My assumption is that postProcess() is being called twice on the same page. I'm not sure why, or how this might be.

If anyone could shed any light on this I'd be grateful.


Share this post

Link to post
Share on other sites

  • 2 weeks later...

Actually, this turned out to be nothing to do with my code.

I think the double database insert is caused by some kind of bug in the way PrestaShop handles it's cookies.

I've started seeing this double record entry appearing more and more, and it's always when I've left my browser open for days on end. If I quit all browser windows then re-open and log back in to the Back Office the error goes away.

Hope that helps someone.

Share this post

Link to post
Share on other sites

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...

Important Information

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