WordPressにログインしようとしたら急にエラーが出ました。
サイトを見ても、エラーが表示されていてレイアウトも崩れていました。
対象のファイルを見てみると、以下のように書かれていました。赤文字の部分がエラーの出ている行です。
public function __construct() {
$this->parent->admin_notices[] = array(
’type’ => ‘error’,
’msg’ => ‘<strong>’ . __( ‘File Permission Issues’, ‘redux-framework’ ) . ‘</strong><br/>’ . sprintf( __( ‘We were unable to modify required files. Please check your permissions, or modify your wp-config.php file to contain your FTP login credentials as <a href=”%s” target=”_blank”>outlined here</a>.’, ‘redux-framework’ ), ‘https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants’ ),
’id’ => ‘redux-wp-login’,
’dismiss’ => false,
);
}
$this->parent->admin_notices[] = array(
’type’ => ‘error’,
’msg’ => ‘<strong>’ . __( ‘File Permission Issues’, ‘redux-framework’ ) . ‘</strong><br/>’ . sprintf( __( ‘We were unable to modify required files. Please check your permissions, or modify your wp-config.php file to contain your FTP login credentials as <a href=”%s” target=”_blank”>outlined here</a>.’, ‘redux-framework’ ), ‘https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants’ ),
’id’ => ‘redux-wp-login’,
’dismiss’ => false,
);
}
最終的に、以下の行を追記することで解決しました。
public function __construct() {
$this->parent = new stdClass;
$this->parent->admin_notices[] = array(
’type’ => ‘error’,
’msg’ => ‘<strong>’ . __( ‘File Permission Issues’, ‘redux-framework’ ) . ‘</strong><br/>’ . sprintf( __( ‘We were unable to modify required files. Please check your permissions, or modify your wp-config.php file to contain your FTP login credentials as <a href=”%s” target=”_blank”>outlined here</a>.’, ‘redux-framework’ ), ‘https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants’ ),
’id’ => ‘redux-wp-login’,
’dismiss’ => false,
);
}
$this->parent = new stdClass;
$this->parent->admin_notices[] = array(
’type’ => ‘error’,
’msg’ => ‘<strong>’ . __( ‘File Permission Issues’, ‘redux-framework’ ) . ‘</strong><br/>’ . sprintf( __( ‘We were unable to modify required files. Please check your permissions, or modify your wp-config.php file to contain your FTP login credentials as <a href=”%s” target=”_blank”>outlined here</a>.’, ‘redux-framework’ ), ‘https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants’ ),
’id’ => ‘redux-wp-login’,
’dismiss’ => false,
);
}
合っているのかいまいちわからないけど、とりあえずエラーが表示されなくなったのでよしとします。
Leave a Comment