Support » Fixing WordPress » Help with Error_Log – Missing Argument

  • Hi,
    If anyone knows how to fix an error in the error_log, I would greatly appreciate it. This one error seems to log about a hundred times a day:

    [16-Dec-2018 15:18:25 UTC] PHP Warning: Missing argument 4 for FLLayout::filter_nav_menu_link_classes(), called in /home/txm9ymah4c5o/public_html/wp-includes/class-wp-hook.php on line 286 and defined in /home/txm9ymah4c5o/public_html/wp-content/themes/bb-theme/classes/class-fl-layout.php on line 288

    Is this because the syntax is wrong?? This is my first time trying to fix an error, but I am familiar with the files and modifying code.


    • This topic was modified 2 years, 1 month ago by hl247.
Viewing 4 replies - 1 through 4 (of 4 total)
  • I see some references to what might possibly be an issue with the current theme.

    “on line 286 and defined in /home/txm9ymah4c5o/public_html/wp-content/themes/bb-theme/classes/class-fl-layout.php”

    The site appears to be using the Beaver Builder Theme, Version: Due to the commercial nature of the theme, you may want to contact support at Beaver Builder and inquire about any known issues. It might be something as simple as a theme update or a known issue they can help with.

    Beaver Builder theme does indeed use that filter and it correctly passes four args to the filter, other plugins do not. Weve seen this come up a few times recently, latest was the wp mobile menu plugin which was also using the same filter and only passing ONE arg to the filter.



    Hi Clayton and Simon,

    You two are correct. It is a Beaver Builder theme and we’re also using their builder. I did not know where to begin with trying to address this error. They have great support, so I will contact them. Was thinking this is my error because I can see it lol 🙂

    Thank you both for the help!! I didn’t think anyone would really be on the forums….I am very grateful for your kindness!! Happy holidays to you all! 🙂


    Well Beaver Builder support will tell you exactly what I have already told you, the bb theme is not doing anything wrong, it uses all four of the args for that filter, I can show you the code from the theme…

    add_filter( 'nav_menu_css_class', __CLASS__ . '::filter_nav_menu_item_classes', 999, 4 );

    and the function: static public function filter_nav_menu_item_classes( $classes, $item, $args, $depth ) { ... }

    As you can see *four* args passed by the filter and *four* are there in the function.

    Another plugin is using the same filter with the wrong amount of args.

    If you disable other plugins you will see the error go away and find the plugin that is doing it wrong.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help with Error_Log – Missing Argument’ is closed to new replies.