Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This happens quite sporadically and I have not been able to reproduce it locally yet.
What happens is that an empty array is cached and breaking media browser when it should be rendered.
I dont know why its cached an empty array yet, but I thought it still could be good with a check if the cached data is empty.
Something like this? (media.module 1285):
if ($cache = cache_get($cid) && !empty($cache->data)) {
I've never done a patch before, but I post one as soon as I learned how to do ... :)
Comment | File | Size | Author |
---|---|---|---|
#1 | media-fix-media-browser-cache-issue-1668230-1.patch | 421 bytes | tomtile |
Comments
Comment #1
tomtile CreditAttribution: tomtile commentedand here's a small patch
Comment #2
Dave ReidHrm, I would really like to fix the problem of invalid array getting cached. This isn't a typical pattern in core and would "hide" larger problems that would need to be fixed.
Comment #3
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedClosing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team