WordPress.org

Ready to get started?Download WordPress

Forums

Peter's Login Redirect
****ERROR: Unknown error updating role-specific URL for role s (17 posts)

  1. RogerRogers
    Member
    Posted 2 years ago #

    ****ERROR: Unknown error updating role-specific URL for role subscriber****

    This is the only descriptive error that I'm getting.

    However, I cannot edit any fields, at least any changes do not cause a result. When I enter a value it does not show as a rule (I expect that it should). The UI does indicate the changes are successful, other than the error I show above.

    Basically, the plugin doesn't appear to save any of the settings.

    http://wordpress.org/extend/plugins/peters-login-redirect/

  2. Peter
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. RogerRogers
    Member
    Posted 2 years ago #

    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?

  4. Peter
    Member
    Plugin Author

    Posted 2 years ago #

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

  5. T Klein
    Member
    Posted 2 years ago #

    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.

  6. T Klein
    Member
    Posted 2 years ago #

    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.

  7. Ajay Patel
    Member
    Posted 2 years ago #

    Facing the same issue
    I have installed wp in sub folder ex. http://www.example.com/wp/

    so how can i resolve it?

  8. whiteorb
    Member
    Posted 2 years ago #

    Same issue here as well.

  9. DFTBA_J
    Member
    Posted 2 years ago #

    I also have this problem, anyone solved it yet?

  10. shawnpwalsh
    Member
    Posted 2 years ago #

    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

  11. DFTBA_J
    Member
    Posted 2 years ago #

    I found another plugin that did what I needed instead :)

  12. webhank
    Member
    Posted 2 years ago #

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

  13. DFTBA_J
    Member
    Posted 2 years ago #

    I ended up using "WordPress Login Redirect", it says it's broken but it works perfectly for me :)

  14. johnnyb@marcallabs.co.uk
    Member
    Posted 2 years ago #

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

  15. kvandekrol
    Member
    Posted 2 years ago #

    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.

  16. filipiz
    Member
    Posted 2 years ago #

    Guys...

    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 = 'http://example.com/', 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

  17. Peter
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you very much for pointing that out. This should now be fixed in version 2.5.3, and the upgrade routine should also fix it for existing installs.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic