Closed (fixed)
Project:
Acquia DAM
Version:
1.1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2024 at 20:36 UTC
Updated:
10 Nov 2025 at 17:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
capysara commentedComment #3
capysara commentedSupport ticket opened with Acquia
Case Number
01081685
Comment #4
capysara commentedComment #6
capysara commentedI created a MR to fix the issue with the single value select list, but the multi value select list still doesn't reset correctly.
Comment #7
capysara commentedComment #8
capysara commentedUpdated the MR to address #10 from IS
Now selecting multiple values should respect the filter_operation in the views filter config.
The Clear button still doesn't work correctly.
Comment #11
chandu7929 commented@Rajeshreeputra - Requested some changes, please take a look.
Comment #12
rajeshreeputraUpdated as per review feedback, requesting review.
Comment #13
chandu7929 commentedVerified recent changes and it looks good to me. I would request another sets of eyes.
Comment #14
ricardo garcía commentedI encountered an issue when using the patch while switching between grid and table with selected filters because the JavaScript was attempting to access the form element with
id="views-exposed-form-acquia-dam-asset-library-widget". However, in some cases, it seems the form didn’t exist on the page, which resulted in a JavaScript error when trying to manipulate the form’s elements.Error Message (with private information removed):
An error occurred while attempting to process https://your-site-url/admin/content/media-dam-widget/asset_library_type?media_library_opener_id=media_library.opener.editor&media_library_allowed_types[0]=documents_asset&media_library_allowed_types[1]=image_asset&...&_wrapper_format=drupal_ajax: document.getElementById(...) is null.Root Cause:
The JavaScript was trying to interact with a form that wasn't present on the page at the time of execution, causing a null reference error.
Possible Solution:
By adding an early return when the form is not found, the script avoids further execution and prevents errors:
This ensures that the script only proceeds if the form exists, avoiding the null reference issue. It worked for me, but you all might have more context on how to properly resolve it. I’m just sharing my input in case it helps.
I’ve attached the .diff file for context and the image of the original issue (with private information removed).
Comment #15
becw commentedI've encountered both of these issues:
I'm also running into:
I'm attaching an example of a view that exhibits these issues. Here's what my exposed filters and sorts look like:
I find that:
On top of that:
Neither of the changes proposed in the MRs on this issue resolve my problems -- MR 30 throws a php error, and MR 75 clears the additional exposed filters but can't handle the exposed sorts.
Comment #16
vipin.mittal18This issue should now be fixed against the 1.1.x branch instead of 1.0.x, as it is actively maintained.
Comment #17
becw commentedThanks! I tested these latest changes and found that:
Comment #18
becw commentedI have also found that filter values containing an ampersand are not handled correctly. Specifically, one of our DAM select lists contains values like "Places | Classroom & Education". When this is selected as a filter, I get an error on the filter select list, no results, and the error message "The submitted value Places | Classroom in the image_classification element is not allowed."
Comment #21
chandu7929 commentedValidated changed of MR197 and can confirm following items have been fixed:
Hence requesting review.
Comment #23
chandu7929 commentedHello @becw,
With respect to your issue:
This is also fixed.
Comment #24
rajeshreeputraValidated changes in MR!197 and it fixes the items listed in #21.
Comment #25
vipin.mittal18I have validated all the issues raised in this ticket, and everything is working fine.

Filters used are mentioned in the screenmshot
Comment #26
becw commentedThe latest work in MR!197 is working great for me!
I've attached screenshots of the remaining issue, but if you'd prefer I could open a separate ticket.
Comment #27
chandu7929 commentedHello @becw,
I have verified with "Metadata: Selection list" with field "Usage right" and don't see any issue even if I have asset tagged with label that contains ampersands, please see the below screenshot.

Also, could you please let us know how you are creating filter "Image Classification" and which filed being used for this filter?
Comment #29
japerryMultiple test failures, so moving to NW
Comment #30
rajeshreeputraFixed failing test, requesting review.
Comment #32
japerryTests and code looks good. Merged!