Title: WP Mobile Menu causes validation issues
Last modified: July 23, 2017

---

# WP Mobile Menu causes validation issues

 *  Resolved [databell96](https://wordpress.org/support/users/databell96/)
 * (@databell96)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/)
 * I’m trying to complete the theming to my clients upcoming redesign and I noticed
   a bunch of validation issues withb improperly nested tags ([https://validator.w3.org/nu/?doc=http%3A%2F%2Fvps30689.inmotionhosting.com%2F~myclar5%2Fbefore-and-after%2F](https://validator.w3.org/nu/?doc=http%3A%2F%2Fvps30689.inmotionhosting.com%2F~myclar5%2Fbefore-and-after%2F)).
   I noticed the majorty of them relate to code coming from WP Mobile Menu. Basically,
   they start right where my footer.php has </div><!– #page –> and then your plugin
   add a closing </div> whee no starting div or ul exists to close it. After temporarily
   turning off the plugin, the issues went away. But they shouldn’t have been there
   in the first place. Is there some way to correct this dilemma? I want my code
   to validate as much as possible and I certainly don’t appreciate these nesting
   issues.

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

 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9348978)
 * Hi,
 * Will need to take a closer look to this. You know exactly what specific div is
   not closed?
 * Thanks
    -Rui
 *  Thread Starter [databell96](https://wordpress.org/support/users/databell96/)
 * (@databell96)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9351155)
 * No, I don.t. Basically, your plugin added an extra </div> which started out your
   code, so it really was trying to close something that doesn’t exist.
 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9351216)
 * I see, thanks. Guess I found this line that doesn’t make sense and it’s probably
   causing that.
 * `$output .= '</div></ul>';`
 * It’s the line 116 in the file mobile-menu/includes/class-wp-mobile-menu-core.
   php
 * Or replace that file by this one
    [https://www.dropbox.com/s/9xsb56ce3e08gj8/class-wp-mobile-menu-core.php?dl=0](https://www.dropbox.com/s/9xsb56ce3e08gj8/class-wp-mobile-menu-core.php?dl=0)
 * Can you give it a try?
    Thanks
 * -Rui Guerreiro
    -  This reply was modified 8 years, 9 months ago by [Rui Guerreiro](https://wordpress.org/support/users/takanakui/).
      Reason: added a file link
 *  Thread Starter [databell96](https://wordpress.org/support/users/databell96/)
 * (@databell96)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9351799)
 * You mean delete it, right?
 * Did that, but still getting lots of validation errors. Things like:
    - No li element in scope but a li end tag seen.
    - Element ul not allowed as child of element ul in this context. (Suppressing
      further errors from this subtree.)
    - No li element in scope but a li end tag seen.
 * These comments existed previously.
 *  Thread Starter [databell96](https://wordpress.org/support/users/databell96/)
 * (@databell96)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9351801)
 * I just noticed this for each and every menu item in the code:
 * `<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-
   7911"><a title="Acne Essentials 2-Step System" href="http://vps30689.inmotionhosting.
   com/~myclar5/product/claritymd-2-step-system/" class="">ClarityMD 2-Step System
   </a></li></li>`
 * That explains the last bullet point from the list above. It’s adding an extra
   to each and every link somehow.
 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9352756)
 * Thanks. Manage to replicate that in my dev server.
    replace the file class-wp-
   mobile-menu-walker-nav-menu.php located in mobile-menu/includes/ by this one 
   in the link below.
 * [https://www.dropbox.com/s/bbxe38ibyxs4t5o/class-wp-mobile-menu-walker-nav-menu.php?dl=0](https://www.dropbox.com/s/bbxe38ibyxs4t5o/class-wp-mobile-menu-walker-nav-menu.php?dl=0)
 * -Rui
 *  Thread Starter [databell96](https://wordpress.org/support/users/databell96/)
 * (@databell96)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9355738)
 * Yes, that seemed to have helped a lot. Almost there and thanks for the assistance
   so far.
 * One more nesting error. Seems this isn’t closed either:
    `<div class="mob-menu-
   header-holder mobmenu" > <div class="mobmenul-container"><a href="#" class="mobmenu-
   left-bt"><i class="mob-icon-menu mob-menu-icon"></i><i class="mob-icon-cancel
   mob-cancel-button"></i></a></div><div class="mob-menu-logo-holder"><a href="http://
   vps30689.inmotionhosting.com/~myclar5" class="headertext">ClarityMD Official 
   Site</a></div></div></ul></div>`
 * Maybe line 116 was meant to be `$output .= '<div><ul>';`
 * Actually, I did that and the errors went away!
 * However….
 * C’mon, you didn’t really think we’d be finished?
 * I see a new error by doing that. It is:
 * > Element div not allowed as child of element ul in this context. (Suppressing
   > further errors from this subtree.)
   >  From line 1042, column 10; to line 1042,
   > column 54
 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9357460)
 * Huum that code doesn’t seem to be from WP Mobile Menu. I don’t have any `<ul>`
   like that in the code, mines always have classes or id’s.
 * Can you try to disable the plugin to see if that html it’s still there in the
   source?
 * Also can you send me an email to [support AT wpmobilemenu DOT com]
    so I can 
   ask some things I need in private.
 * Thanks
 * -Rui
 *  Thread Starter [databell96](https://wordpress.org/support/users/databell96/)
 * (@databell96)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9358531)
 * I just turned it off and then ran the HTML validator again. The issues went away.
   So it is the plugin. Sorry.
 * I’ll email you in private shortly.
 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9365126)
 * This situation was sorted.
 * -Rui Guerreiro

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

The topic ‘WP Mobile Menu causes validation issues’ is closed to new replies.

 * ![](https://ps.w.org/mobile-menu/assets/icon-128x128.png?rev=1890426)
 * [WP Mobile Menu - The Mobile-Friendly Responsive Menu](https://wordpress.org/plugins/mobile-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mobile-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mobile-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/mobile-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mobile-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mobile-menu/reviews/)

## Tags

 * [div](https://wordpress.org/support/topic-tag/div/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [ul](https://wordpress.org/support/topic-tag/ul/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)
 * [W3C](https://wordpress.org/support/topic-tag/w3c/)

 * 10 replies
 * 2 participants
 * Last reply from: [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/wp-mobile-menu-causes-validation-issues/#post-9365126)
 * Status: resolved