Upgrading from media-2.0-alpha4 to media-2.x-dev resulted in all images are replaced with false after saving or switching to plain text mode.
These images only have a data-fid attribute and not using the new placeholder format.

See attached patch for the fix.

CommentFileSizeAuthor
media_wysiwyg.filter.js_.patch1.63 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Issue summary: View changes
Devin Carlson’s picture

Status: Patch (to be ported) » Needs review
theMusician’s picture

I am experiencing this as well. However the files I have turning to "false" are those that have a data-file_info attribute.

Here is an old file that now renders as false.

<img width="500" height="279" typeof="foaf:Image" title="" style="width: 220px; height: 123px; border-width: 1px; border-style: solid; margin: 5px 10px; float: right;" src="http://website.com/sites/website.com/files/path/filename.png" data-file_info="%7B%22fid%22:%223819%22,%22view_mode%22:%22default%22,%22fields%22:%7B%22format%22:%22default%22,%22field_file_image_alt_text%5Bund%5D%5B0%5D%5Bvalue%5D%22:%22%22,%22field_file_image_title_text%5Bund%5D%5B0%5D%5Bvalue%5D%22:%22%22,%22field_folder%5Bund%5D%22:%22559%22%7D,%22type%22:%22media%22,%22link_text%22:null%7D" class="media-element file-default" alt="">

Now a new one that renders just fine.
<p><a href="/node/3271">[[{"fid":"4348","view_mode":"preview","fields":{"format":"preview","field_folder[und]":"_none"},"type":"media","attributes":{"alt":"CF2irWRvV_4","style":"height:100px; width:100px","class":"file-preview media-element"}}]]</a></p>

The attached patch if I am reading it correctly seems to look for file_info and if it isn't there it assigns it fid.

I wonder if something else is causing exisiting images to be rendered as false?

Dave Reid’s picture

Priority: Critical » Major
Chris Matthews’s picture

Status: Needs review » 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