the Save (and Stay) button spinning after adding an override



  • I need more product fields so I’ve created an override as is described here: https://www.teapot.co.uk/adding-new-field-products-prestashop-1-6/ . After adding the override, the button Save (and Stay) is just spinning. Sometimes it’s not spinning on a product which have no custom field filled yet but once I fill the field and Save the change, the button is spinning ever since. I used the override on a fresh install of TB 1.01. This override seems to work with PS 1.6.1.12 with no problems. I am using XAMPP 7.013, Chrome and Firefox.


  • Global Moderator

    You probably made some error in the override you created.

    Check the serverside log for PHP errors.

    Check the browser console log for Javascript errors.


  • Global Moderator

    Using overrides is a bad idea. They replace the entire class, which means one has to re-do them with virtually every new release. A much better strategy is to use hooks.



  • I tried to follow the tutorial exactly and checked several time for errors, used the same override files with PS 1.6.1.12 without a problem. I can send the override files - cannot find any mistake I could make. I packed the override folder and added some screenshots - you can download it here. http://poly.cz/tb/spinning_save_error-with-override.zip - I just renamed the new field from “second_reference” to “kod_vyrobce”.



  • @Traumflug I searched for a tuts on how to add a new filed to product but could just find the one with override. I dont know how to add a new field to product with a hook. I guess it is not hard though. Could you help me/us on that? I believe more people would appreciate that. :-)

    Still I wonder why the override is working in PS 1.6.1.12 and not in TB 1.01.


  • Global Moderator

    So you did both of these and didn´t find any errors?

    Check the serverside log for PHP errors.
    Check the browser console log for Javascript errors.

    And what about the serverside HTTP access log, do you see any unexpected requests there returning 500 or 404 errors?



  • @roband7 Yes, there are two 500 errors I added the screenshot of firebug in the zip file I shared.


  • administrators

    Just tried the tutorial and it works fine here, so there’s nothing wrong with that.

    Your answer will probably be in the server’s error log.



  • This post is deleted!


  • @mdekker

    I will have to have a look at the log.
    But how come it is working with PS 1.6.1.12 but not with TB 1.01 on the same server? I use XAMPP 7.013



  • @mdekker

    Apache error log:
    [Tue Jun 06 15:46:38.822618 2017] [ssl:warn] [pid 9176:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Tue Jun 06 15:46:38.893649 2017] [core:warn] [pid 9176:tid 564] AH00098: pid file D:/Dev/xampp7013/apache/logs/httpd.pid overwritten – Unclean shutdown of previous Apache run?
    [Tue Jun 06 15:46:38.998724 2017] [ssl:warn] [pid 9176:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Tue Jun 06 15:46:39.046777 2017] [mpm_winnt:notice] [pid 9176:tid 564] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.13 configured – resuming normal operations
    [Tue Jun 06 15:46:39.046777 2017] [mpm_winnt:notice] [pid 9176:tid 564] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:09:37
    [Tue Jun 06 15:46:39.046777 2017] [core:notice] [pid 9176:tid 564] AH00094: Command line: ‘d:\dev\xampp7013\apache\bin\httpd.exe -d D:/Dev/xampp7013/apache’
    [Tue Jun 06 15:46:39.064790 2017] [mpm_winnt:notice] [pid 9176:tid 564] AH00418: Parent: Created child process 408
    [Tue Jun 06 15:46:40.439743 2017] [ssl:warn] [pid 408:tid 628] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Tue Jun 06 15:46:40.630878 2017] [ssl:warn] [pid 408:tid 628] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Tue Jun 06 15:46:40.680916 2017] [mpm_winnt:notice] [pid 408:tid 628] AH00354: Child: Starting 150 worker threads.


  • administrators

    See if you can find the 500 errors not the 4xx



  • @mdekker
    When I run Apache there are just new lines I sent here in Apache error log.

    I can find 500 error in Net section of Firebug:
    file0_1496758493248_firefox-firebug-tb-error.PNG

    There some errors in the console of Firebug:0_1496758550316_firefox-firebug-console-tb-error.PNG

    0_1496758563375_header error 1.PNG

    0_1496758577709_header error 2.PNG


  • Global Moderator

    @luksl What we need in order to help you is the server-side PHP error log. This will typically contain a PHP stacktrace for each of the 500 errors.



  • This post is deleted!


  • My xampp/php 7.013 is not creating the log file. phpinfo:
    display_errors On
    display_startup_errors On
    html_errors On
    log_errors On
    error_log D:\Dev\xampp7013\php\logs\php_error_log
    the php_error_log file doesnt exist
    I cannot find why…

    So I decided to install wampp to check if wampp 3.0.6/php 5.6.25/myslq 5.7 will create a log file. I wondered if there will be the same error with spinning Save (and Stay) button after adding override. Unfortunatelly I have got the same problem with spinning buttons - fresh install of wampp server and fresh install of TB 1.01 … just switched off cache, switched on force compilation, switched on debug mode, added the override and column in product table - while adding new column to product table I´ve got another error in PMA - see the pictures (I have to change the default value of available_date column to None to be able to add new column - I haven´t got this error with Xampp/MariaDB/PMA).
    In PHP log file are just some errors from installation…




  • Global Moderator

    @luksl

    error_log D:\Dev\xampp7013\php\logs\php_error_log

    If you’re running this in Linux you cannot use Windows style files names. Replace that with a Linux style file name and you’ll get your logfile.



  • I run it on Windows 10, the path for the log file (and the file name) was in PHP.ini right after installation of Xampp. I didnt change it. But as you can see there is not much in log from wampp (just errors that occured during installation of TB)


  • Global Moderator

    @luksl

    MySQL 5.7.4 and greater by default disallows 0000-00-00 as dummy date.

    There’s more info about this and some suggested alternatives and workarounds here:
    https://stackoverflow.com/questions/36374335/error-in-mysql-when-setting-default-value-for-date-or-datetime


Log in to reply
 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.