Vocabulary Condition provides taxonomy-based visibility conditions for blocks. The conditions plug into the core condition plugin API, so they work on the Block Layout page and anywhere else conditions are available (for example, the Context module).
The 2.0.x branch (the one submitted for review) provides two conditions:
- Vocabulary or term: applies on taxonomy term pages. It matches whole vocabularies, and additionally specific terms with the option to include all of their descendants.
- Content tagged with vocabulary: applies on node pages, showing a block on any node tagged with a term from the selected vocabularies or terms, optionally including their descendants.
Vocabularies and terms are combined with OR, and both conditions collect the proper cache metadata so that changes in the term hierarchy invalidate cached results.
How it differs from Drupal core and why it is still useful.
Since Drupal 9.3, core covers the original use case of the 1.x branch (the generic entity bundle condition exposed for taxonomy terms, plus the taxonomy term route context). The 2.x branch goes beyond that: It adds matching by specific term including descendants, which keeps section-based block placement working when new child terms are created, and it adds taxonomy-based visibility for node pages, which core does not provide at all. The 1.x branch is kept only for backwards compatibility and receives no new features.
Comments
Comment #2
avpadernoThank you for applying!
Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review. See also Policy on the use of AI when contributing to Drupal which is valid when contributing to Drupal, either by committing code in a project, or by creating a merge request for an existing project.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #3
avpadernoWhat reported in the issue summary about the differences with Drupal core should be added to the project page.
Comment #4
trebormcThanks for the review. I've updated the project page with a dedicated "How it differs from Drupal core" section.
Comment #5
brian.willows@hsj.co.uk commentedReview of vocabulary_condition (2.0.x @ 4607692) — no blockers found; recommend for security advisory coverage.
Small, focused module: taxonomy-based block-visibility conditions for term pages and content pages, adding specific-term and descendant matching over core's entity_bundle condition. I ran the coding-standards tooling and read all three source files plus the tests.
Coding standards: phpcs is fully clean under Drupal + DrupalPractice (0 errors, 0 warnings).
Code quality — good:
Tests: kernel coverage for both conditions — discovery, by-vocabulary, by-specific-term, descendants (asserting ancestor cache tags), negation, default config, summary, and a config-schema test. Test code exceeds source in size.
Security: nothing of concern — admin-only block configuration, no raw SQL, entity API throughout, escaped output; visibility-only (not access control).
Checklist: full project; proper 2.0.x branch; clean info.yml (no version/project); core-only dependency (taxonomy); README documents the Node-module requirement of the content condition and the AND-combination caveat.
Optional, non-blocking: (1) no composer.json — fine for a core-only module, but a minimal one is worth adding; (2) the "Content tagged with vocabulary" condition needs the Node module (documented) — you could gate/hide it on node-less sites, but it's harmless as is.
Clean, well-tested, and genuinely differentiated from core. Nice work.
I use Assisted AI but I review what it generates
Comment #6
vishal.kadamI am changing priority as per Issue priorities.