• Resolved maxwelton

    (@maxwelton)


    Megamenu will throw an error if you save the menu settings before you’ve saved your first menu (this was on a new site I’m working on):

    Notice: Undefined index: theme in \wp-content\plugins\megamenu\classes\nav-menus.class.php on line 331

    The error shows up in the appearance -> menus megamenu box and prevents the selection of any megamenu options.

    Was able to fix by going into the plugin tools settings page and deleting the saved DB data.

    https://www.ads-software.com/plugins/megamenu/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Max,

    Thanks for the report. I’ll take a look at this and put a fix into the next version.

    Regards,
    Tom

    Thread Starter maxwelton

    (@maxwelton)

    No worries, this is an excellent plugin all the way ’round.

    Plugin Author megamenu

    (@megamenu)

    Thanks, and thanks for the review – much appreciated! ??

    Thread Starter maxwelton

    (@maxwelton)

    Just as an update, this notice seems to pop anytime a new menu location is defined and is then a new menu is associated with that location via appearance -> menus.

    Definitely an edge case. Most likely to be seen by someone working on a theme with debug on and showing notices…but a plugin installed after mmm which adds a new menu and theme location might trigger this? Dunno. Anyway, easy enough to solve with an isset() check or whatever.

    Thanks again.

    Plugin Author megamenu

    (@megamenu)

    Hi Max,

    Thinking about it, I actually fixed this in trunk a few days back. Here is the change (including a very unhelpful commit message), it’ll be included in the next release.

    https://plugins.trac.www.ads-software.com/changeset/1222256/megamenu/trunk/classes/nav-menus.class.php

    Regards,
    Tom

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP error if settings are saved before initial site menu is built’ is closed to new replies.