1
0

More than 3 years have passed since last update.

WordPressのインフラ構成とバグ(現在オフラインです/ブロックエディタが非アクティブ)

Posted at

(症例1)公開に失敗しました。 現在オフラインのようです。

投稿ボタンを押したときに、

公開に失敗しました。 現在オフラインのようです。

と表示されます。
色々解決法はあるようですが自分の場合は、
設定>一般にある
WordPress アドレス (URL)とサイトアドレス (URL)を

http://hogehogeooooo.com
から
https://hogehogeooooo.com
に変更

することで解決しました。

(症例2)ブロック追加が非アクティブ

こちらが今回のメインテーマです。
WordPressの新しいものは従来のHTML編集のみならずGutenbergというブロックエディタを使用することが可能です。
参考:)
HTML編集
スクリーンショット 2020-08-28 12.20.04.png
Gutenberg(ブロック挿入エディタ)
スクリーンショット 2020-08-28 11.38.51.png

が、左上にあるブロックの挿入ボタンが非アクティブでした。:cold_sweat:

該当のシステム構成

- EC2
- CloudFront
- Route53

通常は、
ユーザー>プロフィール編集から
ビジュアルリッチエディターを使用しないのチェックを外せば解決する
ようですがダメでした。

原因はクラウドフロントで、
該当テーマの配下にあるfunctions.phpに下記のコードを追加することで解決します。
Amazon Lightsailを使用している場合は
./wordpress/htdocs/wp-content/themes/xxxxx/functions.php

function dtbaker_wp_cloudfront(){
    add_filter('user_can_richedit','__return_true');
}
add_action( 'init', 'dtbaker_wp_cloudfront' , 9 );

参考:
https://dtbaker.net/blog/rich-textvisualwysiwyg-editor-does-not-work-in-wordpress-behind-cloudfront/

こんな感じで治りました。
スクリーンショット 2020-08-28 12.33.11.png

めでたしめでたし:smiley:

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0