I've developed a module using joomla's core ajax interface. It worked fine until I changed the modules's menu asssignment from "all" to "only selected" in order to show the module not on every page.
With this my ajax interface (the javascript to trigger module) now gets an error404 (when calling script-url from browser I get:
."LogicException: Module mod_my_module is not published, you do not have access to it, or it's not assigned to the current menu item"
I've checked component com_ajax (ajax.php). There I found that modulehelper
returns id="0" in case that only selected menu-items have been assigned to module.$moduleObject = JModuleHelper::getModule('mod_' . $module, null);
Is this a bug or a limitation for modules using joomla's ajax interface?