My host is experiencing some issues with their Database, and this means the remote login JS in WP Mu Domain Mapping is failing as it cannot write the key/ID to the DB, doesn’t notices this is the case, then redirects the user to a screen where the key/ID is checked… this fails with “Unknown Login Key” as the key/ID isn’t in the DB because it was never written due to the DB being in read only mode. So much fun, am I right?
The problem is that this means logged in admins cannot browse the site in this situation, because the error message keeps coming up.
I created a patch for WP Mu Domain Mapping which does two things:
- Test to ensure that when the key/ID was written there were no DB errors, and if an error is detected print a debug message instead of the redirection JS.
- While I was there, I rewrote the insert to use the
$wpdb->insertmethod, instead of the
The patch is here: http://pastebin.com/U0NeFpYQ
Any feedback welcome. DO NOT APPLY THIS PATCH UNLESS YOU KNOW WHAT YOU ARE DOING.
- The topic ‘"Unknown Login Key" caused by read only DB’ is closed to new replies.