Problem/Motivation

The manager loads terms with entity queries using ->accessCheck(TRUE). On sites where a module restricts taxonomy term entity access — e.g. domain_entity (and the Domain suite) — those queries get filtered, so only a subset of terms appears in the tree, dashboard counts, range navigator, and search.

Concretely, domain_entity's hook_query_alter() adds a domain condition only when a query has both the entity_type metadata and the taxonomy_term_access tag — both of which an access-checked entity query carries. Core's own term overview is unaffected because it uses TermStorage::loadTree(), a raw db->select() that has no entity_type metadata, so the filter never engages.

Result: a 421-term vocabulary shows only 66 in the manager, while core's overview shows all 421. Worse, the same filtering silently truncates Normalize Weights, snapshot capture, sibling renumbering, clone, and CSV export — operations that must act on the whole vocabulary.

Steps to reproduce

1. Enable domain_entity (or any module granting per-term entity access) and assign terms to specific domains.
2. Open a vocabulary in the manager where many terms aren't on the current domain.
3. Tree/dashboard show only the current domain's terms; core's overview shows all.

Proposed resolution

Use ->accessCheck(FALSE) for all term queries in the manager. The UI is gated by the administer taxonomy permission, so it should operate on the full vocabulary regardless of per-entity access grants — matching core's overview, which shows every term to administrators. Do not add the taxonomy_term_access tag: on an entity query it re-triggers the exact filtering this fixes.

Issue fork etm-3601290

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hanoii created an issue. See original summary.

hanoii’s picture

Status: Active » Needs review
hanoii’s picture

Redacted, wrong issue.

thronedigital’s picture

Thank you! Sorry life has gotten in the way as of late - i'll review this in the next day or so.

  • b8663341 committed on 2.2.x
    Issue #3601290 by thronedigital, hanoii: Also bypass entity access in...

  • hanoii authored 98308296 on 2.2.x
    Issue #3601290 by hanoii: Show the full vocabulary regardless of entity...
thronedigital’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.