• Resolved jurgenwauters

    (@jurgenwauters)


    Hi,

    Each time when i update my menu. The selected roles are added again the the CSS Class.

    For example i have 2 roles.
    my-role-1 and my-role-2
    I add these 2 roles to a menu item. And Save the menu.
    nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2 is added the CSS Classes of that menu ( already 2 times )

    Now if i just hit save again.
    nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2

    Save again.
    nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2 nmr-my-role-1 nmr-my-role-2

    Using WP 5.3.2 and default Twenty Nineteen theme.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author HelgaTheViking

    (@helgatheviking)

    Hi there, thanks for reporting this. Someone had brought this up before but I didn’t fully understand what was happening until I saw your example. ??

    It should be fixed now in 1.10.1. You will have to go back and delete the custom classes, but they should stay deleted now.

    Not sure if this is the same issue but i have duplicate options showing for all menu items. see attch

    screenshot

    I am not using css classes at all. Am using v 1.10.1 latest. Divi Theme.

    Thanks.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    It’s not the same issue. I’m fairly positive this is related to WordPress 5.4, can you confirm that’s your current version? After 8 years WordPress put the hook I was using in WP core.

    So I’ve stopped replacing the admin menu Walker. I am guessing that Divi still is replacing the admin menu Walker.. probably output buffering the core walker and adding the community (now core) hook so the hook is added twice.

    I recommend contacting Divi and asking them to move all their custom menu fields to the hook in order to be 5.4 compatible. There’s little need to replace the admin menu Walker now that wp_nav_menu_item_custom_fields is finally in core.

    yes is version 5.4 thanks. i will make a note to Divi.

    is not Divi. After some tests on multiple websites,thre appear to be 2 extensions that are causing the problem. WP-MEMBERS and MENU ICONS. i will report when i get chance.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    I don’t think there’s a need to report to me. You’ll need to report to the other plugins. I’ve already made mine 5.4 compatible… it’s finally time for everyone to stop replacing the admin menu Walker.

    I agree I just thought I’d write it here in the event someone else had the same problem. I won’t add anything further. Thanks.

    Thanks to Helga for the heads-up, and for pushing the change through!

    Just a note to others seeing this issue. There are many more plug-ins affected than those mentioned above. There’s a list on the WordPress Trac site.

    But even that isn’t comprehensive, because some plug-ins are using out-of-date commercial libraries. I ended up doing a text search on .php files in plug-ins directory, looking for “wp_edit_nav_menu_walker” in order to find a rogue plug-in on one of my sites.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Duplicate roles in Menu CSS Classes’ is closed to new replies.