Skip to content

browse labels duplication #1831

@peterjanssens

Description

@peterjanssens

When using multiple locales the browse summary of for instance collections is duplicated on it's labels. (find > objects > browse)

2.x

Image

1.7.x

Image

it comes down to the new version building the values array on $va_facet[$label_values['label_sort_']][...] in the getFacetContent function, where the old version folds them on the keys $va_facet[$va_fetched_row[$vs_rel_pk]][...]. By having the labels as first key there is this duplication (unless similar labels collapsed).

$va_facet[$label_values['label_sort_']][$va_fetched_row[$vs_rel_pk]][$va_fetched_row['locale_id']] = $va_facet_item;

The helper function caExtractValuesByLocale extracting the labels no longer works because most labels are unique (hence that item returned early), only the collapsed items sort of work (doesn't matter that much which is returned because they are all the same).

I guess this change from key to label was intentional - there is a lot going on in that 4200 line facet gathering function - too much for me to judge if this can be reverted to the old (preferred?) behavior ? The actual sorting happens later.

Could you have a look at this please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions