Jump to content

[Solucionado] El sistema no me carga los botones de guardar


grusso

Recommended Posts

Hola!

¿Has mirado que no tengas ningún error en la consola? Normalmente los problemas de este tipo en la ficha de producto vienen dados por errores con jQuery. Sin ir más lejos esta semana arreglé a un cliente algo similar y era por un módulo que cargaba de forma indiscriminada todos los plugin de jQuery.

  • Like 1
Link to comment
Share on other sites

Hola PS, gracias por tu respuesta. 

Como puedo hacer para revisar y corregir errores de consola? Pude llegar a activar los errores a través de cambiar de false a true lel archivo defines.inc.php

On 17/11/2017 at 4:14 AM, PSBlog said:

Hola!

¿Has mirado que no tengas ningún error en la consola? Normalmente los problemas de este tipo en la ficha de producto vienen dados por errores con jQuery. Sin ir más lejos esta semana arreglé a un cliente algo similar y era por un módulo que cargaba de forma indiscriminada todos los plugin de jQuery.

 

Link to comment
Share on other sites

Buenas,

Simplemente haz click con el botón derecho en esa pantalla y tu navegador te mostrará "Inspeccionar". Allí hay una pestaña que te muestra los errores que se hayan podido producirpor jQuery / Javascript.

Ahí es donde deberías mirar si hay algún error que hace que el resto de flujo de script no continue y, por lo tanto, se te queden los botones en loop.

Link to comment
Share on other sites

Si, me da estos errores

/gustavo/index.php?controller=AdminProducts&token=54e5d9a107ffb677ce80671039a9211e&id_product=50&action=Shipping&updateproduct&ajax=1&rand=1511455869975&_=1511455868228 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
products.js:177 Uncaught TypeError: Cannot read property 'replace' of undefined
    at Object.<anonymous> (products.js:177)
    at j (jquery-1.11.0.min.js:2)
    at Object.fireWith (jquery-1.11.0.min.js:2)
    at x (jquery-1.11.0.min.js:4)
    at XMLHttpRequest.b (jquery-1.11.0.min.js:4)

 

Ahora lo hice nuevamente y me muestra 4 errores

/gustavo/index.php?controller=AdminProducts&token=54e5d9a107ffb677ce80671039a9211e&id_product=3&action=Shipping&updateproduct&ajax=1&rand=1511466797345&_=1511466796288 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
products.js:177 Uncaught TypeError: Cannot read property 'replace' of undefined
    at Object.<anonymous> (products.js:177)
    at j (jquery-1.11.0.min.js:2)
    at Object.fireWith (jquery-1.11.0.min.js:2)
    at x (jquery-1.11.0.min.js:4)
    at XMLHttpRequest.b (jquery-1.11.0.min.js:4)
/gustavo/index.php?controller=AdminProducts&token=54e5d9a107ffb677ce80671039a9211e&id_product=3&action=Customization&updateproduct&ajax=1&rand=1511466797390&_=1511466796294 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
products.js:177 Uncaught TypeError: Cannot read property 'replace' of undefined
    at Object.<anonymous> (products.js:177)
    at j (jquery-1.11.0.min.js:2)
    at Object.fireWith (jquery-1.11.0.min.js:2)
    at x (jquery-1.11.0.min.js:4)
    at XMLHttpRequest.b (jquery-1.11.0.min.js:4)

 

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

Bueno, encontré una solución que al menos por el momento me funciona. Está en inglés. Lo transcribo

It is a very common problem of Prestashop 1.6.x.x.

What is the background of it?

Prestashop has a complex product editing page consisting of multiple tabs where information is loaded asynchronously (using Ajax). The "Save" and "Save & stay" buttons keeps spinning until all tabs are loaded successfully. If you have got any error in one of these tabs data - it will keep spinning long or forever.

There are these solutions

  1. Try another browser. To be sure it is not related with your browser (Javascript is relative to the browser) - try another one.

  2. Fix your Prestashop. Possibly you have an error in your Prestashop. It can be broken or outdated modules, broken or invalid data in the database, modified core Prestashop files etc. It is not easy to debug and fix it.

  3. Add a trick*. Caution! Do it if you are sure you have no other options. By adding this trick you can get some Javascript warnings while saving a new product but it won't produce data loss.

*Adding a trick

You are not going to edit core Prestashop files, but use overrides.

[yoursiteroot] - is a root folder of your Prestashop site. It can be public_html/ or else.

[youradmin] - is an admin folder of your Prestashop installation. It can be a sequence of random characters like smbcl5blanwcxnfs/ or anything else. You can see it while logged to your admin panel in the URL line: http://www.yoursite.com/[youradmin]/index.php?....

  1. Using FTP copy all .tpl files

    from [yoursiteroot]/[youradmin]/themes/default/template/controllers/products

    to [yoursiteroot]/override/controllers/admin/templates/products

    If this folder doesn't exist - create it exactly with all its path folders.

    (Optionally you can copy the same index.php file from that folder to all new folders you have created. It is just for the security reasons.)

  2. Find at the bottom of all these freshly copied files the same lines:

    <button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save'}</button>
    <button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save and stay'}</button>

    and change to:

    <button type="submit" name="submitAddproduct" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save'}</button>
    <button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save and stay'}</button>

    What exactly we have done with the code?

    Removed disabled="disabled".

    Replaced process-icon-loading with process-icon-save.

  3. Be sure in your site Backoffice settings Advanced parameters > Performance > Disable all overrides is set to No.

Disable all overrides is set to "No"

Done!

We hope Prestashop fix this awkward errors precaution in a future.

If you want to remove the trick - just remove all these added .tpl files

Link to comment
Share on other sites

  • 3 weeks later...

Encontré la solucion

Se deben agrandar los valores de Suhosin, de php esto les pedi a os técnicos del servidor

Valores de suhosin antes de hacer el cambio:
suhosin.request.max_vars = 2048
suhosin.post.max_vars = 2048

Valores de suhosin después de hacer el cambio:
suhosin.request.max_vars = 20000
suhosin.post.max_vars = 20000
max_input_vars = 20000

Puenden volver a aparecer problemas despues de un tiempo, pero vuelven a pedir que lo aumenten nuevamete y listo. Funciona perfecto.

 

Link to comment
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...