[SOLVED][Drupal][Drupal Colorbox] Colorbox with video iframe triggers another Colorbox to open in that iframe

| | 1 min read

A few Drupal users using the Embedded Media Field module had mentioned that they encountered an error while using Colorbox to open a video thumbnail embedded in a View. The Colorbox with the video iframe triggers another Colorbox with no content enlarging the previous Colorbox and causing a white vertical line to appear on the left side of the video and enlarging the parent Colorbox. If you are encountering the same error in your Drupal website then read on to find out the fix.

Here is the solution

  • This occured due to Drupal's JS being added to the iframe once again.
  • Go to line 486 of emvideo.theme.inc. You should see something like this
    ($variables['scripts'] = drupal_get_js();)
  • Simply comment out that line and Colorbox should open it correctly.

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. We can provide a wide range of Drupal services to help you maintain and manage your Drupal websites. Get in touch with us to know more.