Issue Collector button is not appearing
Asked by Jeremy Schrecengost:

@Steven Behnke I am looking to add an Issue Collector to my Confluence Page (single page), I am running Confluence 3.5.11 and JIRA 6.3.12.

The issue collector is set up for custom and I went to my confluence page and inserted the HTML macro you pasted above (replacing my url for src)

```
{html}    &lt;script&gt;    AJS.toInit(function(){    AJS.$('.aui-header-primary .aui-nav').append('&lt;li&gt;&lt;a href="#" id="myIssueTrigger" class="aui-button aui-style aui-button-primary aui-nav-imagelink"&gt;Bug Report&lt;/a&gt;&lt;/li&gt;');    });    &lt;/script&gt;     &lt;script type="text/javascript" src="http://jira/s/0c13895773c11edccb53ae66c985466f-T/en_US83oybm/6343/12/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js&amp;collectorId=8f47a897"&gt;&lt;/script&gt;    &lt;script type="text/javascript"&gt;window.ATL_JQ_PAGE_PROPS = {        "triggerFunction": function(showCollectorDialog) {        //Requires that jQuery is available!        //Use whatever ID you used on your Button/Trigger        //In this case, I used id="myIssueTrigger" in the Button/&lt;a&gt; element        //So I must use #myIssueTrigger here            jQuery("#myIssueTrigger").click(function(e) {            e.preventDefault();            showCollectorDialog();        });    }};&lt;/script&gt;{html}
```

After I save I see nothing on the page that is different. I have attached a photo (I had to color out the tree for this page on the left and our logo) but I am not sure where I should see this button.

Capture.JPG

I have tried using the method described in the wiki from Atlassian and I did not see the button either.  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=160){#link_1187456f1c6915}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63355/1/Capture.JPG){#display_1187456f1c6915_0}


Answers:
author: Steven F Behnke
body: Hi Jeremy, thanks for opening a new question. The reason my other answer (<https://answers.atlassian.com/questions/31654942>) doesn't work for you is because of the difference in Confluence versions. My how-to was written for Confluence 5+, specifically Confluence 5.7.4. Things certainly have changed since Confluence 3.*X.*

I chose a simple route of appending the "Bug Report" button to the big **Create** button at the top of the screen like so -- `AJS.$(``'.aui-header-primary .aui-nav'``).append(``'<li><a href="#" id="myIssueTrigger" class="aui-button aui-style aui-button-primary aui-nav-imagelink">Bug Report</a></li>'``);`  
image2016-2-26 13:22:9.png

This **Create** button doesn't exist in your version of Confluence! Your code isn't finding anything to append to. Further, the AUI pack doesn't exist here either. We should use classes that Confluence is using in our version.  
image2016-2-26 13:23:53.png

Instead, let's prepend it to the **Browse** menu with a menu-item.

```
AJS.$('#header-menu-bar').prepend('&lt;li class="normal ajs-menu-item"&gt;&lt;a href="#" id="myIssueTrigger"&gt;Bug Report&lt;/a&gt;&lt;/li&gt;');
```

image2016-2-26 13:35:40.png

If you wanted a button on the page, you could use `<button id="myIssueTrigger">Bug Report</button>` instead of all this prepending/appending nonsense.

image2016-2-26 13:38:55.png  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=683){#link_1187457339eabc}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/1/image2016-2-26%2013%3A35%3A5.png){#display_1187457339eabc_0}  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=684){#link_1187457339eabc_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/2/image2016-2-26%2013%3A22%3A9.png){#display_1187457339eabc_2}  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=685){#link_1187457339eabc_1}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/3/image2016-2-26%2013%3A34%3A59.png){#display_1187457339eabc_4}  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=686){#link_1187457339eabc_2}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/4/image2016-2-26%2013%3A23%3A53.png){#display_1187457339eabc_6}  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=687){#link_1187457339eabc_3}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/5/image2016-2-26%2013%3A34%3A38.png){#display_1187457339eabc_8}  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=688){#link_1187457339eabc_4}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/6/image2016-2-26%2013%3A35%3A36.png){#display_1187457339eabc_10}  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=689){#link_1187457339eabc_5}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/7/image2016-2-26%2013%3A38%3A55.png){#display_1187457339eabc_12}  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=690){#link_1187457339eabc_6}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/8/image2016-2-26%2013%3A35%3A40.png){#display_1187457339eabc_14}  
[](https://community.atlassian.com/t5/Confluence-questions/Issue-Collector-button-is-not-appearing/qaq-p/374701?attachment-id=691){#link_1187457339eabc_7}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/63356/9/image2016-2-26%2013%3A34%3A43.png){#display_1187457339eabc_16}

comments: author: Jeremy Schrecengost
body: Honestly a button would be much easier. I am not good with javascript/html so I apologize if I ask a bunch of questions.

To add the button would I just replace the append/prepend script with the button code?

```
{html}    &lt;script&gt;     &lt;button id="myIssueTrigger"&gt;Bug Report&lt;/button&gt;    &lt;/script&gt;     &lt;script type="text/javascript" src="http://jira/s/0c13895773c11edccb53ae66c985466f-T/en_US83oybm/6343/12/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js&amp;collectorId=8f47a897"&gt;&lt;/script&gt;    &lt;script type="text/javascript"&gt;window.ATL_JQ_PAGE_PROPS = {        "triggerFunction": function(showCollectorDialog) {        //Requires that jQuery is available!        //Use whatever ID you used on your Button/Trigger        //In this case, I used id="myIssueTrigger" in the Button/&lt;a&gt; element        //So I must use #myIssueTrigger here            jQuery("#myIssueTrigger").click(function(e) {            e.preventDefault();            showCollectorDialog();        });    }};&lt;/script&gt;{html}
```

If that is the case I am still not seeing anything on confluence page.


author: Steven F Behnke
body: Close: Don't put a HTML element in script tags -- It's not javascript anymore, we're just adding an HTML button.

```
{html}     &lt;button id="myIssueTrigger"&gt;Bug Report&lt;/button&gt;      &lt;script type="text/javascript" src="http://jira/s/0c13895773c11edccb53ae66c985466f-T/en_US83oybm/6343/12/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js&amp;collectorId=8f47a897"&gt;&lt;/script&gt;    &lt;script type="text/javascript"&gt;window.ATL_JQ_PAGE_PROPS = {        "triggerFunction": function(showCollectorDialog) {        //Requires that jQuery is available!        //Use whatever ID you used on your Button/Trigger        //In this case, I used id="myIssueTrigger" in the Button/&lt;a&gt; element        //So I must use #myIssueTrigger here            jQuery("#myIssueTrigger").click(function(e) {            e.preventDefault();            showCollectorDialog();        });    }};&lt;/script&gt;{html}
```


author: Jeremy Schrecengost
body: Good news is I have a button now but it is not firing the javascript to launch the issue collector


author: Jeremy Schrecengost
body: I found my issue. Thanks so much!!!!!!


author: Steven F Behnke
body: No problem! Good luck, ask questions if you never need anything! I'm around from time to time. :wink:


author: Krishna
body: hi Jeremy \& Steve,

I am having the same problem button not firign the JS. I have opened a [ticket](https://community.atlassian.com/t5/Confluence-questions/Issue-collector-button-displayed-but-doens-t-trigger-the-issue/qaq-p/606183). Can you please check that and see if you can help me with that?

Thank you! :)


author: Ronny Katzenberger
body: First of all, thank you Steven for all the time you've invested on this topic.

I have the same issue - the button is showing up fine but the JS is not firing.  
Appreciate your help!