xertion Posted November 8, 2016 Share Posted November 8, 2016 (edited) We have an issue with saving or updating products in our store. When we create a new product, add name "HelloWorld" and try to save the product by clicking "Save and Stay", the page refreshes with a blank Name-field and the information added before clicking the Save button is gone. I've checked the following things: I've used Google Chrome's Network Tab to confirm that the POST request actually contains the new value. It does. I've double checked the MySQL database to make sure that there is no empty rows being created on the failed calls. This does not happen - no data is created or updated in the database on the failed calls. I've checked var/log/apache2/error.log for errors that fit the timestamp of when I save the product. No errors are reported. I've checked Google Chrome Console for Javascript errors. No Javascript error is output. I've checked var/log/mysql.log and var/log/mysql/error.log. No errors that match the timestamp is present. I've set define('_PS_MODE_DEV_', true); in defines.inc.php to see if any debug messages are output. There is no. In the case when we Update products, the old information is there after the page refresh. So the issue is not that it writes data to null, the problem is that it never write any data at all. If we repeat this process ~10 times it will sometime succeed with a green success message, but most of the time it fails without any error being returned in the frontend or in logs. I've encountered this on two separate installations of Prestashop (one 1.6.1.4 and one 1.6.1.5) on the same server. My suspicion is that there is something in the server environment, combined with bad error handling or a bug in Prestashop that cause this error. We've had the sites up and running since Prestashop 1.6.1.5 release without issues. These problems started happening just a few weeks ago but has persisted since then. We have not changed or updated the server either. I've asked the Server Admins to check if the server have run out of memory or storage in any of the partitions. It has not - all partitions is available so any temporary files created should have space available for them. At this point I feel like I've looked into it all but I still can't find the cause of the problem. Any ideas? Anyone ran into similar issues? Edited November 8, 2016 by xertion (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted November 8, 2016 Share Posted November 8, 2016 I think this is because Google Chrome have stopped "allowing" depracted commands. So old coding techniques are no longer tolerated. You may find that Chrome has recently updated itself to the latest version Link to comment Share on other sites More sharing options...
xertion Posted November 8, 2016 Author Share Posted November 8, 2016 I think this is because Google Chrome have stopped "allowing" depracted commands. So old coding techniques are no longer tolerated. You may find that Chrome has recently updated itself to the latest version This seem to be the correct answer to the issue. I tested with Firefox and it seems to work 100% of the time after I tried updating a product ~10 times or so. However - one thing that still is unanswered is how come Google Chrome would allow Prestashop to run the Javascript SOMETIMES but not all the time. As I described in the first post, if I save the product in Google Chrome 10 times, it might work once or twice. If it was just that Prestashop used deprecated/old methods it should not work at all. Confusing. Link to comment Share on other sites More sharing options...
s3rgio Posted November 8, 2016 Share Posted November 8, 2016 (edited) I tried these modifications over 1.6.1.6 and it is working perfect after some days: https://github.com/PrestaShop/PrestaShop/pull/6749/commits/73fd8dbed9f413a70f7d04fc4badd48f00ca501a Lots of users reports the same over newer versions. Edited November 8, 2016 by s3rgio (see edit history) Link to comment Share on other sites More sharing options...
brookny Posted June 5, 2017 Share Posted June 5, 2017 Hi, This old comment already but I have same problem with prestashop 1.6.1.13. How I fix these syntax errors here https://github.com/P...badd48f00ca501a? Link to comment Share on other sites More sharing options...
Jamjo Posted June 23, 2017 Share Posted June 23, 2017 so does this mean we cant use google chrome anymore? Link to comment Share on other sites More sharing options...
cracked Posted June 23, 2017 Share Posted June 23, 2017 Hi, This old comment already but I have same problem with prestashop 1.6.1.13. How I fix these syntax errors here https://github.com/P...badd48f00ca501a? which syntax errors do you mean? so does this mean we cant use google chrome anymore? You can use google chrome. I do and it works just fine. But we had to make some code changes too. Link to comment Share on other sites More sharing options...
oracle178 Posted July 28, 2017 Share Posted July 28, 2017 Hi all, This crash error occurs only when you click on the <i> item (icon) <button type="submit" name="submitAddproduct" class="btn btn-default pull-right"><i class="process-icon-save"></i> Save</button> If you press the bottom of the button where the text is located or the sidebar around the icon where the padding is located, the storage function will work. Link to comment Share on other sites More sharing options...
DeParagon Posted May 25, 2019 Share Posted May 25, 2019 On 7/28/2017 at 12:56 PM, oracle178 said: Hi all, This crash error occurs only when you click on the <i> item (icon) <button type="submit" name="submitAddproduct" class="btn btn-default pull-right"><i class="process-icon-save"></i> Save</button> If you press the bottom of the button where the text is located or the sidebar around the icon where the padding is located, the storage function will work. Good After the last line of informations.tpl you can add this <script type="text/javascript"> $(document).ready(function(){ $('body').on('click', 'i.process-icon-save', function(ev){ ev.preventDefault(); $(this).parent().trigger('click'); }); }); </script> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now