Page 1 of 1

Why is the fields losing value after save ? Whats wrong ?

Posted: Tue Oct 31, 2017 1:46 pm
by soamjena
https://youtu.be/lTKsqx-uwrA

Why is this happening ?
We have done nothing or not even installed any 3rd party extensions.

Simply have installed Opencart latest and theme, thats all.

Any hint ? :choke:

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Tue Oct 31, 2017 3:18 pm
by phinq1910
It still wroking fine on myself (3.0.2.0)

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Tue Oct 31, 2017 3:40 pm
by soamjena
Is it something with PHP 7.x ?

Or any other way to debug this ?

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Wed Nov 01, 2017 9:42 pm
by straightlight
Which OC version are you using? In the admin - > system - > maintenance - > error logs page, do you see any recent errors regarding a product.php file?

Another way of troubleshooting this issue would be to go to your admin/model/catalog/product.php file. Then, find in the editProduct method:

Code: Select all

$this->cache->delete('product');
add below:

Code: Select all

exit;
Save changes. Then, go back to the product edit page, as demonstrated in your video, and try again with your attribute. Save changes. Please provide the error message on screen if you see one.

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Thu Nov 02, 2017 12:49 am
by soamjena
Version 3.0.2.0

No error logs.

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Thu Nov 02, 2017 2:36 am
by straightlight
Have you applied the steps above? What are the results after applying the steps above and editing the products?

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Thu Nov 02, 2017 5:22 pm
by soamjena
Oh yes it got fixed.
So, its a bug in OCT 3.0.2 ?

What if we upgrade next when update comes ?
It will get lost :(

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Thu Nov 02, 2017 10:55 pm
by straightlight
Without reporting the cause of what you saw after implementing the suggestion to troubleshoot the issue, it would be quite harden to provide an answer knowing if this issue is caused by a core bug or by an extension.

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Thu Nov 02, 2017 11:39 pm
by soamjena
No extensions installed, nothing.
Just installed Opencart and tested directly and this was happening

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Thu Nov 02, 2017 11:43 pm
by straightlight
After implementing the solution above, what is the result on screen that you see once the changes have been saved?

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Thu Nov 02, 2017 11:47 pm
by soamjena
yes its getting saved fine.

Re: Why is the fields losing value after save ? Whats wrong ?

Posted: Thu Nov 02, 2017 11:55 pm
by straightlight
If after implementing this code above, you are still able to be redirected to the success message, then the issue you are encountering is definitely about cache issues. Ensure to clear all caches:

1 - From admin dashboard (clear both caches)
2 - From admin - > extensions - > modifications page - > hit refresh.

Then, go back to the issue page then save the changes again and see if the page still gets redirected successfully.