サーバー:ロリポップ
WordPress:4.9.9
記事数:1000ちょっと
準備
ロリポップを利用している場合、データベースのパスワードの再設定が必要
これを忘れるとバージョンアップ後、画面が真っ白になるので要注意。
https://lolipop.jp/support/faq/cgi/000795/
ロリポップのバックアップオプション(月300円ぐらい)に加入しているので、バックアップ管理画面からバックアップを行う。
プラグインのWordPress Popular Postのフォルダ、画像のuploadフォルダがとても重たい。
参考までに6GBちょっとで2時間30分ぐらいだった。
debugモードをONにしていざphp7.1にバージョンアップ
5分ぐらい待ってアクセス。
/adminにアクセス
下記のwarningが出てログインにリダイレクトされない
Warning: Parameter 2 to qtranxf_excludeUntranslatedPosts() expected to be a reference, value given in /.../wp-includes/class-wp-hook.php on line 286
Warning: Parameter 2 to qtranxf_postsFilter() expected to be a reference, value given in /.../wp-includes/class-wp-hook.php on line 286
↑ 2つのwarningを4回ほど繰り返しで出力
Warning: Cannot modify header information - headers already sent by (output started at /.../wp-includes/class-wp-hook.php:286) in /.../wp-includes/pluggable.php on line 1219
/wp-adminでアクセス
上記のwarningに加えて下記のwaningも表示された
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-login.php on line 423
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-login.php on line 436
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 948
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 949
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 950
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 951
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 952
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 953
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 956
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 957
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 960
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 961
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 962
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 963
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 966
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 967
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 968
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 969
Warning: Cannot modify header information - headers already sent by (output started at /…/wp-includes/class-wp-hook.php:286) in /…/wp-includes/pluggable.php on line 972
いっぱいwarningが出るもののログインフォームが出てきたので、ログインを試みるが、[ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.]と表示され、ログインできない。
心が折れかけたのでとりあえずトップページを表示
Warning: Parameter 2 to qtranxf_excludeUntranslatedPosts() expected to be a reference, value given in /.../wp-includes/class-wp-hook.php on line 286
Warning: Parameter 2 to qtranxf_postsFilter() expected to be a reference, value given in /.../wp-includes/class-wp-hook.php on line 286
↑の2つのwarningが4回繰り返し
負の遺産のqTranslate-X。。。
とりあえずググると下記のissueで対応済み。マージされていないが。。。
https://github.com/qTranslate-Team/qtranslate-x/issues/542
なので、同じ修正を入れる。
/wp-content/plugins/qtranslate-x/qtranslate_frontend.php
522行目と596行目あたりに下記のような記述がある。(gitだと522行目、596行目の修正だが、自分のは523行目、597行目だった)
function qtranxf_postsFilter($posts,&$query) {//WP_Query
function qtranxf_excludeUntranslatedPosts($where,&$query) {//WP_Query
上記の二つのfunctionの引数の
&$query
の & を消す
記事ページも確認してみた。また発生。
Warning: Parameter 2 to qtranxf_excludeUntranslatedPostComments() expected to be a reference, value given in /.../wp-includes/class-wp-hook.php on line 286
上記と同様のファイルで、qtranxf_excludeUntranslatedPostComments()
を探す。
629行目に発見
function qtranxf_excludeUntranslatedPostComments($clauses, &$q/WP_Comment_Query/) {
同様に&を削除
カテゴリーアーカイブページを確認すると下記のNoticeが出ていた。
これはもともとあったのかもしれない。
確認したページがcategory-[slug].phpの特定のカテゴリのみのアーカイブページだったので、他を確認するとエラーが出てない。これはバージョンアップに関係ない。あとで治す。
Notice: Undefined variable: additional_loop in /.../wp-content/themes/guidable/category-work.php on line 65
Notice: Trying to get property of non-object in /.../wp-content/themes/guidable/category-work.php on line 65
authorアーカイブページを確認する。特にログは表示されていない。
改めてadminページにアクセス
warningが解消され、ログインもできた
ダッシュボード、投稿一覧、投稿の編集にログの表示は見当たらない
意外とすんなり対応完了
そのうちWordPressを5にバージョンアップしなきゃ。。。
コメントを残す