Skip to content

TaxonomyService::getVocabulary does not respect context argument #28

@DrillSergeant

Description

@DrillSergeant

Steps to reproduce:

  1. create a vocabulary (in my example called 'applications') and some taxonomies inside
  2. switch to another dimension and change the title of one taxonomy to something different
  3. access the taxonomie-nodes via fusion:
    ${q(Taxonomy.vocabulary('applications', site.context)).children()}

Expected behaviour:
You get the taxonomy-nodes of the current site-context (in the correct dimension)

Actual behaviour:
You get the taxonomy-nodes of the default site-context (in the default dimension)

Possible solution
I am quite sure the probem is that TaxonomyService::getVocabulary does not hand over the context argument when fetching the root-node. I will create a pull request to fix this.

Workaround
As a workaround in my fusion-code, I get the taxonomies meanwhile this way:
items = ${q(Taxonomy.root(site.context)).children('applications').children()}

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