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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

89 views 0 6
Read article

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