Account created on 20 February 2020, over 4 years ago
#

Merge Requests

Recent comments

I’m experiencing this same issue. I’d just like to know if it’s something I need to worry about or if I can ignore it while it’s being resolved. Thanks.

I 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:

if (!form) {
  return;
}

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).

This patch helped me a lot, but with version 1.0.23 it didn't work. It was necessary to rebase the patch.

Production build 0.71.5 2024