Title: Conflict
Last modified: August 30, 2016

---

# Conflict

 *  Resolved [camarabelux](https://wordpress.org/support/users/camarabelux/)
 * (@camarabelux)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/)
 * i there!
 * I’m getting this in the top of the admin site:
 * Nav Menu Roles has detected a possible conflict with the following functions 
   or classes: p.
 * I can not see the options in the menu.
    How can I solve it?
 * Thank you in advance!
 * [https://wordpress.org/plugins/nav-menu-roles/](https://wordpress.org/plugins/nav-menu-roles/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382462)
 * Please see the [FAQ](https://wordpress.org/plugins/nav-menu-roles/faq/)
 *  Thread Starter [camarabelux](https://wordpress.org/support/users/camarabelux/)
 * (@camarabelux)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382482)
 * I’ve seen the FAQ, but I don’t know what to do.
    Where I should put the code?
 * Thank you!
 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382483)
 * You need to add that code to your theme’s (or conflicting plugin’s) “admin menu
   Walker”. I can’t know exactly where that is because it is different for every
   conflicting theme/plugin, which is why I don’t support fixing other themes and
   plugins to work with NMR.
 * The best thing to do is contact the other author and point him or her to the 
   workaround described in the FAQ.
 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382516)
 * Ok, I wrote up the following to add to my FAQ eventually. It is intended to help
   walk you through patching your plugin/theme.
 * **Patching Your Plugin/Theme**
 * Should you wish to attempt this patch yourself, you can modify your conflicting
   plugin/theme’s **admin menu Walker class**.
 * **1.** Find the class that extends the `Walker_Nav_Menu`. As a hint, it is filtering`
   wp_edit_nav_menu_walker` and you might even be getting a warning about it from
   Nav Menu Roles. Example:
 *     ```
       add_filter( 'wp_edit_nav_menu_walker', 'sample_edit_nav_menu_walker');
       function sample_edit_nav_menu_walker( $walker ) {
           return 'Walker_Nav_Menu_Edit_Roles'; // this is the class name
       }
       ```
   
 * **2. **Find the file for the extending class. In my plugin this is in a file 
   located at `inc/class.Walker_Nav_Menu_Edit_Roles.php`. I can’t know *where* this
   file is in your plugin/theme. Please don’t ask me, but here’s what the beginning
   of that class will look like:
 * `class Walker_Nav_Menu_Edit_Roles extends Walker_Nav_Menu {}`
 * Note that the class name is the same as the class name you found in step 1.
 * **3. **Find the `start_el()` method
 * In that file you will eventually see a class method that looks like:
 * `function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {`
 * **4.** Paste my action hook somewhere in this method!
 * In Nav Menu Roles, I have placed the hook directly after the description, ex:
 *     ```
       <p class="field-description description description-wide">
         <label for="edit-menu-item-description-<?php echo $item_id; ?>">
           <?php _e( 'Description' ); ?><br />
           <textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); // textarea_escaped ?></textarea>
           <span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span>
         </label>
       </p>
   
       <?php
       // Add this directly after the description paragraph in the start_el() method
       do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );
       // end added section
       ?>
       ```
   
 *  Thread Starter [camarabelux](https://wordpress.org/support/users/camarabelux/)
 * (@camarabelux)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382584)
 * Hi !
    First of all thank you very much for replying so fast. Now I know the plugin
   is giving me the problem, is the UberMenu. I’ve found the file where I should
   do the changes, and I tried to do it pasting the code you gave me:
 * <?php
    // Add this directly after the description paragraph in the start_el()
   method do_action( ‘wp_nav_menu_item_custom_fields’, $item_id, $item, $depth, 
   $args ); // end added section ?>
 * After the start_el method like this:
 *  function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
 * // Add this directly after the description paragraph in the start_el() method
   
   do_action( ‘wp_nav_menu_item_custom_fields’, $item_id, $item, $depth, $args );//
   end added section
 * And it almost works properly, because when I’m in the Menu page now I can see
   the options of your plugin but not where they should be placed.
 * Did I do something wrong?
    See the images. First is like this: [http://imageshack.com/a/img633/9614/x135gM.png](http://imageshack.com/a/img633/9614/x135gM.png)
 * Then it changes like this:
    [http://imageshack.com/a/img537/3674/iHRcKA.png](http://imageshack.com/a/img537/3674/iHRcKA.png)
 * Thank you very much!
 *  Thread Starter [camarabelux](https://wordpress.org/support/users/camarabelux/)
 * (@camarabelux)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382588)
 * Ok, finally I’ve got it !
    It was my fault, I put the code in a wrong place. 
   Thank you very much for your attention!
 *  [idelfonsog2](https://wordpress.org/support/users/idelfonsog2/)
 * (@idelfonsog2)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382754)
 * > Ok, finally I’ve got it !
   >  It was my fault, I put the code in a wrong place.
   > Thank you very much for your attention!
 * could you be more detailed about in which “place” folder you put it ?
 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382755)
 * Every plugin and theme is different so I can’t know what folder to place my code
   patch in.
 *  [idelfonsog2](https://wordpress.org/support/users/idelfonsog2/)
 * (@idelfonsog2)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382756)
 * Hi There I found it!.. it was in the same method just before it ends. I’ve had
   found similar to code to the one provided then paste it after that code.. the
   last three lines if the code are already there; therefore, there is no need to
   add them again.
 *  [idelfonsog2](https://wordpress.org/support/users/idelfonsog2/)
 * (@idelfonsog2)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382757)
 * Thank you, helgatheviking for your reply and concern.
 *  [idelfonsog2](https://wordpress.org/support/users/idelfonsog2/)
 * (@idelfonsog2)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382758)
 * Can you plugin just work by itself?
 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382759)
 * Yes, the plugin works by itself and does not rely on any other plugin.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Conflict’ is closed to new replies.

 * ![](https://ps.w.org/nav-menu-roles/assets/icon-256x256.png?rev=2336319)
 * [Nav Menu Roles](https://wordpress.org/plugins/nav-menu-roles/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nav-menu-roles/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nav-menu-roles/)
 * [Active Topics](https://wordpress.org/support/plugin/nav-menu-roles/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nav-menu-roles/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nav-menu-roles/reviews/)

 * 12 replies
 * 3 participants
 * Last reply from: [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/conflict-27/#post-6382759)
 * Status: resolved