Error 500 When Adding To Cart

Hi guys, I need help with an urgent issue.



I don't know when this started, but I believe it might be related to the last update, 4.1.3. I have checked the store quickly before deleting the upgrade backup, but I never thought I could encounter something like this.



My store is throwing a 500 server error when adding any product to the cart. But wait, it gets weirder: the product is actually added to the cart, but it is not reflected in the cart block and thus the user thinks that the store is malfunctioning.



Other than that, the store is fully functional. So, how do I debug this?

Seems like it has something to do with the store theme. Switching to the basic theme made the error go away.



BTW this is a custom theme that I created using the built-in visual editor, plus some CSS changes.

So, no replies… and I figured this out on my own.



It really had something to do with the theme. I compared my theme's files with the basic theme's files and I guess the culprit was one extra in one of them.



However, that created another problem. Somehow my theme wasn't displaying the style created for it with all my customizations, so I had to remove and reinstall the theme by placing the entire theme folder inside var/themes_repository.



Very weird indeed.

Hello denisgomes!


[quote name='denisgomes' timestamp='1396495252' post='180814']

So, no replies… and I figured this out on my own.



It really had something to do with the theme. I compared my theme's files with the basic theme's files and I guess the culprit was one extra in one of them.



However, that created another problem. Somehow my theme wasn't displaying the style created for it with all my customizations, so I had to remove and reinstall the theme by placing the entire theme folder inside var/themes_repository.



Very weird indeed.

[/quote]



I am very sorry to hear that you experience this issue with the upgrade process. Please let me note that during the upgrade the store system fixes the bugs found in the previous version. In order to do it, it replaces the old files with the new ones which contain the bug fix code. Not all files are replaced with the new ones but only those which were affected with bug fixes. There is a number of bugs which affect the templates and the theme. That is why it is natural behaviour that the system replaces old templates with the new ones to fix the issue.



If the store system finds the file which should be replaced with a new one in a custom theme, it will also be replaced but first the store system will back up the files and such conflicts between old and new files should be resolved manually. Here you can find the instructions for this process:



http://kb.cs-cart.co…al-modification



In conclusion, the modified files are not lost, but they are copied to a separate directory: var/upgrade/upgrade_4.1.2_ultimate-4.1.3_ultimate.tgz/backup/design/themes



If the template files are not replaced with the new ones, the fixes cannot be applied and that makes the upgrade process a little bit senseless. I hope this explains the situation.



However, I am very happy to hear that you have managed to resolve the issue.





Anastasiya Kozlova

CS-Cart Support team