403 errors after adding JS to header


(Toby Nieboer) #1

I’m getting a lot of 403 errors when doing anything - replying to posts, changing settings etc. This happened right after adding a bit of JS to the header, so I’m trying to remove it as step 1. Problem is, the errors prevent me from saving the changed header.

So that I can delete it manually, where are site customizations like this kept?


Error 403 when trying to add articles or change any options
(Sigurður Guðbrandsson) #2

You can use your web developer tools in your browser to do that for you.

WARNING
This will delete your CSS and HTML customizations without warning!
NOT SAFE unless you don’t care about your customizations.

How To:
Make sure to be logged in as admin, open up the developer tools and paste the following code in it, then press [return]

$.ajax({url: '/admin/site_customizations/1', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/2', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/3', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/4', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/5', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/6', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/7', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/8', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/9', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/10', type: 'DELETE'});
$.ajax({url: '/admin/site_customizations/11', type: 'DELETE'});

Again, THIS IS NOT SAFE unless you don’t care about your customizations.

After this, just hit F5 and reload the page.

Good luck! :slight_smile:


(Toby Nieboer) #3

Perfect, that did the trick. Thanks!


(Régis Hanol) #4