How to manually edit a page title through the database with Synchrony enabled

お困りですか?

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

コミュニティに質問

シナリオ

The following SQL commands can be helpful in order to edit page title when having issues.

データベースの操作方法が不明な場合はデータベース管理者にお問い合わせください。先に進む前にデータベースの完全なバックアップを作成するようにしてください。これらの SQL コマンドはいくつかの環境でテストを行い、意図したとおりに動作することを確認しています。

しかしながら、特定の状況や Confluence の新しいバージョンでは動作しない場合があります。これは、Confluence のデータベース構造に変更が行われている可能性があるためです。このため、問題が発生して巻き戻しを行う必要がある場合に備えたデータベース バックアップは必須です。

問題

As mentioned in our Create and Edit Pages guide, we recommend to not use special characters in the page title, many problems can happen when doing so. Below are some noticeable bugs:

CONFSERVER-42851 - Getting issue details... STATUS
CONFSERVER-41481 - Getting issue details... STATUS
CONFSERVER-43534 - Getting issue details... STATUS

Possible stack trace in the application logs:

Caused by: java.io.IOException: Error while processing callback: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output

ソリューション

Ran in PSQL


1) Shutdown Confluence, access your Confluence database and run:

select * from content where title = '<page-title>';


2) After finding the problematic page, we will update its title to another one:

update content set title ='<New-Page-Title>', lowertitle='<New-Page-Title>' where title ='<current-page-title>';


With Synchrony ON (Collaborative Editing Enabled)

1) After updating the page title, we need to delete the SharedDraftID reference to not pull the old title but first, we need to find it. To do this, enter the page editor mode, in the url you will find something similar to:{{draftShareId=57633191-642a-47c6-a80e-442470d1b517}}. Run the select query:

select * from contentproperties where stringval = '57633191-642a-47c6-a80e-442470d1b517'; ## this is the shareddraftid


2) You will find the draft contentid and we need to remove its properties:

delete from contentproperties where contentid = <contentid>;


If you are unable to enter the edit mode, you can find the same SharedDraftID in the DB and run the delete query from above:

SELECT c.contentid, c.title, cp.stringval
FROM content c
JOIN contentproperties cp ON c.contentid = cp.contentid
WHERE c.contenttype = 'PAGE' AND c.title = <'pagetitle'> AND cp.propertyname = 'share-id';

変更内容を反映するには、 Confluence を再起動します。

最終更新日 2018 年 11 月 1 日

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

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