I'm creating a Facet based in a taxonomy term,
My settings for the facet are:
* Widget: dropdown
* Hide facet when facet source is not rendered: on
* Ensure that only one result can be displayed: on
* Operator: OR
* Enable parent when child gets disabled: on
* Minimum count: 1
* Sort by taxonomy term weight: on and Ascending sort order
Once I index content, and manually sort the Taxonomy term weight as desired, I go to the page, I can see my facet but it never sort by weight, already cleared cache, reindexed, moved the list multiple times, reindexed, nothing changes.
Comments
Comment #2
cristian100I'm seeing a problem in the code:
facets/src/Plugin/facets/processor/TermWeightWidgetOrderProcessor.php
The index field is based in taxonomy term name (field_category:entity:name), and the code above is assuming the field will be an id, which is not always the case, therefore, it can't find the right entities by name. I wish there could be a way to handle this better.
Comment #3
borisson_I think doing #2851851: Facet source plugins should provide metadata for facet fields first would make this a lot easier.
PS: It seems you (like many others – it's really easy to misinterpret) are confused by the "Issue tags" field. As the guidelines state, they aren't meant for free text tags related to the issue, but only for specific categorization purposes, usually by module maintainers.
So, if you aren't sure your current usage is correct, please just leave the field empty.
Comment #4
borisson_This should only work for actual entities, so let's filter that out.
Comment #5
borisson_We should probably also extend the function test coverage for this.
Comment #6
borisson_Adds test coverage.
Comment #7
borisson_Adding related issue.
Comment #8
borisson_I forgot to add a docblock.
Comment #10
borisson_Comment #11
acWorks
Comment #12
borisson_