#28951modulemenu.js: Showmodule can be called before Store is loaded
Description
Example: Using the direct page edit feature (backend.php?edit=xxx) the BE responds with “Module loader
No module found. If this is a temporary error, please reload the Backend!” error. I found that the ajax loading of modules in modulemenu.js took almost 1 second on this particular installation and therefore showModule was called before the modules had finished loading.
I introduced the following hack in showModule after which the BE successfully could load the page edit module:
showModule: function(mod, params) {
if(TYPO3.ModuleMenu.Store.getCount() == 0){
setTimeout("top.TYPO3.ModuleMenu.App.showModule('"+mod+"', '"+params+"')", 1000);
return;
}
A better approach would probably be to make the modulemenu block until it had completed it’s initialization.