Evaluating Documentation theme to Default theme migration impact in Confluence

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 there is a need to migrate from documentation theme to default theme, there are several details that might make the sysadmin unsure about the impact of the migration, especially if:

  • There are too many spaces in the Confluence instance (hundreds or more);
  • A large (and possibly unknown) portion of the spaces contains Documentation Theme and/or CSS customization.

In addition to following the Switch to the Default Theme documentation, this KB presents some SQL queries that can be used to count the number of spaces with explicit Documentation Theme configuration, as well as queries to find out which of these spaces contain custom Theme configuration or CSS Stylesheets.

原因

回避策

  • In order to evaluate how many spaces may be impacted by the theme migration, a sysadmin may run the following SQL query to find out which spaces have explicit Documentation Theme enabled:

    SELECT spaces.spacekey,spaces.spacename
    FROM bandana
    JOIN spaces ON bandana.bandanacontext = spaces.spacekey
    WHERE bandanakey='atlassian.confluence.theme.settings'
      AND bandanavalue LIKE '%<string>com.atlassian.confluence.plugins.doctheme:documentation</string>%';
  • If there are just a few explicit documentation theme spaces, we suggest:
    • Switch the global theme to default
    • Manually switch each space to default theme. Contact space admins for this change, and have them check if spaces have customizations:
  • If there are too many spaces with explicit documentation theme configured, we suggest:
    • Use this query to check which enabled explicit documentation spaces have customizations (either wiki markup or CSS stylesheet). This query also shows the customizations of each space, so there might be spaces that appear twice in the query result:

      SELECT spaces.spacekey,spaces.spacename,bandanakey,bandanavalue FROM bandana 
              JOIN spaces ON bandana.bandanacontext = spaces.spacekey
              WHERE bandana.bandanacontext IN 
      	( SELECT bandanacontext FROM bandana 
                  WHERE bandanakey='atlassian.confluence.theme.settings' 
                  AND bandanavalue LIKE '%<string>com.atlassian.confluence.plugins.doctheme:documentation</string>%' )
              AND 
              (bandanakey='com.atlassian.confluence.plugins.doctheme' OR bandanakey='atlassian.confluence.css.resource.custom');
      
    • The spaces resulting from this last query will need to be manually migrated by the space admin.
    • This query shows the spaces that present less risk to be migrated to default theme in bulk (with UPDATE SQL query), because they don't have CSS nor Documentation Theme customization:

      SELECT distinct(spaces.spacekey),spaces.spacename FROM spaces 
              WHERE spaces.spacekey IN 
              ( SELECT bandanacontext FROM bandana 
                  WHERE bandanakey='atlassian.confluence.theme.settings' 
                  AND bandanavalue LIKE '%<string>com.atlassian.confluence.plugins.doctheme:documentation</string>%' )
              AND spaces.spacekey NOT IN
              (SELECT bandanacontext FROM bandana 
                  WHERE bandanakey='com.atlassian.confluence.plugins.doctheme' 
                  OR bandanakey='atlassian.confluence.css.resource.custom');
      
    • And the following SQL query changes the doc theme back to default theme on any spaces that have doc theme explicitly enabled, but neither CSS nor Wiki Markup customizations:

      データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

      UPDATE BANDANA SET bandanavalue ='<map>
        <entry>
          <string>theme.key</string>
          <string></string>
        </entry>
      </map>' 
          WHERE bandanavalue LIKE '%<string>com.atlassian.confluence.plugins.doctheme:documentation</string>%' 
          AND bandanakey = 'atlassian.confluence.theme.settings'
          AND bandanacontext NOT IN
              ( SELECT bandanacontext FROM bandana 
                WHERE bandanakey='com.atlassian.confluence.plugins.doctheme' 
                OR bandanakey='atlassian.confluence.css.resource.custom');
      

(warning) Be aware that after the theme migration, some users may still lose some very specific features, as described in Feature differences between Documentation and Default Theme.


最終更新日 2019 年 6 月 20 日

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

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