I have a problem with saving the T3 Framework megamenu
In practice, after setting the megamenu and clicking on save, it does not save.
Inspecting I found some JS errors that I can't solve, the errors are:
megamenu.js: 463 Uncaught TypeError: Cannot set property 'undefined' of undefined
at Object.actions.saveConfig (megamenu.js: 463)
at HTMLButtonElement. <anonymous> (megamenu.js: 71)
at HTMLButtonElement.dispatch (jquery-1.8.3.min.js: 2)
at HTMLButtonElement.u (jquery-1.8.3.min.js: 2)
at Object.trigger (jquery-1.8.3.min.js: 2)
at HTMLButtonElement. <anonymous> (jquery-1.8.3.min.js: 2)
at Function.each (jquery-1.8.3.min.js: 2)
at init.each (jquery-1.8.3.min.js: 2)
at init.trigger (jquery-1.8.3.min.js: 2)
at HTMLButtonElement. <anonymous> (megamenu.js: 983)
I need help to solve it.
Update: the two line js of megamenu
Line 463 (from 456 to 477)
var menutype = $('#jform_params_mm_type').val(),
curconfig = T3AdminMegamenu.config;
if($.isArray(curconfig) && curconfig.length == 0){
curconfig = {};
}
**curconfig[menutype] = config;**
$.ajax({
url: T3AdminMegamenu.referer,
type: 'post',
data: {
t3action: 'megamenu',
t3task: 'save',
styleid: T3AdminMegamenu.styleid,
template: T3AdminMegamenu.template,
mmkey: $('#megamenu-key').val(),
config: JSON.stringify(config),
rand: Math.random()
}
Line 71 (from 65 to 75)
// bind event for action
$('.toolbox-action').click (function(event) {
var action = $(this).data ('action');
if (action) {
actions.datas = $(this).data();
**actions[action] ();**
}
event.stopPropagation();
return false;
});