0

I'm using a global custom text field within a view that is meant to display an embedded youtube video.

enter image description here

However in the actual render of the view it's completely removed from the dom.

My first assumption was that ckeditor was not allowing the iframe tag and removing it itself. However I have it setup to allow iframe tags, and if I go back and edit the Global Custom text it still appears. If it didn't allow it I'm assuming it would not appear in the editor the next time I open and edit the field.

Also I'm able to embed iframes in the body text of nodes just fine. It's specifically in views.

I also attempted creating iframes with different src's in different divs but I still had the same behavior.

Are there other possible causes of Drupal removing iframes from custom text in views? Is this the expected behavior? If this is the expected behavior is there away around this?

EDIT: Forgot to mention that 'Strip HTML tags' is also turned off. enter image description here

1

This is not the expected behavior of drupal views, Drupal Views usually not doing this. I have done this before, and global text with iframe is working with no issue. Maybe you have another issue like some javascript issue to prevent the load iframe form another site, see the console of your webpage maybe you got some error.

You can debug also by putting that iframe into any page Textarea field where you already use the HTML content of your website.

0

Check in the view preview whether the iframe shows there. If it does, your issue is with your theme, most likely, or some module, but not Views.

  • It does not show up in the view preview – Matt Aug 28 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.