Problem/Motivation

When editing the Acquia DAM Asset Library view, selecting a default value for the exposed Category filter (DAM Assets: DAM category filter) does not work.

The inline views preview reflects the category filter selection, but the media library does not. Re-opening the filter to edit in the View UI, the initially selected category is not selected.

When this filter is not exposed, it appears to work as expected, filtering results that match the selected category, though there is still the bug that the category selection is not selected when editing the filter in the Views UI, so simply opening it up and saving it without making any changes will result in a change to the filter.

This would be quite useful for us because we use our DAM on multiple sites, but almost always want each of these sites to pull from a single category and this would save a filtering step almost every time the media library is used.

Issue fork acquia_dam-3572684

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

cyu created an issue. See original summary.

nickolaj made their first commit to this issue’s fork.

nickolaj’s picture

Status: Active » Needs review

Patch fixes the exposed category filter default value by passing `$this->value` as `#default_value` from `AssetCategoryFilter::valueForm()` and falling back to `#default_value` in `WidenCategories::preRender()` when no user input is present.