Jump to content

Product duplication - error 500/duplication failed


Italcom

Recommended Posts

As the title says - i am using Prestashop 1.7.5.2  PHP 7.1.33

When i try and duplicate a product, be it through mass action or its own specific product page, i am greeted by a "Duplication failed" (from the mass action) or a 500 internal server error (from the product page).

I am able to create new products, and the error 500 stops if i turn on debug mode: i get an "impossible to update settings" error in the page instead and no duplicated product.

 

Does anybody have any idea of what it could be or what i could do to find the problem (and the corresponding solution to this)?

Thanks in advance.

Link to comment
Share on other sites

Yes, i have tried that - i do not see any errors tho, instead of an error 500 it simply returns a red "impossible to update settings" in place of the green box once you try and duplicate from the product page. Duplicating as a mass action simply returns a "Duplication failed" message in the modal box.

Link to comment
Share on other sites

I put up a local staging copy of the website: it seems there i can't even duplicate - it creates copies with ID 0 that go in error 500 if i try to open them

i tried turning off every non-ps module, i tried switching to the base theme - no changes.

Link to comment
Share on other sites

  • 3 weeks later...

Any news? Here are some screenshots of the debug mode, it tells me this:

Quote

Attempted to call an undefined method named "duplicatePrices" of class "Product".
Did you mean to call e.g. "duplicateShops" or "duplicateTags"?

If I duplicate any product it gives me this error. Please help, thanks!!

 

Schermata 2020-09-30 alle 18.20.03.png

Schermata 2020-09-30 alle 18.20.05.png

Schermata 2020-09-30 alle 18.19.59.png

Link to comment
Share on other sites

In the original /src/Adapter/Product/AdminProductDataUpdater.php this line is missing. There are other differences too. 

So the question is where this is coming from. You might do a text search on your shop to see whether duplicatePrices can be found anywhere else in your code.

Link to comment
Share on other sites

  • 8 months 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...