#6305 closed defect (bug) (fixed)
AJAX is teh b0rked when adding categories.
Reported by: | christhomson | Owned by: | |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | major | Version: | 2.5 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
When adding a new category on /wp-admin/categories.php, you always get an error saying "AJAX is teh b0rked". This is happening to me, and a few users on the WP Support Forums.
This is critical to get fixed by the final 2.5 release, otherwise users have to go to the write post page to add a new category.
Attachments (6)
Change History (30)
#1
@
17 years ago
- Milestone 2.5 deleted
- Resolution set to worksforme
- Status changed from new to closed
#2
@
16 years ago
- Resolution worksforme deleted
- Severity changed from critical to normal
- Status changed from closed to reopened
I just tested this locally and it seems to work fine (on Mac OS X Leopard with MAMP, with no plugins). I just tested it again on the same install, with the same settings (on my actual website), and it still said "AJAX is teh b0rked" but once I refreshed it, all the categories disappeared! I refreshed again, and all the categories reappeared, including the one I was trying to make when "AJAX was b0rked". Here's a little info that might be useful to find the problem:
I'm running Apache/2.0.54, php 5.2.5, mysql 4.1.11.
#4
@
16 years ago
Try disabling JavaScript in your browser and then add a category from Manage -> Categories. What happens?
#5
@
16 years ago
Trunk adds some extra error checks to help isolate the problem. If you're using svn, update and trying adding a category. Do you see "Could not insert term into the database"?
#7
@
16 years ago
wp-ajax-response-debug.php
A plugin that will output the parsed data of any XML response resulting from a WP AJAX request (see attached screenshot). Upload it to your wp-content/plugins/ directory and activate it from your WordPress' Plugins admin page.
Tested in FF2, Safari3, Opera9, IE6/7
#9
@
16 years ago
having the same problem here (FF3b4, Safari 3.1, MaxOSX 10.5.2). When switching of Javascript i get "Category not added" instead without any other visible error/problem.
I switched off all plugins and still get the same error. Probably something server related. Can't say too much about installed modules as this server isn't my own. Will try another install on a local test machine.
#10
@
16 years ago
Check error logs to see if anything is being output there, particularly database error related stuff.
#12
@
16 years ago
"Lost connection to MySQL server during query"
That error was reported on the testers list. Seems related to the "gone away" errors from #5951 that people worked around by using mysql_ping(). I'll create a mysql_ping() patch to wpdb to see if that helps.
#13
@
16 years ago
If a query errors out with a CR_SERVER_GONE_ERROR or CR_SERVER_LOST errno, two attempts are made to mysql_ping() and reconnect. If successful, the query is done again, otherwise we bail.
#15
@
16 years ago
Seems to have worked, but it's REALLY slow (like 10-30 seconds).
Also:
Warning: mysql_ping() expects parameter 1 to be resource, boolean given in [...]
#16
@
16 years ago
Looking at the patch $this->dbh
can only be a bool if the mysql_connect fails - I assume it's the reconnect that fails.
#17
@
16 years ago
I've attached a new patch (or wp-db.php) for people to try which won't ping if the reconnect fails.
#18
@
16 years ago
Works, but still a horridly long page load. Takes exactly 30 seconds to get the AJAX response (same for non-AJAX). Seems some timeout is occurring and it takes 30 seconds before it gives up.
#21
@
16 years ago
I looked at differences between how categories are created from Write->Post versus Manage->Categories. Manage->Categories allows parent IDs of -1 to be passed down. The commit above changes negative IDs to zero just in case negative IDs are somehow responsible.
Cannot reproduce as of [7412] using Safari 3.1 or Firefox 2.0.0.12 (both OS X 10.5.2). Server environment is Apache 2, PHP 5.2.4
Please re-open with more details about your server/browser environment. Please try it with ALL plugins disabled.