Hi experts,
We are experiencing a problem with a user macro not displaying icons after upgrading to 7.12.3 over the weekend.
A user macro that has always worked that displays an icon (that the user selects from another page and copies in the URL to), with text and a hyperlink to a page is now not displaying the icon.
Does anyone know why this might have stopped working? Is there some config we need to do to enable this? I've tried to see what I could find but am drawing a blank.
Details of behaviour below.
Thanks in advance.
Kathryn.
It is now displaying <img src="https://intranet.xxx.xxx.xx/download/attachments/3810922222/Document-red.png?version=1&modificationDate=1455518232000&modifcationDate=1455518232000&api=v2' class='img-responsive'> Forms & Email templates
The link is still working though.
Here's my user macro:
## @Param Title:title=Title|type=string|required=true
## @Param Subtitle:title=Subtitle|type=string|desc=Optional subtitle|required=false
## @Param page:title=Page, email or external URL|type=confluence-content|desc=External URL must start with https|required=false
## @Param IconLink:title=Icon|type=string|required=false|desc=Display a custom icon by entering the URL of the image. <a href="https://intranet.xxx.xxx.xx/display/XXX/Icon+suite+-+intranet+only" target="_blank"><b>View available icons</b></a>
## @Param TitleColor:title=Title colour|type=enum|enumValues=blue,gray,red|required=true|desc=Select colour for the title text|default=blue
## @Param Background:title=Background colour|type=enum|enumValues=blue,light-blue,gray|required=true|desc=Select a background colour|default=gray
## @Param IconAlign:title=Center align?|type=boolean|desc=Set center alignment. Unchecked will align left.|default=true
#set ( $colonIndex = $parampage.indexOf(":") )
#if ( $colonIndex == -1 )
#set ( $spaceKey = $space.key )
#set ( $pageName = $parampage )
#else
#set ( $spaceKey = $parampage.substring(0, $colonIndex) )
#set ( $pageNameIndex = $colonIndex + 1 )
#set ( $pageName = $parampage.substring($pageNameIndex) )
#end
## Get the Page object instance
#set ( $page = $pageManager.getPage($spaceKey, $pageName) )
## Get the URL path from the Page object instance
#if ($parampage.startsWith("https"))
#set ($pageLink = $parampage)
#elseif ($parampage.contains("@))
#set ($pageLink = ("mailto:$parampage"))
#else
#set ($pageLink = $page.urlPath)
#end
#if ($paramIconAlign == false)
#set ($alignment = ("icon-left"))
#end
#if ($paramTitleColor == "red")
#set ($LinkColor = ("red-text"))
#elseif ($paramTitleColor == "gray")
#set ($LinkColor = ("gray-text"))
#else
#set ($LinkColor = ("blue-text"))
#end
#if ($paramIconLink)
#set ($Icon = ("<img src='$paramIconLink' class='img-responsive'>"))
#end
#if ($paramSubtitle)
#set ($subtitle = ("<span class='subtitle'>$paramSubtitle</span>"))
#end
<div class="icon-widget $paramBackground $LinkColor $!alignment">
#if ($parampage)
<a href="$pageLink">$!Icon<span>$paramTitle</span>$!subtitle</a>
#else
<a href="javascript:void(0);">$!Icon<span>$paramTitle</span>$!subtitle</a>
#end
</div>