Widget Macro with SSL Confluence site

How can we use Widget Macro on SSL Confluence site without big red mixed content warnings across browser URL bar?

For instance, embedding a youtube video with widget macro always causes mixed content warnings on that page.

2 answers

1 accepted

0 votes
Accepted answer

Update, this is fixed in the latest version (for youtube atleast).

Best solution I've come up with for this is to create a user macro. I eventually gave up on Widget Connector and logged this bug... https://studio.plugins.atlassian.com/browse/WC-27

This is the user macro I came up with for youtube incase anyone else needs a decent solution for this...

## Macro title: YouTube Embed
## Macro has a body: N
## Output: HTML
##
## Developed by: Sam Hall
## Date created: 24/04/2012
## Installed by: Sam Hall

## @param vid:title=Video ID|type=string|required=true|desc=ID for the video
## @param width:title=Width|type=int|required=false|desc=Width (default 425)
## @param height:title=Height|type=int|required=false|desc=Height (default 350)

## Check for valid width, otherwise use 425
#if (!$paramwidth)
  #set ($paramwidth=425)
#end
   
## Check for valid height, otherwise use 350
#if (!$paramheight)
  #set ($paramheight=350)
#end

<iframe class="youtube-player" type="text/html" width="$paramwidth" height="$paramheight" src="//www.youtube.com/embed/$generalUtil.escapeForHtmlAttribute($paramvid)" frameborder="0">
</iframe>

With Widget 1.3.8 I get error ""widget: A widget Id is required!". Posted as https://ecosystem.atlassian.net/browse/WC-76. We also started using a user macro (https://confluence.atlassian.com/display/DISC/YouTube+user+macro) and replaced "http:" with "" (i.e. the URLs should start with "//www.youtube.com", yep that is a valid URL).

Added comment to KB

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

782 views 33 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you