• Hi!

    We’ve updated our wordpress installation on our dev server to 5.5. This error started showing up in the menu bar:

    Notice: Undefined property: stdClass::$container_aria_label in /xxxx/wp-includes/nav-menu-template.php on line 190

    Bisecting code and disabling plugins pointed to wp mega menu as the culprit. I’ve had a quick look at the plugin source and your extension of wp_nav_menu args seems to be the problem (and a spelling error: overrite -> override)

    as with
    //add_filter(‘wp_nav_menu_args’, ‘overrite_functions_wp_megamenu’, 9999);
    the notice disappears

    Kind regards,

    Jasper

    • This topic was modified 4 years, 6 months ago by jepper88.
    • This topic was modified 4 years, 6 months ago by jepper88.
Viewing 15 replies - 1 through 15 (of 15 total)
  • I’m running into the same issue.

    Hello,
    In wp-includes/nav-menu-template.php line 190 there’s a missing empty(); function around $args->container_aria_label.
    Causes PHP errors everywhere wp_nav_menu(); function occurrence:

    $aria_label = ( 'nav' === $args->container && $args->container_aria_label ) ? ' aria-label="' . esc_attr( $args->container_aria_label ) . '"' : '';

    Should be:

    $aria_label = ( 'nav' === $args->container && !empty($args->container_aria_label) ) ? ' aria-label="' . esc_attr( $args->container_aria_label ) . '"' : '';

    Thanks for your report, We’ll fix it in the next release.

    Thanks

    Are you suggesting that it be patched by updating the WordPress core files? That’s a horrible practice.

    Is there a way to patch it by changing code in your plugin and not the WordPress core? Maybe there’s somewhere you can set a default value for $args->container_aria_label in the plugin?

    m.

    • This reply was modified 4 years, 6 months ago by mwendell.
    • This reply was modified 4 years, 6 months ago by mwendell.

    Hello Wendell,
    Thank you so much for your suggestion. Please don’t worry, the next update we will fix this issue.

    Thanks

    Hello Rejuan,

    Thanks for your reply. Do you have an estimate for when this upgrade might be released?

    Thanks!
    m.

    I’m also looking for a solution to this. I have edited the core WordPress file but as the previous poster mentioned, this is not an appropriate solution.

    Hello,
    Please contact Themeum support mail([email protected]), the support team will help you.

    Thanks

    Hello Rejuan,

    Any word on when we can expect a fix for this?

    Thanks!
    m.

    Hello @mwendell,
    There is a possibility of an update later this month. We sincerely apologize for your inconvenience. However, you can turn off debugging immediately from the wp-config.php file. So that, Undefined property doesn’t show on your site.

    Thanks

    Hello @mwendell,
    File location /wp-content/plugins/wp-megamenu/classes/class.wp-megamenu.php and then replace this code,
    https://pastebin.com/p8bdNEcL

    I hope your problem will be solved.

    Thanks

    Hello Rejuan,

    I just installed the latest version of wp-megamenu, 1.3.7, and the ‘undefined-property’ issue still exists.

    The code you posted to pastebin fixed the issue, but if I use that code then I have a hacked version of your plugin on my site. This means that I need to re-hack the plugin each time you post an update, and hope it doesn’t break something else in the plugin.

    Is there a reason that your pastebin fix did not make it into the latest version of the plugin?

    m.

    @mwendell did you change your mega menu plugin? The authors don’t give trust, they don’t fix problems, don’t acceptable reply.I can’t insert this plugin to a professional theme with this form because hacking is not professional.

    @rejuancse the issues is still not fixed. Are you still on this?

    Thread Starter jepper88

    (@jepper88)

    i still have the error, any progress on this?

    Hello @jepper88

    Can you tell me what error do you can see now and when?

    Kind Regards.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Undefined property: stdClass::$container_aria_label’ is closed to new replies.