Skip to content

Index page on the users source stays blank: "Open profile" reads row.id before any row is selected #2187

Open

Description

@SudoThijn

Description

An index page that reads the built-in users source (entitySource: "users") stays blank: CnIndexPage throws while it renders and shows nothing, not even the page header. In Dossiq this is the "Departments and staff" page (Advanced → Departments and staff, /apps/dossiq/settings/departments), which the design board DqAfdelingen draws as a tree of Nextcloud groups beside a table of each group's staff, with their roles, e-mail and presence today.

Steps to reproduce

  1. In Dossiq, as an administrator, open Advanced → Departments and staff (/apps/dossiq/settings/departments).
  2. Wait for the page to load and open the browser console.

Expected behaviour

The page shows the header (title, Download, Actions), the search field, the groups as folders and the staff table, as the board draws it.

Actual behaviour

The content area stays empty. The console shows two uncaught errors, and no request for the users or groups is made:

TypeError: Cannot read properties of null (reading 'id')
    at Object.href (indexSources.js, users source, row action "open-profile")
    at resolveItemActionLink (utils/actionLink.js)
    at Proxy.renderedActions (CnContextMenu.vue)
    ...
TypeError: Cannot read properties of null (reading 'parentNode')

Vue reports it as "Unhandled error during execution of render function at at at ".

Cause

Two pieces meet:

  • src/composables/indexSources.js:1816: the users source's row action "Open profile" builds its link from the row without a guard: href: (row) => generateUrl(`/u/${encodeURIComponent(row.id)}`). Its sibling "Send email" does guard (visible: (row) => Boolean(row && row.email)), so it is skipped while there is no row.
  • src/components/CnContextMenu/CnContextMenu.vue:233: renderedActions resolves every visible action's link for targetItem, also while the menu is closed. CnIndexPage mounts the right-click menu with :targetItem="contextMenuShownRow" (CnIndexPage.vue:1268-1273), which is null until a row is right-clicked, so href(null) runs on the first render and throws.

Loading the page with only the first line changed to row?.id makes it render fully (groups, staff table, row menus), so this is the whole cause. The row menu came in with 5790c8c ("a member's row menu opens their profile and mails them", 24 October). Both lines are the same on main, beta and development (2.180.0 in Dossiq).

A fix in CnContextMenu (resolve no links while targetItem is null, or while the menu is closed) also protects every other source or app whose function-valued href or to reads the row; guarding the users source's href fixes this page on its own.

Acceptance criteria

  • An index page on the users source renders its header, folders and staff table
  • CnContextMenu does not call an action's href / to function with a null item
  • Right-clicking a staff row still offers "Open profile" with the right link
  • A test covers an index page whose row actions have a function-valued href before any row is right-clicked

Activity

  1. SudoThijn commented on Nov 16, 2026

    @SudoThijn
    ContributorAuthor

    Follow-up once this is fixed: the Departments and staff page in Dossiq (Advanced → Departments and staff, /apps/dossiq/settings/departments) still needs to be compared with the design board DqAfdelingen. That comparison could not be done, because the page rendered nothing. When the fix is in Dossiq, the page should be checked against the board again, and any differences filed as their own issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions