Jump to content

[HELP] "Unable to Update Settings" When Saving Product – 403 Forbidden & JSON Error


Antonio - EWS

Recommended Posts

Hi everyone,

I'm sorry if this is not the right place to open this topic but I just subscribed and have yet to fully understand how the platform works.

I’m currently working on a PrestaShop 1.7.7.2 installation and encountered a serious issue. Whenever I try to update a product (changing quantity, description, etc.) from the admin panel, I get this error:

"Unable to update settings" and then the small rotating circle which usually pops up during a saving gets stuck and loops infinitely. 

After checking the browser console and network tab, I noticed this error:

Uncaught SyntaxError: Unexpected token 'F', "Forbidden" is not valid JSON

The request to /adminXXXX/index.php (the product update route) returns a 403 Forbidden error.

 

What I’ve tried so far:

  • Enabled debug mode → no error displayed
  • Cleared PrestaShop cache and browser cache
  • Verified admin session/token
  • Looked at logs but found nothing helpful
  • Also looked at various forums (this one too) but couldn't find the solution to my problem nowhere.
  • Yesterday our hosting suddenly suspended our account due to "excessive use of database". I had to optimize said database and ended up following this cleanup guide prior to the issue: https://prestahero.com/blog/post/85-clean-up-prestashop-database.html
  • Contacted my hosting provider, and with their help we tried to disable ModSecurity, but the issue persisted even with ModSecurity disabled

 

Environment:

  • PrestaShop version: 1.7.7.2
  • PHP version: 7.3
  • Hosting: Shared hosting
  • No recent module installations
  • Issue appeared after backup restoration and database restoration and cleanup/optimization

I've spoken with the hosting provider and they say there's nothing wrong on their part, so it seems this is a PrestaShop issue.

While trying to figure out the problem I also tried simply exiting my account and logging in once more. That fixed the issue for a very short period of time. I run a save on one of the items and it worked. Then 5 minutes later, the same problem reoccurred, and logging in once more did not fix the issue.

Has anyone experienced this or can help me debug this further?

Thanks in advance 🙏
– Antonio

Link to comment
Share on other sites

1 hour ago, Prestashop Addict said:

Hi, try do delete folder cache var/cache/prod and dev (in ssh if possible to avoid concurrent access).

Thank you. I'll try this and share an update as soon as I'm done. In the meantime, while trying to troubleshoot the problem, I noticed that the error appears only when I'm trying to edit/save products that have combinations. I ran some tests and it seems that normal products (without combinations) do actually run the save command without any issue.

 

Only when I try to edit a product which has multiple variations/combinations I get the error. And this happens no matter what browser I use.

 

Just wanted to share this in case it could be useful to troubleshoot the problem.

Link to comment
Share on other sites

19 hours ago, Antonio - EWS said:

Uncaught SyntaxError: Unexpected token 'F', "Forbidden" is not valid JSON

 

Seems 500 error. Enable the debug mode and check the error in the Chrome network tab, OR check the errors in the error log. If any new module has been installed recently, then try disabling the same. 

 

 

Link to comment
Share on other sites

3 hours ago, Knowband Plugins said:

Seems 500 error. Enable the debug mode and check the error in the Chrome network tab, OR check the errors in the error log. If any new module has been installed recently, then try disabling the same. 

 

 

I’ve enabled debug mode but no related error was reported. Using inspect element, from the console I could see this error I reported. 
 

No changes (modules/theme/or anything else) was made on the website in the last month or so. 
 

The only thing we did was restore a backup due to some problems we had a couple of days ago (both files and db were restored). 
 

I still have to try and delete cache as PrestaShop Addict suggested, as I’ve been traveling and have not yet been able to log in to my computer. Will share any update on the situation as soon as I’m back to work. Thank you all! 

Link to comment
Share on other sites

On 8/7/2025 at 8:24 PM, Prestashop Addict said:

Hi, try do delete folder cache var/cache/prod and dev (in ssh if possible to avoid concurrent access).

Hi sorry, I'm finally back to work and ready to test this out. I don't have ssh access so I will be doing it through the file folder. However, as this is something I have never done so far, I wanted to ask what's the best way to do it. Do I do public/var/cache and delete the two folders directly, or do I do public/var/cache/prod and public/var/cache/dev and delete just the content of each folder.

 

I believe it should be safe to delete the folders because they should autogenerate  once someone access the site after the deletion, but I prefer to ask to avoid breaking the website.

 

Thank you!

Link to comment
Share on other sites

43 minutes ago, Antonio - EWS said:

I believe it should be safe to delete the folders because they should autogenerate  once someone access the site after the deletion, but I prefer to ask to avoid breaking the website.

deleting is just bad. Rename them, that way you still have the files you planned to throw away. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...