0

I started receiving the following error on a WordPress site:

Warning: Declaration of SplitMenuWalker::walk($elements, $max_depth) should be compatible with Walker::walk($elements, $max_depth, ...$args) in /home/relati67/public_html/wp-content/themes/mentis/inc/mega-menu/split-menu.php on line 0

I have no idea what to do here. I found a thread with something similar, but the error pointed to a specific line (not line 0) and wasn't the exact same error.

I'm new to Stack Exchange -- thanks in advance for any help!

0

Hi and welcome to WordPress StackExchange. As a rule of thumb: the more information you provide about your problem, the better people can help you.

I assume that this error occurs on your development server?

In case this warning appears on your live system, I'd recommend to disable php error reporting, not to surpress the warning message, but rather to hide security issues for outsiders. Just a thought of mine.

The error message says, that the "WP menu walker class" exceeds the level of nesting.

The WPMenu Navwalker Class is the php-class, which is responsible for building the HTML menu structure of your theme. It basically says, that there is an error when building the menu of your theme.

Since you are using a commercial theme (Mentis), you have to contact the theme developer in order to help you/fix this issue.

If somebody fixes it here with a solution for you, then within the next update that fix will be overwritten (unless you build the fix as a plugin or child theme).

Another solution might be to remove the 4th level of nesting in your backend-menu. That way the Theme might be able to render 2 or 3 levels of nesting.

Like this:

Menu level 0
 |> level 1
     |> level 2
        |> level 3
           |> level 4 << remove item in dashboard >> design >> menu

Try removing level 4, if that doesn't fix it, try removing level 3 etc.

| improve this answer | |
  • Got it. There's only two levels of nesting on the website unless I'm missing something, but there are a ton of menu items. I will disable php error reporting like you suggested and then contact the theme developer. Thanks! – afar734 Nov 20 '19 at 14:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.