Media Name column of admin view has the wrong href

Created on 5 June 2023, about 1 year ago
Updated 7 June 2023, about 1 year ago

When I upload media (for example, at /media/add/image), the media is not available at the URLs listed at /admin/content/media. When I try to visit the URL for the media, I see 'The image "http://127.0.0.1/media/123" cannot be displayed because it contains errors.'

However, if I go to the files tab, I see the image I just uploaded and it is viewable at /sites/[my_site]/files/YYYY-MM/filename.png

The issue is not that /media/123 does not work as a URL. The issue is that the field in the Media Name column does not have the correct href. The href should end in "/edit". The column should link to paths like /media/123/edit, and not to /media/123.

πŸ› Bug report
Status

Postponed: needs info

Version

10.1 ✨

Component
MediaΒ  β†’

Last updated about 16 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States arnoldbird

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

Comments & Activities

  • Issue created by @arnoldbird
  • πŸ‡ΊπŸ‡ΈUnited States arnoldbird
  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    The summary describes normal usage so there must be other steps to reproduce the bug.

    Could you add a screenshot to explain which images you are referring to? I think I know which ones but I want to be sure.

    Is Drupal emitting that error or is the web browser showing it? Can we get a screenshot of that too?

    Can you reproduce the bug on another platform, like https://simplytest.me/?

  • Status changed to Closed: cannot reproduce about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States arnoldbird

    I can't reproduce it at https://simplytest.me/

    It must be something specific to my environment.

  • πŸ‡ΊπŸ‡ΈUnited States arnoldbird

    Please see the attached screenshots.

    media-name-link-broken.png shows the most recent upload at admin/content/media. The "test image" link in the Media Name column should link to /media/42/edit, but instead it links to /media/42. And when you click on that bad link, you see the error in media-image-bad-url.png.

    In other words, the issue is not that the media doesn't load at the bad URL -- we wouldn't expect it to load at the wrong URL. Rather, the issue is that the Media Name column has the wrong link href. Drupal is somehow supplying the wrong URL for the links in the Media Name column at /admin/content/media.

  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States arnoldbird
  • πŸ‡ΊπŸ‡ΈUnited States arnoldbird
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    "because it contains errors" isn't a string in Drupal code so this is probably a browser message. I think the platform struggles to create thumbnails.

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    This and πŸ’¬ After Drupal 10 upgrade, media library previews require browser cache clear Active are undoubtably the same platform problem. There should only be one support issue open for this.

  • πŸ‡ΊπŸ‡ΈUnited States arnoldbird

    "undoubtably the same platform problem"

    I could definitely believe these are related issues, but we haven't verified this. Many times, when encountering two issues at roughly the same time, I have mistakenly concluded that they were related, only to find later that they were not related. The platform is unchanged from when I was running Drupal 9, and didn't experience these issues in Drupal 9, for what it's worth.

    Logically, I can't think of why a bad system path in a view could result in a thumbnail (in a different column) temporarily not displaying. There is nothing wrong with the image src in the Thumbnail column at admin/content/media. I would tend to expect that if the two issues are related, the thumbnail would not appear after I press CTRL+Shift+R.

    Thanks

Production build 0.69.0 2024