OpenEMR Custom Module Menu Not Visible

I deployed OpenEMR using the Docker image openemr:7.0.3 and added a custom module named copilot_module under interface/modules/custom_modules/. I am logged in as an admin user with Administrators permissions. In Manage Modules > Custom Module Listing, the module shows as Installed and Enabled. However, I cannot see the custom module’s entry (e.g., menu item) in the interface, and I also cannot find Global Settings. Other enabled custom modules are also not visible on the interface.

Details

  • Environment: OpenEMR 7.0.3, deployed via Docker (openemr:7.0.3).
  • Module: Custom module copilot_module located in interface/modules/custom_modules/copilot_module/.
  • User: Logged in as admin with Administrators permissions.
  • Module Status: In Manage Modules > Custom Module Listing, copilot_module is Installed and Enabled.
  • Issue:
    • No menu item for copilot_module (expected label: “WPecker Platform”) appears in the interface (e.g., under Modules or main menu).
    • Global Settings (expected under Administration > Globals) is not visible.
    • Other enabled custom modules also do not appear in the interface.
  • Module Configuration (module.json excerpt):
"menu": [
    {
        "label": "WPecker Platform",
        "menu_id": "external_link",
        "target": "main",
        "url": "/interface/modules/custom_modules/copilot_module/module.php",
        "requirement": 0,
        "global_requirement": 0
    }
]
  • Module Functionality: Manually accessing http:///interface/modules/custom_modules/copilot_module/module.php correctly redirects to https://copilot.wpecker.ai/, indicating the module itself works.

Troubleshooting Attempted

  1. Verified module.json:
  • Confirmed the module directory is copilot_module and module.php exists.
  • Added parent: “mod” to the menu section to place the menu item under Modules.
  • Validated module.json syntax using a JSON validator.
  1. Cleared Cache:
  • Removed cache files: docker exec <container_name> rm -rf /var/www/html/openemr/sites/default/documents/smarty/main/*.
  • Restarted Apache: docker exec <container_name> systemctl restart apache2.
  • Cleared browser cache and tested in incognito mode.
  1. Checked Permissions:
  • Confirmed the admin user has Administrators permissions.
  • Ensured file permissions: chown www-data:www-data and chmod 755 on copilot_module directory.
  1. Re-registered Module:
  • Disabled and re-enabled the module in Manage Modules.
  • Unregistered, then re-registered, installed, and enabled the module.
  1. Checked Interface:
  • Could not find Administration > Globals in the interface.
  • Tested with the default theme, but the issue persists.

Questions

  1. Where can I find the entry point (e.g., menu item) for custom modules in OpenEMR 7.0.3?
  2. Why is Global Settings not visible in the interface, even with admin permissions?
  3. Are there known issues with Docker deployments affecting custom module menu visibility?
  4. Could this be related to a configuration issue in the Docker environment or OpenEMR’s menu system?

Any guidance on resolving the missing menu items or locating Global Settings would be greatly appreciated. I can provide additional details, such as the full module.json, logs, or screenshots, if needed.

Thank you!

Hi Vicki,

I’m not sure where you are getting the module.json syntax. Are you using the openemr.bootstrap.php which is the main php load file for the system?

Are you loading in a module.json file and hooking into the MenuEvent system to insert your menu item?

The modules get loaded on each page load if they have been installed and enabled. The module on each page load has the chance to hook into the menu system via the MenuEvent that gets fired when the menu is loaded. That will insert a menu item under the Manage Modules (I’m assuming you’re following my skeleton module).