• Resolved simpacker

    (@simpacker)


    Hi everyone,

    with the Plugin “User Role Editor” I try to rename the name of a user role from ALPHA to BETA. ALPHA has been created by Ultimate Members.
    In the frontend it looks like a successful change from ALPHA to BETA, but after the next mouse click the name will be resetted to ALPHA again.

    In the moment when I deactivate Ultimate Member, I can see BETA without any changes. But when I active Ultimate Member again, I get the old ALPHA.

    Version information:
    WordPress: 5.9
    Ultimate Member: 2.3.1
    User Role Editor: 4.61.1

    Any ideas, what happens and what to to?

Viewing 10 replies - 16 through 25 (of 25 total)
  • missveronica

    (@missveronicatv)

    @simpacker

    I have now updated the Role Rename code snippet with a list of all your UM Role Names in order to see the Display Name values before and after your Rename.

    Replace the current code snippet with source_trace.php and make a Role Rename.

    With your browser list this URL: yourdomain/wp-content/umroles.html and post here in the Forum.

    https://github.com/MissVeronica/UM-Rename-of-Role-Names

    Thread Starter simpacker

    (@simpacker)

    @missveronicatv

    It becomes embarrassing for me because you invest a lot of effort to find a solution for me. ??

    But unfortunately: No HTML page…

    Is it perhaps a part of the solution that there will be created no html-page [mydomain]/wp-content/umroles.html ? Does it mean that the code is not be executed…?

    • This reply was modified 3 years ago by simpacker.
    missveronica

    (@missveronicatv)

    @simpacker

    Yes I expected HTML output if you have UM Roles.
    Can you look at the “Code Snippet” Plugin if the code snippet is installed and activated OK.

    Thread Starter simpacker

    (@simpacker)

    @missveronicatv

    The snippet is installed and activated. And there arises still no HTML when I rename one or more user roles.

    missveronica

    (@missveronicatv)

    @simpacker

    New text:

    When I test with the “Code Snippets” plugin it’s not changing the Role Name.

    You must add the code snippet to your child-theme’s functions.php file.

    Now you can use an updated version of the tracing code snippet where the HTML file explain each step more in detail. If you have the PHP Error Log turned “On” the tracing text is written as Notices to the PHP Error Log instead.

    https://github.com/MissVeronica/UM-Rename-of-Role-Names

    Thread Starter simpacker

    (@simpacker)

    @missveronicatv

    One stupid request from my side before I start to modify functions.php:

    Where can I add the snippet in the functions.php? After the last line?

    My 3 last lines are:


    }

    // endregion

    new OCEANWP_Theme_Class();

    • This reply was modified 3 years ago by simpacker.
    missveronica

    (@missveronicatv)

    @simpacker

    Create your child-theme with the “Child Theme Configurator” Plugin

    https://www.ads-software.com/plugins/child-theme-configurator/

    Activate your child-theme and add the code snippet to the functions.php in the child-theme.

    missveronica

    (@missveronicatv)

    @simpacker

    I have found why the “Code Snippets” Plugin refused to execute the code and the fix is to add global $wpdb; as the first statement in the code snippet.

    I have added this fix to both download files.

    https://github.com/MissVeronica/UM-Rename-of-Role-Names

    Thread Starter simpacker

    (@simpacker)

    @missveronicatv

    Now I have replaced the old code snippet by the updated source_trace.php and didn’t modify functions.php.

    Supergood! Now it works in two ways:

    1. Here comes the desired line from the umroles.html:
    [21.02.22 07:08] PHP Notice: Trace rename of UM role: ‘um_mitglied-consilium’ Name WP old: ‘Mitglied Consilium’ Name WP new: ‘Consilium’ Name UM meta: ‘Mitglied Consilium’ UPDATED

    2. And what I didn’t expect: “Mitglied Consilium” has also been renamed end-to-end to “Consilium”.

    Seems to look like a solution. ??

    THANK YOU VERY MUCH for your support!
    Thomas

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Thanks for letting us know how it resolves the issue.

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Rename of Role Names’ is closed to new replies.