The Ginger Fox
The Ginger Fox

Reputation: 377

Problems adding, deleting and unchecking Categories Wordpress

I've come across a strange bug in my WordPress admin. The problem manifests itself as follows:

  1. If I try to add a new category nothing happens when I press "Add new category" button, but when I refresh the page the category HAS been created. I can see the Ajax call being made (see below) but there's no automatic page refresh.

  2. There's a similar issue if I attempt to delete a category from this page, the category turns red, fades off but then just re-appears, however, if I refresh manually it HAS been deleted.

  3. The third and final issue is the most problematic one. From within a post I am unable to "un- check" a category. If I un-check a category and click "update post" the category is still checked, no manual refresh helps in this case. I can see the admin-ajax.php being called in the console but nothing happens.

I've been looking in the Console and can't see any errors, I can see the following call being made:

XHR finished loading: POST "https://mywebsite.com/wp-admin/admin-ajax.php". VM8964 load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,underscore,backbone,utils&ver=4.1:4

I'm not 100% sure when this issue occurred but updated WP to 4.1 recently but can't say for sure that it occurred after the update.

I've tried switching off all plug-ins but this makes no difference and it's worth noting that I have the same issue when it comes to other custom types/taxonomies.

Also worth noting that I run WPML (multilingual) on the site.

From what I gather there seems to be something wrong with the Ajax/Jquery calls but I'm not particularly familiar with how the admin works so I'm not sure how to proceed from here.

Thanks, Mikael

UPDATE:

Today I managed to get an error message out of the Chrome console, it seems to be related to jQuery:

enter image description here

FURTHER UPDATE:

I tried switching off my theme and it looks like that is the perpetrator that said, I can't for the love of god figure out what might be causing it the problem within my theme.

I assumed that the problem was within the functions.php file, however after deleting every single line of code in the functions.php file the problem still persists. However, if I physically delete the function.php file off the server everything starts working again...I am confused like hell, anyone got any idea what's going on here?

Mikael

Upvotes: 1

Views: 1935

Answers (2)

Mark Nebesniy
Mark Nebesniy

Reputation: 11

Mikael!

I was solve this problem

Actually I have some spaces after ?> in my functions.php Check your functions.php and remove spaces or something before <?php and after ?>.

It helps me. Hope it helps you.

Upvotes: 1

Stefan
Stefan

Reputation: 218

Hmm, weird. Have you checked WP 4.1 change log to see what was changed? Maybe your theme is using a function that's been deprecated or changed a bit?

Upvotes: 0

Related Questions