Jump to content
5ummer5

Saving an edited product - Does not save changes or show updated message

Recommended Posts

Hi all,

 

I have been going round and round AND ROUND in circles about this issue for a while now and still cannot solve it.  I will be as detailed as I can about the issue.

 

 

Overview

 

I have a multistore install setup with 2 shops

I run prestashop 1.6.1.6

 

 

The issue

 

When editing a product (in either store) it doesn't save the information I just entered when clicking "Save and Stay" OR "Save".  It just reloads the page without the information I just entered.

 

It only manages to save the information every so often, intermittently, there doesn't seem to be a pattern, it just saves when it wants to.  As you can imagine this make maintaining the store with over 2k products almost an impossible task as it take a whole day to update only a few products because of the constant re-entry needed.

 

 

Other info

 

All caches, on prestashop and on the server are disabled.  There is nothing in the prestashop log.  There is nothing in the servers error log.  I have tried using several browsers on 3 machines in 2 locations to see if it a client side issue, it isnt.

 

 

I really hope that someone has come across this issue and has been able to resolve it as I am starting to pull my hair out.

 

Thank you in advance to anyone that can help with this issue!

 

Share this post


Link to post
Share on other sites

You are using chrome browser ? Try another browser. Chrome in latest version is using chromium, which is causing some problems with some scripts.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the quick reply.  I have just tried Safari and it seems to be ok 10 times in a row!  I tested with chrome & firefox last week and was having the issues in both so I ruled out that it was a browser issue!  Bloody typical it seems to work ok with Safari.

 

Thank you very much for your help!

Edited by 5ummer5 (see edit history)

Share this post


Link to post
Share on other sites

You are using chrome browser ? Try another browser. Chrome in latest version is using chromium, which is causing some problems with some scripts.

 

Thanks I tried with firefox and it is working. As you said I was using Chrome. Do you know if this will be fixed?

Edited by kprintx (see edit history)

Share this post


Link to post
Share on other sites

I had the same issue, some changes were saving (Enabled, product code) and almost everything else not. A few items of note for the devs.

 

- Error occurred in both Chrome and Edge but went away with Firefox Dev Edition

- Turning on Debug mode in config\defines.inc.php took away the problem in Chrome but not a long term solution

- Cleared cache, force compile themes, didn't help

 

So for now, using Firefox Dev Edition

Share this post


Link to post
Share on other sites

Posting my temp unworkable solution here as well:

 

I downloaded a contained version of Chromium - Version 30.0.1556.0 (210028)

 

http://commondatasto...Win_x64/210028/

 

downloaded and extracted the zip package 

https://www.googleap...86000&alt=media

 

using it as a standalone browser - no install

Prestashop Back Office Product save and update seems to work with this 2013 version

Share this post


Link to post
Share on other sites

I am running 1.6.1.10 and it does not work - I have jumped from 1.6.1.6 to 10 - maybe something did not update correctly

I also did a clean install of 1.6.1.10 - reapplied my theme - still does not work

Share this post


Link to post
Share on other sites

I am working on this bug by addressing an Ajax error that I saw on the chrome dev console, and will report back in the next 24 hrs.

Share this post


Link to post
Share on other sites

Having the issue with PS 1.6.1.4 and Chrome 56.0.2924.87 (64-bit).

 

Not happy.

 

I don't want to update the PS version yet as I need functionality and I've had problems with custom modules in the past when I update.

 

Again, Not Happy.

Share this post


Link to post
Share on other sites

Hi, yes, chrome in some versions doesn't send fields 'submitAddproduct'  and 'submitAddproductAndStay' in http post request. So i added lines to /js/admin/products.js at the end of $(document).ready() :

$(document).on('click','button[name="submitAddproduct"]',function(e) {
        e.preventDefault();
        $('form#product_form').append('<input type="hidden" name="submitAddproduct" value="1" />');
        $('form#product_form').submit();

    });

    $(document).on('click','button[name="submitAddproductAndStay"]',function(e) {
        e.preventDefault();
        $('form#product_form').append('<input type="hidden" name="submitAddproductAndStay" value="1" />');
        $('form#product_form').submit();
    });

hope it will help somebody

 

edit: i dont know, but maybe, chrome have problems with fact, that element with name 'submitAddproduct' is actually multiple times in that product form and does not have a value 

Edited by daveyrow (see edit history)

Share this post


Link to post
Share on other sites

Hi, yes, chrome in some versions doesn't send fields 'submitAddproduct'  and 'submitAddproductAndStay' in http post request. So i added lines to /js/admin/products.js at the end of $(document).ready() :

$(document).on('click','button[name="submitAddproduct"]',function(e) {
        e.preventDefault();
        $('form#product_form').append('<input type="hidden" name="submitAddproduct" value="1" />');
        $('form#product_form').submit();

    });

    $(document).on('click','button[name="submitAddproductAndStay"]',function(e) {
        e.preventDefault();
        $('form#product_form').append('<input type="hidden" name="submitAddproductAndStay" value="1" />');
        $('form#product_form').submit();
    });

Hi daveyrow

 

Can you show me the code after yours is inserted - I'm not exactly sure where to place it .... Thanks so much!

Share this post


Link to post
Share on other sites

Hi daveyrow

 

Can you show me the code after yours is inserted - I'm not exactly sure where to place it .... Thanks so much!

 

Hi , the file is located in /js/admin/products.js

 

the end of file with added code looks like this this:

 

please dont forget to ctrl+f5 the admin product page or remove browser cache to reload the loaded js file and report if trouble is gone thx)

var tabs_manager = new ProductTabsManager();
tabs_manager.setTabs(product_tabs);

$(document).ready(function() {
	// The manager schedules the onReady() methods of each tab to be called when the tab is loaded
	tabs_manager.init();
	updateCurrentText();
	$("#name_" + id_lang_default + ",#link_rewrite_" + id_lang_default)
		.on("change", function(e) {
			$(this).trigger("handleSaveButtons");
		});
	// bind that custom event
	$("#name_" + id_lang_default + ",#link_rewrite_" + id_lang_default)
		.on("handleSaveButtons", function(e) {
			handleSaveButtons()
		});

	// Pressing enter in an input field should not submit the form
	$('#product_form').delegate('input', 'keypress', function(e) {
			var code = null;
		code = (e.keyCode ? e.keyCode : e.which);
		return (code == 13) ? false : true;
	});

	$('#product_form').submit(function(e) {
		$('#selectedCarriers option').attr('selected', 'selected');
		$('#selectAttachment1 option').attr('selected', 'selected');
		return true;
	});

    $(document).on('click','button[name="submitAddproduct"]',function(e) {
        e.preventDefault();
        $('form#product_form').append('<input type="hidden" name="submitAddproduct" value="1" />');
        $('form#product_form').submit();

    });

    $(document).on('click','button[name="submitAddproductAndStay"]',function(e) {
        e.preventDefault();
        $('form#product_form').append('<input type="hidden" name="submitAddproductAndStay" value="1" />');
        $('form#product_form').submit();
    });
});
Edited by daveyrow (see edit history)

Share this post


Link to post
Share on other sites

Finally - A Solution!

Very simple solution, And I tried them all;

Chrome - Version 64.0.3282.186

Prestashop - Version 1.6.1.18

- Make sure you are using PHP 7.2! - Boom!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More