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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tomtile’s picture

and here's a small patch

Dave Reid’s picture

Hrm, 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.

Chris Matthews’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing 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