• Resolved Caffeinedecoder

    (@caffeinedecoder)


    Hi Shazdeh,

    I discovered the Gantry framework today and started setting it up and playing with it. It’s awesome and I came across this plugin in a forum where you updated it to be compatible with Gantry.
    This plugin will make a huge difference for me but I get an error in Gantry v4.0.5 .
    Warning: Missing argument 1 for GantryWidgetMenu::clearMenuCache(), called in /home/…/wp-content/plugins/menu-items-visibility-control/init.php on line 130 and defined in /home/…/wp-content/plugins/gantry/widgets/menu.php on line 268

    Can you please help?

    Thanks ??

    https://www.ads-software.com/extend/plugins/menu-items-visibility-control/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Caffeinedecoder

    (@caffeinedecoder)

    Hi Shazdeh,

    Can you give any positive direction on the above problem please?

    Thanks,
    Paul

    Plugin Author shazdeh

    (@shazdeh)

    Hi,
    the issue was resolved with the 0.3 update. ??

    Hi Shazdeh,

    I’d like to know if you will be active on the support thread for Harmony 2.0. Is that your theme?

    I love it but it doesn’t seem like it’s compatible with IE. No header image shows there.

    Thanks,
    Brian

    Thread Starter Caffeinedecoder

    (@caffeinedecoder)

    Hi Shazdeh,

    Thanks for the reply. I got that error and am still getting it. I have the latest Gantry framework update now and the 0.3 plugin update.

    What argument should I place in there?

    function clear_gantry_menu_cache() {
    if( class_exists( ‘GantryWidgetMenu’ ) ) {
    GantryWidgetMenu::clearMenuCache();
    }

    Thanks for the help.

    Paul

    I too am seeing this error with Gantry 4.06 and Menu Item Visibility Control .03

    Would there be something in our setup that is preventing your fix, shazdeh, in v0.3 from fixing the issue?

    As per the warning, GantryWidgetMenu::clearMenuCache() just needs an argument.

    I tried an integer, an undefined variable and NULL. All seem to work to remove the warning.

    So on 130 of ./wp-content/plugins/menu-items-visibility-control/init.php

    change

    GantryWidgetMenu::clearMenuCache();

    to

    GantryWidgetMenu::clearMenuCache(NULL);

    Indeed… the method clearMenuCache from GantryWidgetMenu must have and argument to get ride of the warning.

    Another solution is to copy menu.php from the directory widgets from the gantry plugin into the folder widgets of your theme and remove the argument from the clearMenuCache function.

    ex.
    /wp-content/plugins/gantry/widgets/menu.php
    to
    /wp-content/themes/your-gantry/widgets/menu.php

    then replace
    public static function clearMenuCache($menu_id)
    to
    public static function clearMenuCache()

    GantryWidgetMenu has a lot of functions with unused argument… for me these class must be cleaned.
    https://stackoverflow.com/questions/15699995/why-unused-code-should-be-deleted

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Gantry compatibility’ is closed to new replies.