Links to Knowledge base articles are corrupt after upgrading Jira Service Management Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Links to Knowledge base articles are corrupt after upgrade 

Environment

Jira Service Management, Confluence

Diagnosis

Links to Knowledge base articles are corrupt after Jira upgrade and throw errors stating {{"Connection to Confluence not possible because application link is missing. Check Confluence settings in application links"}} It is impossible to delete,unlink, or modify the link to the knowledge base at the project level, and also the unlink button is inoperative.

In the atlassian-jira.log file, the following errors will be reported:

Errors in atlassian-jira.log
/rest/viewIssue/1/remoteIssueLink/render/157 [c.a.j.p.v.issuelink.rest.RemoteIssueLinkResource] Error occurred while generating final HTML for remote issue link: java.lang.IllegalArgumentException: No Application Link found for the given Application Id: g2012e6ec-f562-3f79-basd-18842c940bc1 or URL: https://confluence.example.come/confluence/pages/viewpage.action?pageId=1172
other related errors in the atlassian-jira.log
/rest/servicedesk/knowledgebase/latest/articles/search [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: URLDecoder: Incomplete trailing escape (%) pattern
java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
manifest errors in the atlassian-jira.log
Exception trying to get Applink for manifest with ID g2012e6ec-f562-3f79-basd-18842c940bc1


Cause

Root cause 1:

  • When an Application Link is established within an Atlassian application, it endeavors to establish a connection with the target application's manifest. This manifest holds crucial details from the target application, including its ID, name, type, version, application link version, and authentication types. If this information can't be retrieved, the creation of the application link will not be successful.
  • In some instances, the application ID was altered due to Jira upgrade and this might cause issues with knowledge base articles as each application link will have a unique ID that Jira can identify with.

Root cause 2:

  • If this happens after both Jira and Confluence upgrade then when you check the Jira support.zip you will see the following errors:
[c.a.s.i.confluenceknowledgebase.kblink.ConfluenceKBLinkQStore] Retrieved KB link has a null PORTAL.ID when it's expected to be non-null

In this case, try to check the HAR file as well, and in the HAR file search for the following:

HAR file
Request Method:POST

Status Code:net::ERR_BLOCKED_BY_RESPONSE

-- Response Headers

content-security-policy:frame-ancestors 'self'

content-type:text/html;charset=UTF-8

If the response contains the "content-security-policy:frame-ancestors 'self'" that matches the problem then proceed to apply Resolution 2

also check if the following errors are reported in the screenshots 

Solution

Resolution 1:

Sometimes deleting the existing Confluence application links and recreating them to rebuild the connection will work.

Recreating an application link doesn't remove any data. Existing macros, plugins, and pages that make use of an application link will start working again once the application link has been recreated.

However, in a few cases, the recreated applinks will have the same application link's ID that was affected and throw errors in the logs, in such cases, please proceed with the steps mentioned in this KB to Remove an application link from Jira server using SQL and then recreate the application link

Always back up your data before modifying the database. If possible, try your modifications on a test server.

Resolution 2:

If the HAR file response contains "content-security-policy:frame-ancestors 'self'" and if the knowledge base is connected Confluence server 8.5.7+ then, the reporter could be due to this known bug: CONFSERVER-95123 - Getting issue details... STATUS  

So please follow the resolution steps mentioned in this KB for Knowledge base preview is failing on the customer portal with a "Refused to frame 'site' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'"." error in browser's console


Last modified on Nov 5, 2024

Was this helpful?

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