You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Copilot: admin UI startup throws "Cannot read properties of undefined (reading 'length')" for a user without menu entries #697
2025.4 - LTS (pimcore/copilot-bundle 2.5.x, still present on 2.5 HEAD; the classic admin UI file is gone from 2026.x)
Affected capability
Copilot
Affected bundle
pimcore/copilot-bundle (2.5)
Steps to reproduce
Log in to the classic admin UI as a user whose permissions leave no actionable entry in the main menu (or with an empty main menu).
Wait for the admin UI to start: Copilot builds its action store and requests the actions during startup (startup.js → mainWindow.controller).
Actual Behavior
public/js/pimcore/copilot/main-window/actionStore.js throws Cannot read properties of undefined (reading 'length') in addMenuActions():
addMenuActions(){if(this.menuActions.length===0)return;// menuActions is undefined
this.menuActions is only assigned in buildMenuActions(), and both createMenuActions() (empty menu) and buildMenuActions() (no actionable menu item) return before that. We see this in production error tracking for restricted users.
Expected Behavior
The action store treats "no menu actions" as an empty list: the server actions load and no error is thrown.
A fix is on its way as a PR to pimcore/copilot-bundle2.5.
changed the title [-]Copilot: opening the Copilot window as a user without menu entries throws "Cannot read properties of undefined (reading 'length')"[/-][+]Copilot: admin UI startup throws "Cannot read properties of undefined (reading 'length')" for a user without menu entries[/+]on Oct 22, 2026
Activity
[-]Copilot: opening the Copilot window as a user without menu entries throws "Cannot read properties of undefined (reading 'length')"[/-][+]Copilot: admin UI startup throws "Cannot read properties of undefined (reading 'length')" for a user without menu entries[/+]