Environment:

-Drupal 7.29
-Media, Media WYSIWYG File Entity 7.x-2.0-alpha3+98-dev
-Media:Youtube 7.x-2.0-rc4+14-dev
- A custom module with the following:

function ckfix_wysiwyg_editor_settings_alter(&$settings, &$context) {
  if($context['profile']->editor == 'ckeditor') {
    $settings['allowedContent'] = true;
  }
}

Issue:

Everything works fine except on the front-end the video or element I insert will display the following unfiltered markup, irregardless of whether "Convert Media tags to markup" is set in my text formats.

[[{"fid":"880","view_mode":"full","fields":{"format":"full"},"type":"media","attributes":{"class":"flex-video media-youtube-video media-youtube-1 media-element file-full"}}]]

I've tried logging in media_wysiwyg.filter.js. In the getWysiwygHTML function I can see the correct markup is produced, however this never makes it to the front-end of the site.

What I've tried:

- Using the vanilla version 7.x-2.0-dev, 7.x-2.0-alpha3
- Reinstalling all modules
- Changing jQuery versions
- Ensuring "Convert Media tags to markup" is set in my Full and Filtered text formats.

Comments

mokargas’s picture

Ok, my bad. I also had a custom theme and template. Just in case anyone runs into a similar issue, this was my mistake.

For my WYSIWYG, I had the following.

$body_content = $node->body[$lang][0]['value'];
				if($body_content != strip_tags($body_content)) {
					print $body_content;
				} else {
					print '<p>'.$body_content.'</p>';
				}

What this means, is I was not rendering the content through the filter

The correct template is

print render($content['body']);
seanhellwig’s picture

Status: Active » Closed (works as designed)

Just passing by. Noticed this was a non-issue. OP resolved it on his end.

newtone’s picture

Oh my, I was searching around the web for hours and now discovered, that #1 was the one.
So, my bad too.

I'm happily relieved.