Support » Plugins » wp-openid 2.0 giving database error

  • I’ve installed the 2.0 version of Will Norris et al’s wp-openid plugin, on WP 2.3.1, and I’m getting trouble at the end of the authentication loop. When I use openid to log in or leave a comment, it takes me to my openid host and asks for confirmation properly, but when I am returned to my wordpress site I get, not my starting page, but my login page with this error message:

    WordPress database error: [Unknown column ‘server_url’ in ‘field list’]
    REPLACE INTO branchjournal_openid_nonces (server_url, timestamp, salt) VALUES (”, 1194887494, ‘q1AnCo’)

    This happens whether I am logging in from the login page, from my login widget or leaving a comment. I am a bare beginner with mysql and I’m not even sure what it’s telling me is wrong. Can anyone interpret this and perhaps recommend where in my plugin files I should look to fix the problem?

Viewing 13 replies - 1 through 13 (of 13 total)
  • it’s basically saying that the tables didn’t get created properly. Most of the time, you can simply disable the plugin and then re-enable it once or twice which will force it to rebuild the database tables, so try that first. I’ve run into a few cases where it takes more than that so let me know if you still have trouble.

    Ah, thank you! That did, indeed, take care of that error.

    And, um, now I’m getting a new one.

    I can log in from my login forms with openid just fine. But when I try to comment using openid, I get returned to wp-login (despite being logged in as my openid identity by then) and it shows this error:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘SET openid=1 WHERE comment_ID=’17’ LIMIT 1′ at line 1]
    UPDATE SET openid=1 WHERE comment_ID=’17’ LIMIT 1

    On the comment page itself I get something similar:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE comment_post_ID = ‘3’ AND openid = 1 AND comment_author_url = ‘http://user’ at line 1]
    SELECT * FROM WHERE comment_post_ID = ‘3’ AND openid = 1 AND comment_author_url = ‘’ AND comment_approved = ‘0’ ORDER BY comment_date

    The second one appears just above the comments and persists even when I log out again and reload the page, which seems as though something might have corrupted somewhere? You can see the second message here ( if it would help to look at it in situ.

    I’m sorry my database and I are so much trouble!

    hmm.. I made a couple of udpates. Try replacing your logic.php with the one here…

    I replaced logic.php with the new one, and I’m still getting the same error message.

    Is it a problem between wp-openid and Brian’s Threaded Comments? I have both running, and the comment I attempted to make via openid was supposed to be threaded. I hadn’t expected that to work yet, but maybe there’s more incompatibility. I’ll try it without that plugin and see what happens.

    Nope. I deactivated BTC and switched to the default theme, and I still got that error. Though, once again, it /did/ log me in and post the comment. Just wouldn’t give me back the page I came from, and shows me the SQL error message instead.

    Further experiments:

    When logged in with openid from my sidebar login form I can reach my profile and the comment form knows I’m logged in, all as it should be. However, when I attempt to make a comment, I get the wp-comments-post.php page showing the following error:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘SET openid=’1′ WHERE comment_ID=’20’ LIMIT 1′ at line 1]
    UPDATE SET openid=’1′ WHERE comment_ID=’20’ LIMIT 1

    I get the same SQL syntax error on all pages where there are OpenID comments. The comments do show up and there’s no issue logging in with OpenID, but the SQL error is there on the comments page if there’s even one OpenID comment present.

    I tried the new logic.php file that is linked here and it didn’t fix the issue.

    Any progress on this? I’m currently using the old WP-OpenID plugin, which at least lets my users log in and comment, but it mangles the comment notification emails sent to me. It’s not an absolute deal-breaker, but it’s darn annoying and I’d love to be able to use the new version.

    Ok, i have same problem, but i made a bit of debuging and there we go:

    in file logic.php function: comments_awaiting_moderation

    before line:

    $comments_table = $this->store->comments_table_name;

    put a line:

    $this->getStore(); // looks like store is not initialized yet

    This will stop all SQL errors i could see, tho still doesnt work… looks like it hangs on OpenID Customer… with bad_signature error…

    Tryed and … same.. so imho there should be error deeper somewhere.

    I tried adding the line and it didn’t seem to affect the SQL syntax error. 🙁

    EDIT: Oops, I had the line in the wrong spot. It cleared up the syntax error for me. Thank you!

    Curious. That line seems to take care of the on-page error message, yes. I’m still getting the same SQL error on the comments-post.php page, when I try to post the comment; the process hangs up there, though the comment does go through in the database and I even get an email notification for it. It just doesn’t get back to reload the page the comment was made on.

    I also get a ‘headers already sent’ message, saying that wp-db.php is now in conflict with ajax-edit-comments and pluggable.php, which I know good and well are actually dealing with each other just fine.

    *sighs* From my still limited knowledge of php, it looks like you’re right, Shivas; the real problem must be somewhere else. Thank you for working on this, though!

    for anyone still have trouble with this… try

    I just downloaded the latest version and tested it, and it didn’t work. I rebuilt the tables with the new Options function, and that went fine.

    Now I can’t log in with OpenID at all. I get to my id provider and tell them, yes, trust my site, and when I’m redirected I wind up on my wp-login page, not logged in. There isn’t any error message, it just fails to work.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘wp-openid 2.0 giving database error’ is closed to new replies.