Looks like tableau changed the format of their embed code this has caused the module to break returning the following error

Unable to handle the provided embed string or URL.

Comments

alibama’s picture

I'm using the latest tableau server and getting the embed code... it copies fine.... I'm using the wysiwyg embed media plugin, not a media field... would love some help with getting the right URI for the media file, haven't gotten that working yet

ecrown’s picture

Looking further into the initial reported issue. the issue seems to be with when the embed code source uses https instead of http.
eg
<script type='text/javascript' src='https://public.tableausoftware.com/javascripts/api/viz_v1.js'></script>
we need to account for both use cases when the url is http and https

ecrown’s picture

@alibama what do you mean by getting the right URI for the media file. could you explain further

alibama’s picture

hi ecrown - i just wrote up some documentation - I'm not sure if this is going to be very helpful, but it's a start tableau + drupal integration

I'll be glad to keep answering questions here as best i'm able :)

pq’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.15 KB

Attached patch fixes the issues that were preventing embed codes shared from https://public.tableau.com from being accepted. It includes the following changes:

  • Accepts HTTP or HTTPS
  • Accepts single or double quotes for attributes
  • Accepts whitespace between "width:" (or "height:") and it's corresponding value

This should be backwards-compatible so all embed codes that previously worked should hopefully be unaffected.

esolitos’s picture

[cut]

esolitos’s picture

pq’s picture

StatusFileSize
new3.03 KB
new2.83 KB

Another day, another set of changes to the embed code.

This is an update to @esolitos's patch

bharat.kelotra’s picture

Patch is not working for me or may be I am using the wrong url. So just to confirm. On my tableau account on a view I have a share link, which opens a popup with 2 types of links.
One is embed code which is
<div class='tableauPlaceholder' id='viz1505373335053' style='position: relative'><noscript><a href='#'><img alt='Is Your Hospital Staff Knowledgeable? ' src='https:&#47;&#47;public.tableau.com&#47;static&#47;images&#47;TE&#47;TEST_239&#47;Health&#47;1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='TEST_239&#47;Health' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https:&#47;&#47;public.tableau.com&#47;static&#47;images&#47;TE&#47;TEST_239&#47;Health&#47;1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1505373335053'); var vizElement = divElement.getElementsByTagName('object')[0]; if ( divElement.offsetWidth > 800 ) { vizElement.style.minWidth='1004px';vizElement.style.maxWidth='100%';vizElement.style.minHeight='689px';vizElement.style.maxHeight=(divElement.offsetWidth*0.75)+'px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.minWidth='1004px';vizElement.style.maxWidth='100%';vizElement.style.minHeight='689px';vizElement.style.maxHeight=(divElement.offsetWidth*0.75)+'px';} else { vizElement.style.width='100%';vizElement.style.height=(divElement.offsetWidth*1.77)+'px';} var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>

Other one is link which is
https://public.tableau.com/views/TEST_239/Health?:embed=y&:display_count...

both of them don't work with the regular expression provided in patch. So does I doing it right to include the right link or tableau again updated it's shared url pattern?

javi-er’s picture

Status: Needs review » Closed (outdated)

The Drupal 7 version is not longer supported.