I have already posted this error via GitHub and was referred to this forum, because I am not a programmer but a user/shop owner.
I respect the work of the developers very much and don't want to waste their time...but would also like to help to correct this error ... because we use only products with many options in our shop and it is therefore very important for us that this works reliably.
Can someone write to me what I need to do, to give the developers the information they need? Here is the history of the topic that I had at GitHub.
____________________________
What version of OpenCart are you reporting this for?
Latest Master from GitHub
Describe the bug
Adding products with several options (in the "Option"-Tab) is not possible properly. If I add many options (let's say >3), only a few of them are saved.
In my test, I added two products:
Product 1 saved 3 options (of 8 options, that were configured during adding)
Product 2 saved 2 options (of 4 options, that were configured during adding)
Also, adding the missing options, AFTER saving the product is not possible.
To Reproduce
Steps to reproduce the behavior:
Go to Catalog/Options and add several Options (I added 8 options with Textfield, Text, Radio and so on)
Go to Calalog/Products and add a products with the options above
Go to Frontend and try to add the products or go to Catalog/Products again. In both cases, not all options are saved.
Expected behavior
Every selected option should be saved with the product.
Server / Test environment (please complete the following information):
Deployed to a web server
PHP version 7.3
Firefox
Version [latest]
___________________________________
Answer from Straighlight:
When re-adding the product options, troubleshoot the posted array on the browser and see which array keys or values might have an issue, according to this incident report.
__________________________________
My question
What do I need to do, to give the developers the information they need?
Thanks in advance
Kiu
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
thanks a lot for your reply.
Regarding your comment "No OC version posted": I used the latest Master from GitHub.
Regarding your comment "Not a bug. The max post size in your php.ini file must be increased.": I added the line
"post_max_size = 999M" to the php.ini, but this doesn't make any difference in the behaviour. It's still not possible to add more than three options to a product.
If you (or any other) has suggestions to this, I will help by trying everything :-)
As I use a test-environment, it's also no problem to share the credentials, so it might be easier to get this issue.
Kind regards
Kiu
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I just wanted to report, that I contacted my provider. They wrote, that changed in php.ini are not taken into account and that I have to change the .htaccess
I uncommented these lines:
php_value post_max_size 999M
php_value max_execution_time 200
php_value max_input_time 200
...but these changes don't change the behaviour.
Kind regards
Kiu
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Ad this tot your htaccess file, of ask your hoster tot change it in PHP settings.
max_input_vars = 100000
Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com
Even I can't understand what's written there nor have I ever seen max_input_vats before ...
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Mind you that is the number of post variables, if you exceed 1000, you are doing something really stupid with OC.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
thanks for your suggestions.
@straightlight: I contacted my provider by phone and the guy looked at my settings and told me, that the variables are working in .htaccess
@letxobnav: I also added your "php_value max_input_vars 1000" into the .htaccess
The issue is still there.
But now, the things are going strange:
I tried a few things ...
As I said, I had initially created nine options and then tried to create products with these options.
I have noticed now, that the problem does not seem to have anything to do with the NUMBER of options. Because I can easily create five of these options ... but the other four options are not accepted.
Even if I create a complete new product with only ONE option (and this is one of the non-functioning options), that does not work.
The error does not appear at the "product-tab" level, but at the "option-tab" level.
I had already suspected, that it is something with the "type" of an option ... but for example, two of the options with type "text" are working, but one is not.
Do you have ideas / suggestions for this?
Thanks and kind regards
Kiu
In .htaccess, perhaps, but what about in php.ini or user.ini file?@straightlight: I contacted my provider by phone and the guy looked at my settings and told me, that the variables are working in .htaccess
In your admin/controller/catalog/product.php file, in your edit() method,I have noticed now, that the problem does not seem to have anything to do with the NUMBER of options. Because I can easily create five of these options ... but the other four options are not accepted.
find:
Code: Select all
$this->response->redirect($this->url->link('catalog/product', 'user_token=' . $this->session->data['user_token'] . $url, true));
Code: Select all
echo "<pre />\n";
print_r($this->request->post);
echo "</pre>\n";
exit;
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I added the code above
$this->response->redirect($this->url->link('catalog/product', 'user_token=' . $this->session->data['user_token'] . $url, true));
to admin/controller/catalog/product.php and saved it.
Then, I went back to admin and opened one of the products and wanted to add a "non-working" option. I saved the product, but don't see any array.
After saving, I'm redirected to the main Product-Folder and can see the message:
Success: You have modified products!
I hope, you can help?!
Thanks and kind regards
Kiu
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I use a "fresh" installation from the Github-OC-Master from last week. I didn't installed any extension.
I checked the storage-folder, which is completely empty (only index-file)
If it's helpful, you can get the credentials at any time, as this is a test-environment.
If you have other suggestions, I will try my best to help (as this might be a bug).
Kind regards
Kiu
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 81 guests