Confluence spaces cannot be found while configuring a knowledge space in a JSM project
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
Some (or all) Confluence spaces cannot be found while configuring a knowledge space in a Jira Service Management project as per Set up a knowledge base with Confluence Data Center. When searching for key words that belong to the Confluence space name, the search fails with the message "No matches", even though the space exists:
Environment
- Jira Service Management (JSM) Data Center on any version from 5.0.0
- Confluence Data Center on any version from 8.5.
Diagnosis
- Generate a HAR file while searching for the Confluence space in the Link Space drop down menu from the page Project Settings > Knowledge Base (or open the Network tab from the browser)
- Check the response from the HTTP Request below:
<JIRA_BASE_URL>/rest/servicedesk/1/servicedesk/<JSM_PROJECT_KEY>/kb/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/space?query=<SEARCH_KEY_WORD>
- The response should include a JSON payload, similar to what is illustrated below:
- Check the search results in the JSON response:
- If you see at least one result that is a personal Confluence space as illustrated below (one of the result has the class name content-type-personalspacedesc), then Root Cause 1 might be relevant
{ "queryTokens": [ "max" ], "query": "max", "totalSize": 4, "contentNameMatches": [ [ { "id": "131147", "name": "MAX", "href": "/confluence/display/MAX", "className": "content-type-spacedesc", "spaceName": "MAX", "spaceKey": "MAX" }, { "id": "131150", "name": "Another Space with MAX name", "href": "/confluence/display/ASWMN", "className": "content-type-spacedesc", "spaceName": "Another Space with MAX name", "spaceKey": "ASWMN" } ], [ { "id": "131154", "name": "Maxime Rey", "href": "/confluence/spaces/viewspace.action?key=~maxime", "className": "content-type-personalspacedesc", "spaceName": "Maxime Rey", "spaceKey": "~maxime" } ], [ { "name": "Search for ‘max’", "href": "/confluence/dosearchsite.action?queryString=max", "className": "search-for" } ] ] }
- If you see one result that is empty (the entry is just a set of empty squared bracket "[],") as illustrated in the example below, then Root Cause 2 might be relevant:
{ "queryTokens": [ "demonstration" ], "query": "Demonstration", "totalSize": 2, "contentNameMatches": [ [ { "id": "131125", "name": "Demonstration Space", "href": "/confluence/display/ds", "className": "content-type-spacedesc", "spaceName": "Demonstration Space", "spaceKey": "ds" } ], [], [ { "name": "Search for ‘Demonstration’", "href": "/confluence/dosearchsite.action?queryString=Demonstration", "className": "search-for" } ] ] }
- If you see at least one result that is a personal Confluence space as illustrated below (one of the result has the class name content-type-personalspacedesc), then Root Cause 1 might be relevant
- Log into Confluence as a Global Admin user and go to the page ⚙ > General administration > Manage Apps
- Check if the 3rd party add-on Linchpin Launchpad - Access Your Tools is installed on version 2.8.2
- If that's the case, temporarily disable this add-on and check if the issue is resolved
- If the issue is resolved, then Root Cause 2 is relevant
- If the issue still occurs, enter plugin safe mode, and check if the issue is resolved
- If the issue is resolved, then Root Cause 2 is relevant
- Check the response from the HTTP Request below:
Cause
Root Cause 1 - We are facing a known bug from JSM
If the search results from the Confluence space search includes a personal space, then "no matches" will be shown in the KB configuration page, even if the results also include non personal spaces. This behavior is due to the known bug linked below, which impacts any JSM version:
- JSDSERVER-15317 - Getting issue details... STATUS
Root Cause 2 - A 3rd party add-on installed in Confluence is causing the issue
There is a 3rd party add-on installed on top of the Confluence application that is slightly modifying the JSON payload returned to JSM by Confluence. This slight modification prevents the JSM KB configuration page from showing the Confluence search results and "no matches" will be shown.
One add-on that is known to cause this issue is the add-on Linchpin Launchpad - Access Your Tools on version 2.8.2 (note that other versions might also cause this issue). This add-on incorrectly adds the empty squared bracket "[]," to the Confluence search result, leading to some search result syntax that is not expecting by the JSM application, causing it to not show any result.
Solution
Solution for Root Cause 1
For the workarounds, please refer to the description of the bug JSDSERVER-15317 - Getting issue details... STATUS .
Solution for Root Cause 2
Since 3rd party add-ons fall outside of Atlassian Support scope, we recommend:
- Either keeping the problematic add-on disabled
- Or reaching out to the respective add-on support team for further assistance