I added a Web Widget attachment to a page in Views, and tested the embed code provided on a basic HTML page. This is the embed code:

widgetContext = {"url":"?width=200\u0026height=200","width":200,"height":200,"widgetid":"web_widget_iframe_90fbfecd0827c9153a465728bc35aae9","scrolling":"auto"};

I had set the width and height to 600px, but that is not here. Nor is the URL. The iFrame instead renders a smaller version of the page its on (in this case, a basic HTML page).

Inline doesn't display at all.

I think you for your help in advance.
Michael

Comments

carsonblack’s picture

I am having the same issue.

ngreenup’s picture

Same issues here

broncomania’s picture

Same here

broncomania’s picture

Okay we have to change the function attach_to($display_id) to this:

  /**
   * Attach to another view.
   */
  function attach_to($display_id) {
    $attach_to = $this->get_option('displays');
    if ($attach_to[$display_id]) {
      $current_style = $this->get_option('embed_style');
      $current_style = empty($current_style) ? 'iframe' : $current_style;
      $variables['path'] = url($this->view->get_url(NULL, $this->get_path()), array('absolute' => TRUE));
      $variables['width'] = $this->get_option('width');
      $variables['height'] = $this->get_option('height');
      $this->view->attachment_after .= web_widgets_render_embed_code($current_style, $variables);
    }
  }

it is located in views/web_widgets_plugin_display_web_widgets.inc and now works the url, height and width in the embedded code.

broncomania’s picture

Status: Active » Needs review
dlumberg’s picture

Confirming that #4 fixed the problem for me.

clemens.tolboom’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.13 KB

I set this RTBC as I only created a patch file from #4 @broncomania work :-)

URL, width and height appear into the embed code.

clemens.tolboom’s picture

Status: Reviewed & tested by the community » Fixed

Pushed to 7.x-1.x

Status: Fixed » Closed (fixed)

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