Support » Plugin: Peter's Login Redirect » [Plugin: Peter's Login Redirect] ****ERROR: Unknown error updating role-specific URL for role s

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Peter


    Is this a fresh install or an upgrade? Also, is this a multi-site install? The appear might indicate that the wp_login_redirects table is not installed correct. I’d suggest inspecting your database manually. If you’re on a multi-site install, you have to activate the plugin per install.

    This is a fresh install and is not multi-site. Also, I checked the database and the table is there. Interestingly, if I choose edit (using mySQL Workbench) I get an error:

    LIMIT 0, 1000 Error: xdbnamex.wp_login_redirects: table data is not editable because there is no primary key defined for the table.

    I’m not sure if a PK is necessary?

    Plugin Author Peter


    No, a primary key should not be necessary. Unfortunately, at the moment I don’t know what else could be the issue.

    T Klein


    I’m getting the same error, same thing when I try to do a user_level URL redirect or even by role, I assume its effecting everything.

    Even if I try to do a normal redirect, it says “successful” but nothing happens, and it doesn’t work.

    T Klein


    it looks like it installs the database, but it doesn’t ever update it if I try to use any of the redirects.

    I’m not sure what I should be looking for exactly though.

    I am using IIS 7 (unfortunately) but I don’t know why that would make a difference.

    Facing the same issue
    I have installed wp in sub folder ex.

    so how can i resolve it?

    Same issue here as well.

    I also have this problem, anyone solved it yet?

    Not a very user friendly solution, but I had to manually go in and add the necessary entries into the wp_login_redirects table.
    rul_type options: user, role, level, all, register
    rul_value options: I used “administrator” for the role entry (based on the dropdown on the page) and left it blank for the all entry

    I found another plugin that did what I needed instead 🙂

    DFTBA_J – can you tell us what plugin you decided to use?

    I ended up using “WordPress Login Redirect”, it says it’s broken but it works perfectly for me 🙂

    Johnny B


    Yep, I have the same problem. The description was looking so promising. Maybe I will try WordPress Login Redirect

    Had the exact same issue. It turns out that the rul_logout_url field is set to NOT NULL in the database, but when you try to save a rule without first specifying the “Logout URL” field near the bottom, it creates a record where rul_logout_url is null and so the query fails.

    I fixed it by modifying the field in the database to allow NULL. This change should be incorporated into the official plugin itself. However, if you’re a user encountering this problem and you don’t have the means to edit the database, the workaround is to first specify a Logout URL. Then the field in the database won’t ever run up against the NOT NULL issue.


    I made a fresh install and was getting the same error.
    I inspected the code to see what was going on adn found that the plugin try to do the following query:

    REPLACE INTO wp_login_redirects SET rul_url = '', rul_type = 'role', rul_value = 'subscriber';

    Then I tried to run that query directly on the database and I got this:

    ERROR 1364 (HY000): Field 'rul_url_logout' doesn't have a default value

    My solution:

    alter table wp_login_redirects alter rul_url_logout set default '';

    Peter, maybe you could add this default value to the table creation on the rul_install method

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: Peter's Login Redirect] ****ERROR: Unknown error updating role-specific URL for role s’ is closed to new replies.