Skip to content

MultiTenancyTrait::applyActiveOrgFilter() calls orX() with zero args — fatal on NC34, breaks ALL dbal-source query-backed schemas #2084

Description

@rubenvdlinde

Found 2026-07-24 during spectr fleet-report work: every dbal-source query-backed schema (register 2479 spectr-live — v-app-market, v-price-comparison, etc.) suddenly returned empty results.

Root cause: MultiTenancyTrait::applyActiveOrgFilter() invokes $qb->expr()->orX() with zero arguments, which is fatal/invalid on this Nextcloud 34 DBAL version — the failure surfaces as silently-empty result sets for object-source-backed schemas when multitenancy is active.

Workaround currently IN PLACE on the shared dev instance (do not revert without the fix): occ config:app:set openregister multitenancy --value='{"saasMode":false,"adminOverride":true}'

Proper fix: guard the orX() construction (skip the filter when there are no org predicates, or build the expression only when non-empty), plus a regression test covering multitenancy-enabled reads of an object-source schema.

Impact: any instance with multitenancy/saasMode active loses ALL external-register data silently — green-but-dead class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions