Jump to content

Bug: Can not load product which generate after copy product


target46k2

Recommended Posts

Hi all, 
please kindly help me a problem 

 

when i create a new product by using copy function, 

 

Click to edit that product (which just generate) but product can not load, button Save alway loading and gray color

I inspect by Chrome tool it show many error:

 

the server responded with a status of 500 (Internal Server Error)
 
products.js:177 Uncaught TypeError: Cannot read property 'replace' of undefined
Code Line 177 as below:
if (request.responseText !== 'undefined' && request.responseText && request.responseText.length) {
    current_tab = $(request.responseText).filter('.product-tab').attr('id').replace('product-', '');
}

 

 
I can not repoduce the error on my local.
This error appear on server with information:
Prestashop: 1.6.1.5
 

Server infomation Linux #1 SMP Wed Feb 10 08:57:30 EST 2016 x86_64

Server: Apache

PHP Version 5.5.38

memory_limit 128M

max_execution_time 30

post-916943-0-71443400-1505372784_thumb.png

Edited by target46k2 (see edit history)
Link to comment
Share on other sites

I 've just try as turorial http://prestamania.com/prestashop-back-office-bug-not-saving-everytime/  

It's seem to ok sometime

Sometime it still not work, i think root cause is some product not loaded as in inspect (tool of chrome)

 

Please anyone help me with

Edited by target46k2 (see edit history)
Link to comment
Share on other sites

Go go go!

I've just find out the rootcause and the solution

 

Root cause: When edit a product, have many tab call to ajax to load data, so if hosting is weak so the bugs 500 or 400 appear

Solution: increase timeout from 0 to xxx mini second, in my case i change from time from 0 to 100

 

File: preshtashop\js\admin\product.js

/*In order to prevent mod_evasive DOSPageInterval (Default 1s)*/
var time = 100;
if (mod_evasive) {
    time = 1000;
}
Be happy!
Edited by target46k2 (see edit history)
  • Thanks 2
Link to comment
Share on other sites

  • 6 months later...
  • 1 year 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...