Jump to content
thirty bees forum
  • 0

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


Question

Posted

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.

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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/spinningsaveerror-with-override.zip - I just renamed the new field from "secondreference" to "kodvyrobce".

  • 0
Posted

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

  • 0
Posted

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?

  • 0
Posted

I will have to have a look at the log. 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

  • 0
Posted

@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

  • 0
Posted

@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] [mpmwinnt: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] [mpmwinnt: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] [mpmwinnt: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] [mpmwinnt:notice] [pid 408:tid 628] AH00354: Child: Starting 150 worker threads.

  • 0
Posted

@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

  • 0
Posted

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

  • 0
Posted

My xampp/php 7.013 is not creating the log file. phpinfo: displayerrors On displaystartuperrors On htmlerrors On logerrors On errorlog D:\Dev\xampp7013\php\logs\phperrorlog the phperrorlog 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...

  • 0
Posted

@luksl

errorlog D:\Dev\xampp7013\php\logs\phperror_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.

  • 0
Posted

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)

  • 0
Posted

@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

  • 0
Posted

I dont know how to get what you need. I tried on Windows 10/Xampp 7.013 TB 1.01 - when I use this override I am always stuck on the spinning button in Product/Edit page in Admin area. There is no log PHP file eventhough the PHP ini set up seems to be ok. I get the spinning button always when the new product field is not empty, sometimes it is ok when the filed is empty. I also installed Wampp 3.0.6 (PHP 5.6.25, MySQL 5.7.14), and noticed there is the spinning save button problem as well but just in about every third case. The PHP log file contains just errors that occured during installation of TB (I shared the file here). I think it should be possible to reproduce the spinning save button problem on any Windows/Xampp (7.013) with that override as I have used untouched Xampp and fresh TB 1.01 installation with that override. I guess the problem should occur always. There is no spinning save button problem on PS 1.6.1.12 on the same server with the same override. I discovered PS used to have this problem too TB have probably been forked before they fixed it.

  • 0
Posted

@yaniv14 I have no log folder insideTB/Admin folder but have Log folder straight in TB root folder. I cleared cache. And set up Template compilation = Force compilation, Cache = no, Debug mode = yes

  • 0
Posted

I am surprised no one is able to help with this thing. I discovered that the problem has nothing to do with the override but with the settings Template compilation = Force compilation and Smarty. It might be specific for Windows/xampp and wampp platform.

  • 0
Posted

@roband7 I thought so. As you say it should be tested on Windows as well. I know there are much more servers with some kind of Linux than Windows (Server) but Windows Servers are common too. I have on my Laptop Windows 10 so I decided to use Xampp for development as it is easy to install and use. I dont know yet if my project will be run on Linux or Windows server finally.

  • 0
Posted

@mdekker I really like and appreciate the idea of the TB team. I liked PS 1.6 but not 1.7 so when I came accross TB I decided to switch to TB. But at the moment I am having hard time continue with the project (because of this error). Regarding this error PS 1.6.1.12 has no problem (when Template compilation = Force compilation Save (and Stay) works but it´s doesnt in TB. What I discovered so far it´s seem it has something to do with Smarty - folder vendor in TB root dir.

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