-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
4.1, 4.2, 5.1, 5.2.3
-
13
-
Severity 3 - Minor
-
7
-
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Some JavaScripts are not successfully executed if included in User Macro, whether or not the JS is included in .js file or is included directly into the macro template between <script></script> tags.
Steps to reproduce
- Download the attached jquery.zrssfeed.min.js file and put it into <confluence-install>/confluence folder
- Create a new user macro
- Add the following user macro template and change <confluence-url> below into your Confluence Access URL:
## @param URL:title=URL|type=string|required=true|desc=The URL of the RSS Feed <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" type="text/javascript"></script> <script src="http://<confluence-url>/jquery.zrssfeed.min.js" type="text/javascript"></script> <div id="feedtarget"></div> <script type="text/javascript"> AJS.$(document).ready(function () { $('#feedtarget').rssfeed('$paramURL', { limit: 5 }); }); </script>
- Create a new page
- Insert the newly created macro and add this URL feed into the macro settings: http://feeds.bbci.co.uk/news/rss.xml
- Save the page
Nothing is shown in the page. Note that this was previously working in Confluence 3.5.13.
Workaround 1
Insert a HTML macro (make sure to enable the plugin module first) and add the following codes: (and delete these codes from the User Macro)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" type="text/javascript"></script> <script src="http://<confluence-url>/jquery.zrssfeed.min.js" type="text/javascript"></script>
Workaround 2
Insert the code above into Custom HTML (At end of the HEAD). Don't forget to delete these codes from the User Macro.
- relates to
-
CONFCLOUD-26104 Some JavaScripts are not executed if included in User Macro
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...