Endless "waiting animation"

schuetze's picture
schuetze
Tue, 03/21/2017 - 05:08
#1
Endless "waiting animation"

I can't edit the mega menu in my site anymore. If I click on the small pencil icon of a menu item, the popup dialogue comes up, but the waiting animation never ends ... In the developer console of Chrome, the following error is shown:

Waiting

Uncaught TypeError: Cannot read property 'essential' of undefined

    at Object.essentialItems (js_-AeHBfL_CsrUX7RhGOLDiwDv5t7BzxiAfeWcXFXtyq0.js:301)
    at HTMLAnchorElement.<anonymous> (js_-AeHBfL_CsrUX7RhGOLDiwDv5t7BzxiAfeWcXFXtyq0.js:189)
    at HTMLDocument.Ka (js_Xjzh1hVfcgVAixhmmB6Go8TUMPOiprA-2vkC-oWXARQ.js:19)
    at HTMLDocument.handle (js_Xjzh1hVfcgVAixhmmB6Go8TUMPOiprA-2vkC-oWXARQ.js:64)
    at HTMLDocument.o (js_Xjzh1hVfcgVAixhmmB6Go8TUMPOiprA-2vkC-oWXARQ.js:57)

This line is in file "md.menu-item.js" (line 177):
$.post(Drupal.settings.mdMenu.essential, data ,function(html) {

Could it be, that the new dev version that you have sent me some weeks ago, has a bug? Is "essential" missing?

Regards,
Oliver

phuonght's picture
phuonght
Tue, 03/21/2017 - 06:24

Hi,

Please check your mailbox.

Thank you.

phuonght's picture
phuonght
Tue, 03/21/2017 - 22:59

Image title

Please note that, you need to uncheck "Aggregate JavaScript files" to find js errors in files, then you can check as below:

Image title

Problem comes from overlay-child.js. You can please deactive module overlay or contact module author for support.

schuetze's picture
schuetze
Wed, 03/22/2017 - 07:01

The mentioned JavaScript file is a core Drupal file: "\modules\overlay\overlay-child.js". Why should I deactive module overlay for configuring MegaMenu? All administration in Drupal is done with overlays without any problem ... I think, this could be a problem with building the URL (see the comment of the JS function: "By default, forms are assumed to keep the flow in the overlay. Thus their action attribute get a ?render=overlay suffix."

Another user had the same problem - see http://megadrupal.com/comment/12914 . What solution have you found for him?

Regards,
Oliver

phuonght's picture
phuonght
Thu, 03/23/2017 - 00:14

Normally we do not support problem that comes from other modules. However, our developer found a solution for you:

Below code is in module overlay:

Drupal.overlayChild.behaviors.parseForms = function (context, settings) {
$('form', context).once('overlay', function () {
// Obtain the action attribute of the form.
var action = $(this).attr('action');
// Keep internal forms in the overlay.
if (action == undefined || (action.indexOf('http') != 0 && action.indexOf('https') != 0)) {
action += (action.indexOf('?') > -1 ? '&' : '?') + 'render=overlay';
$(this).attr('action', action);
}
// Submit external forms into a new window.
else {
$(this).attr('target', '_new');
}
});
};

you can see action=undifined, so action.index0f does not run. So we must fix by adding new function in megamenu to make overlay work

<form id="form-mnuitemseting" action="">

Please check your site.

schuetze's picture
schuetze
Thu, 03/23/2017 - 02:31

Many thanks. It's working now. Great support!!!

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.