- DokuWikiを「2018-04-22c Greebo」 から「2020-07-29 Hogfather」にアップグレードしました。
- すると、エラーが表示されてシステムにログインできなくなってしまいました。

今回は、ニッチな話ですが、dokuwikiのアップグレードについて書いてみます。
1. 表示されたエラー:Fatal error: Class ‘Doku_Handler_Quote’ not found
DokuWikiのアップグレードの通知があったので適用しました。
その後ログインすると、エラーで表示されなくなってしまいました。
Fatal error: Class ‘Doku_Handler_Quote’ not found in …/wiki/lib/plugins/markdowku/syntax/blockquotes.php on line 95

こんなときは、とりあえずバックアップから復元です。
dokuwikiは、Softaculousで管理しているので、バックアップ復元が利用できます。
ちなみに、ちゃんとアップデートの直前にバックアップしていたので、ばっちりです。


バックアップから復元すると、とりあえず動くように戻りました。
mixhostがレンタルサーバーで、
softaculousはサーバーのソフトウェア管理システムです。
softaculousは、スマホでいうApp StoreやPlayストアのようなものです
サーバ内のプログラム(「インスタレーション」といいます)をインストールしたり、アップデートしたりできます。
2. 落ち着いてエラーを読んでみる
再度、アップグレードを試すために、原因を探ります。
Fatal error: Class ‘Doku_Handler_Quote’ not found in …/wiki/lib/plugins/markdowku/syntax/blockquotes.php on line 95
もう一度スクリーンショットしてあるエラーを読んでみると、markdowkuというプラグインで呼び出している「Doku_Handler_Quote」というクラスの参照が見つからないようです。
2-1. Markdowkuプラグインとは?
Markdowkuプラグインは、MarkdownをDokuWiki構文に追加します。
構文変更ではなく追加なので、markdowkuでは、Markdown構文に加えて、Dokuwikiの構文でも表や内部リンクを利用することができます。
つまり、いいとこ取りができるんです。

markdown構文は見出しを#で指定できるのが便利で、Dokuwikiはリンクを[[]]で指定できるのが便利だと思います
2-2. Dokuwikiのバージョン「2020-07-29 Hogfather」
そもそも、今回はDokuwikiのバージョンを「2018-04-22c Greebo」 から「2020-07-29 Hogfather」にアップグレードしました。

新しいバージョンでは「Doku_Handler_Quote」クラスは参照できなくなっているようです。
3. MarkdowkuプラグインはHogfatherに未対応
プラグインの更新がないかどうか、復元したDokuwikiの設定から見てみることにしました。
すると、Markdowkuプラグインの配布URLが変更されていることがわかりました。

- 旧)https://komkon2.de/markdowku/markdowku.tgz
- 新)https://github.com/Medieninformatik-Regensburg/dokuwiki-plugin-markdowku/archive/Greebo.zip
githubのレジストリからplugin.info.txtを表示してみると、pluginURLがありました。

こちらを確認すると、現時点(2020-08-21)では Hogfatherに対応していないことがはっきりしました。

3-1. バグ修正には2週間ほどかかるらしい
Githubのフォーラムを見てみると、さしあたりの解決方法と、バグ修正には2週間ほどかかることがわかりました。

- lib/plugins/markdowku/syntax/blockquotes.php
- lib/plugins/markdowku/syntax/olists.php
- lib/plugins/markdowku/syntax/ulists.php
の3つのシンタックスファイルを削除することで、不完全ながらエラーは消せるようです。
他にもhttps://www.dokuwiki.org/plugin:markdowkuには以下のような、暫定版(RC2)が公開されています。


ちょっとややこしいですね💦
一応プロジェクトは進行中なのでバグ修正を待ってからDokuwikiのアップグレードをしようと思います。

