After Migration from Media Acquia DAM opening the Media library shows an error message

Created on 9 July 2025, 3 months ago

Problem/Motivation

After Migration from Media Acquia DAM and change the widget to use media library instead of Entity Browser, every time I open the Media selection I see an error and 0 images until I select a category.

Error:

Error message
Something went wrong with the request, the search could not be completed.

Proposed resolution

I still working to debug the issue.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇧🇷Brazil aluzzardi Pelotas, RS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @aluzzardi
  • 🇧🇷Brazil aluzzardi Pelotas, RS

    I did not found the exactly motive for this issues, I add a quick change on the AssetCategoryFilter class, if the value is empty I add the string all, here the patch.

  • 🇮🇳India chandu7929 Pune

    I attempted to replicate the issue but was unable to do so. Could you please share the database log generated when you visit the media library page and encounter the error? While this error can occur if a user is not authenticated with Widen, I don't believe that is the case here.

  • 🇧🇷Brazil aluzzardi Pelotas, RS

    Hi,

    Here the logs from the request:

    API responded with status: 400. If the issue persist contact the site admin. Error message: Client error: `GET https://api.widencollective.com/v2/assets/search?query=+cat%3A%28%29+ft%3A%28image%29+rd%3A%28%5Bbefore+08%2F06%2F2025%5D%29+AND+ed%3A%28%28isEmpty%29+OR+%5Bafter+08%2F05%2F2025%5D%29&sort=-created_date&limit=12&offset=0&expand=asset_properties%2Cembeds%2Cfile_properties%2Cmetadata%2Csecurity%2Cthumbnails` resulted in a `400 Bad Request` response: @ "error": true, "response_code": 400, "error_message": "Search syntax error near \")\"", "stack_trace": null

    Client error: `GET https://api.widencollective.com/v2/assets/search?query=+cat%3A%28%29+ft%3A%28image%29+rd%3A%28%5Bbefore+08%2F06%2F2025%5D%29+AND+ed%3A%28%28isEmpty%29+OR+%5Bafter+08%2F05%2F2025%5D%29&sort=-created_date&limit=12&offset=0&expand=asset_properties%2Cembeds%2Cfile_properties%2Cmetadata%2Csecurity%2Cthumbnails` resulted in a `400 Bad Request` response: @ "error": true, "response_code": 400, "error_message": "Search syntax error near \")\"", "stack_trace": null

    With the patch to force the filter to start with all, the error does not happen.
    I added an image for after the patch.

    The issue might be related to my user on Widen have permissions on multiple folders that are used to 2 different sites, and the module maybe does not handle that properly.

  • 🇧🇷Brazil aluzzardi Pelotas, RS

    This is still happening on version 1.1.4
    Seems related something related with metatags and other modules
    When first open the url is too large and I receive this response:

    Request-URI Too Long
    The requested URL's length exceeds the capacity limit for this server.

    Apache/2.4.62 (Debian) Server at burnaby.ca-web Port 80

  • 🇧🇷Brazil aluzzardi Pelotas, RS

    Found what is causing, it's related to this issue on core:
    https://www.drupal.org/project/drupal/issues/2842525 🐛 Ajax attached to Views exposed filter form does not trigger callbacks Needs work
    With this applied, it's passing all fields from the node form to the query parameters on the media library and causing the error.

  • 🇧🇷Brazil aluzzardi Pelotas, RS

    I was able to maintain a patch from the issue https://www.drupal.org/project/drupal/issues/2842525 🐛 Ajax attached to Views exposed filter form does not trigger callbacks Needs work
    I used this one: https://www.drupal.org/files/issues/2025-01-22/2842525-drupal-views-ajax...

    I will close this as the issue is not related to Acquia DAM.

Production build 0.71.5 2024