When embedding a view that uses http://drupal.org/project/views_autocomplete_filters (and presumably its not unique to this combination) - the $head var in web_widgets_iframe_wrapper.tpl.php isn't populated.

looking through the call stack the styles and scripts are set here: template_preprocess_web_widgets_iframe_wrapper(&$variables) in web_widgets_style_iframe.inc but are empty.

I found that adding

print drupal_get_js();
  print drupal_get_css();

to the head section of web_widgets_iframe_wrapper.tpl.php made the remote widgets work fine, so i guess its something to do with how the widgets are called. further up the theme chain.

Comments

clemens.tolboom’s picture

StatusFileSize
new543 bytes

I can confirm both the problem and the fix. It works.

But I'm not sure what's the best solution.

clemens.tolboom’s picture

Status: Active » Needs review
clemens.tolboom’s picture

clemens.tolboom’s picture

+++ b/iframe/web_widgets_iframe_wrapper.tpl.php
@@ -9,6 +9,8 @@
+    <?php print drupal_get_js(); ?>
+    <?php print drupal_get_css(); ?>
     <?php !empty($styles) ? print $styles : '' ?>
     <?php !empty($scripts) ? print $scripts : '' ?>

These look like a duplication of the intent for styles and scripts.

So this needs a follow up if committed first.

clemens.tolboom’s picture

Status: Needs review » Fixed

Without this patch the originating site styles are not working.

One could argue the styles should not be applied but then what parts exactly?

XREF #970874: how to strip all styling

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.