Arrow

All other users not saved when Wordpress admin is other than english | Peter's Login Redirect | Forum

Back to the login redirect plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
All other users not saved when Wordpress admin is other than english
February 6, 2012
8:48 am
alphabit
Guest

Hi there,

just wanted to share what happened to me today while trying to get your great redirect plugin to fully work.

I was struggling with the 2 textfield of the "all other users" section in the settings page.
It felt like the data wasn't submitted, since it always "forgot" the values and after a submit the mentioned form fields were empty.

The cause relies in the "rul_submit_all" function within the file "wp_login_redirect.php". There, a variable named "$update_or_delete" is compared to a string "Update" or "Delete", which is fine on us/en systems.

Since I was using a localized Wordpress Edition (the german edition that also includes a localized admin section), in my case the caption of the button was "Aktualisieren" instead of "Update".

That caused the comparison to fail and the data not to be stored. I quickly fixed that for me with a simple str_replace.

// ----------------------------------
// Process the rule changes
// ----------------------------------

# quick and dirty fix
$update_or_delete = str_replace('Aktualisieren','Update',$update_or_delete);
$update_or_delete = str_replace('Löschen','Delete',$update_or_delete);
$update_or_delete = str_replace('Löschen','Delete',$update_or_delete);

...
(continue with regular code)

I thought to share this just in case someone else should encounter the same problem.

Cheers

February 6, 2012
9:57 am
Peter
Admin
Forum Posts: 841
Offline

Thanks a lot for pointing this out. I've released version 2.5.2 now, which fixes this bug.

February 6, 2012
11:00 pm
alphabit
Guest

You're welcome. Thanks for the quick update. Already updated my wordpress install :-)

Cheers