Duplicate space appears in Space Directory

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

問題

When navigating to the Space Directory page in Confluence, you will see a space with a duplicate entry.

診断

This is the behaviour observed:

  1. Rebuilding the index doesn't help.
  2. Clicking on each space will link the user to the same exact space.
  3. Adding one space to the user's "favourites" will favourite the other as well.
  4. Searching for the space in the site will come up with two search results and they may differ in their last modified dates. However, they still link to the same, correct space.
  5. You will also notice that one of your other spaces in the site will be missing in the Space Directory.
  6. Checking the spaces table in the Confluence database, we can see that there is only one row with the space key and space name that is duplicated.

    select * from SPACES where spacekey='TEST';

原因

There are two tables in the Confluence database that are responsible for displaying the content in the Space Directory: spaces and content. However, the actual list of spaces being displayed on that page is not dependent on the spaces table. It actually looks at the content table and follows these conditions.

  1. content_type='SPACEDESCRIPTION'
  2. spaceid=1234; where 1234 is the spaceid value from the spaces table.

In this case, there were two entries in the content table whose spaceid columns were pointing to a single space. This resulted in the duplicate to appear.

'content' table

contentidcontent_typespaceid
12345SPACEDESCRIPTION112233
67890SPACEDESCRIPTION112233

In the spaces table, we can see that the space ID referenced in the content table belongs to Test space, which is the duplicated space. However, that space is only pointing to the first space description, which is denoted by the spacedescid column. The second is actually being referenced by a completely different space.

'spaces' table

spaceidtitlespacekeyspacedescid
112233Test spaceTEST12345
445566Java ProgrammingJAVA67890

ソリューション

Based on the DB entries above, the erroneous entry is in the content table with a content ID of '67890'. We'll need to update its spaceid value so that it points to the correct space – Java Programming. This can easily be achieved using the query below.

update content set spaceid=445566 where contentid=67890;

Once that is done, you'll need to:

  1. Reindex Confluence.
  2. Flush Confluence cache by navigating to:
    • Confluence Administration > General Configuration > Cache Management > Flush All
  3. Access the Space Directory again and you'll see the duplicate is no longer present.
最終更新日: 2019 年 1 月 16 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.