Using the Advanced Roadmaps for Jira in Confluence macro results in an "Update Jira's base URL" warning

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When embedding an Advanced Roadmaps for Jira in Confluence macro on a Confluence page, Confluence displays an "Update Jira's base URL" warning.

Environment

Confluence

Jira

Macro:

Diagnosis

When either configuring the Advanced Roadmaps for Jira in Confluence macro or viewing a page that contains it, Confluence displays a pop-up box like the following which indicates that the Jira base URL needs updating:

Cause 1

This problem has been found to be caused by a mismatch in add-on versions between the Advanced Roadmaps for Jira in Confluence add-on and the Advanced Roadmaps (formerly Portfolio) add-on in which a newer version of the former will not work properly with an older version of the latter. 

Cause 2

More recently, this problem has been observed to affect newer versions of Jira and Confluence even after all add-ons were upgraded to the newest available versions. The issue is being tracked as CONFSERVER-82579 - Advanced Roadmaps Plan macro displays baseURL related warning popups.

Solution 1

In this case, the Advanced Roadmaps (formerly Portfolio) add-on needed to be upgraded to a newer version.  In order to do so, however, the Jira core product needed to be upgraded first to Jira version 8.

Solution 2 (workaround)

If updating add-ons does not resolve the problem, a possible workaround is to use JavaScript in Confluence to suppress the warning banners in Jira.

The workaround below relates to customisations for Jira applications. Consequently, Atlassian Support cannot guarantee the provision of any support for it as customisations are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

<script>
function suppressJiraWarnings() {
    arjMacro = document.querySelector('[data-macro-name="portfolio-for-jira-plan"]');
    if (arjMacro !== null) {
        for (let arjMacroIframe of arjMacroIframes = arjMacro.getElementsByTagName("iframe")) {
            for (let item of arjMacroIframe.contentWindow.document.getElementsByClassName("aui-message closeable aui-message-warning")) {
                item.style.display = 'none';
            }
        }
    }
}

// Suppress Jira warnings immediately after the page's content loads.
window.addEventListener('DOMContentLoaded', suppressJiraWarnings);

// In addition to the main page's content, other content can also be loaded via subrequests, so we need to override XMLHttpRequest to suppress Jira warnings after loading each subrequest.
var defaultXMLHttpRequest = window.XMLHttpRequest;
function modifiedXMLHttpRequest() {
    var XHR = new defaultXMLHttpRequest();
    XHR.addEventListener("load", suppressJiraWarnings);
    return XHR;
}
window.XMLHttpRequest = modifiedXMLHttpRequest;
</script>

Last modified on Jan 28, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.