Quantcast
Channel: dev feedback – WordPress.org Forums
Viewing all articles
Browse latest Browse all 20

Simon Wheatley on ""Unknown Login Key" caused by read only DB"

$
0
0

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:

  1. 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.
  2. While I was there, I rewrote the insert to use the $wpdb->insert method, instead of the $wpdb->query method.

The patch is here: http://pastebin.com/U0NeFpYQ

Any feedback welcome. DO NOT APPLY THIS PATCH UNLESS YOU KNOW WHAT YOU ARE DOING.

http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/


Viewing all articles
Browse latest Browse all 20

Trending Articles