Issue Bug Closed

#28951modulemenu.js: Showmodule can be called before Store is loaded

Thomas Pilgaard Carlsen 08/12/11, 14:53 updated 10/24/17, 20:18

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.

Reviews 2