AnsweredAssumed Answered

How do you remove a Menu from the MegaMenu in 7.6.1.0?

Question asked by Jeff Bickart on Dec 14, 2015
Latest reply on Dec 15, 2015 by Alan Beam

According to this documentation, you can remove a menu from the MegaMenu and this has worked great with 7.5.x.x.

 

However, the same code does not work in 7.6.1.0 (Professional)

 

The code is in custom/Extension/modules/Contacts/Ext/clients/base/menus/header

 

if (isset($viewdefs['Contacts']['base']['menu']['header']))
{
    foreach ($viewdefs['Contacts']['base']['menu']['header'] as $key => $moduleAction)
    {
        //remove the link by label key
        if ($moduleAction['label'] == "LNK_NEW_CONTACT")
        {
            unset($viewdefs['Contacts']['base']['menu']['header'][$key]);
        }
    }
}

 

Upon login I get the following error in the console and can't use Sugar

FATAL[2015-12-14 19:36:21]: Uncaught TypeError: headerMeta.concat is not a function at http://localhost/~bickart/7610/cache/include/javascript/sugar_grp7.min.js?v=zjA5C4CjHvJY9o2ZdqK3AA on line 3252app.augment.ConsoleWriter.write @ logger.js:123app.augment.log @ logger.js:330app.augment.fatal @ logger.js:261module.handleUnhandledError @ error.js:365window.onerror @ error.js:465

sugar_grp7.min.js?v=zjA5C4CjHvJY9o2ZdqK3AA:3252 Uncaught TypeError: headerMeta.concat is not a function(anonymous function) @ sugar_grp7.min.js?v=zjA5C4CjHvJY9o2ZdqK3AA:3252_.each._.forEach @ underscore.js:78getModuleLinks @ sugar_grp7.min.js?v=zjA5C4CjHvJY9o2ZdqK3AA:3248app.metadata.getSweetspotActions @ sugar_grp7.min.js?v=zjA5C4CjHvJY9o2ZdqK3AA:3313SUGAR.jssource.views.base.sweetspot-searchbar.controller.getSweetspotActions @ components_ab9d5ddd86bdbf98650fedea0f3779ab.js:48090SUGAR.jssource.views.base.sweetspot-searchbar.controller.initLibrary @ components_ab9d5ddd86bdbf98650fedea0f3779ab.js:48064triggerEvents @ backbone.js:94Backbone.Events.trigger @ backbone.js:187(anonymous function) @ events.js:60triggerEvents @ backbone.js:94Backbone.Events.trigger @ backbone.js:187(anonymous function) @ app.js:505(anonymous function) @ app.js:497(anonymous function) @ async.js:190(anonymous function) @ async.js:94(anonymous function) @ async.js:187(anonymous function) @ async.js:459(anonymous function) @ app.js:494callback @ metadata-manager.js:825(anonymous function) @ metadata-manager.js:936(anonymous function) @ async.js:190(anonymous function) @ async.js:94(anonymous function) @ async.js:187(anonymous function) @ async.js:459_fetchLabels.success @ metadata-manager.js:926app.api.call.success @ metadata-manager.js:98params.success @ sugarapi.js:607n @ jquery.min.js:2o.fireWith @ jquery.min.js:2w @ jquery.min.js:4d @ jquery.min.js:4

 

 

Any help would be appreciated. Is there an update method to remove menu's in 7.6.1.0 or 7.7.0.0

Outcomes