サポート » 使い方全般 » ログインできない

  • サイト編集し、一度ロゴアウト後、数時間して再度ログインしようとしたら下記のエラーメッセージが出てログインできなくなりました。
    解決方法をご教授いただけますでしょうか。

    ———————————————————————
    Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/extoskoko/www/home/wordpress/wp-includes/functions.php on line 2748
    
    Warning: Cannot modify header information – headers already sent by (output started at /home/extoskoko/www/home/wordpress/wp-includes/functions.php:2748) in /home/extoskoko/www/home/wordpress/wp-login.php on line 362

    Warning: Cannot modify header information – headers already sent by (output started at /home/extoskoko/www/home/wordpress/wp-includes/functions.php:2748) in /home/extoskoko/www/home/wordpress/wp-login.php on line 374

    Warning: Cannot modify header information – headers already sent by (output started at /home/extoskoko/www/home/wordpress/wp-includes/functions.php:2748) in /home/extoskoko/www/home/wordpress/wp-login.php on line 376

    Warning: Cannot modify header information – headers already sent by (output started at /home/extoskoko/www/home/wordpress/wp-includes/functions.php:2748) in /home/extoskoko/www/home/wordpress/wp-includes/pluggable.php on line 680

    Warning: Cannot modify header information – headers already sent by (output started at /home/extoskoko/www/home/wordpress/wp-includes/functions.php:2748) in /home/extoskoko/www/home/wordpress/wp-includes/pluggable.php on line 681

    Warning: Cannot modify header information – headers already sent by (output started at /home/extoskoko/www/home/wordpress/wp-includes/functions.php:2748) in /home/extoskoko/www/home/wordpress/wp-includes/pluggable.php on line 682

    Warning: Cannot modify header information – headers already sent by (output started at /home/extoskoko/www/home/wordpress/wp-includes/functions.php:2748) in /home/extoskoko/www/home/wordpress/wp-includes/pluggable.php on line 684

    Warning: Cannot modify header information – headers already sent by (output started at /home/extoskoko/www/home/wordpress/wp-includes/functions.php:2748) in /home/extoskoko/www/home/wordpress/wp-includes/pluggable.php on line 881
    ———————————————————————-

    以上、よろしくお願いいたします。

4件の返信を表示中 - 1 - 4件目 (全4件中)
  • モデレーター Seisuke Kuraishi

    (@tenpura)

    cruijff14 さん

    まず wp_enqueue_script() がよろしくない方法で呼ばれているようです。公開側でスクリプトを読み込む場合は wp_enqueue_scripts フック、管理画面で読み込む場合は admin_enqueue_scripts フックを利用して wp_enqueue_script() を呼んでください。

    それから、デバッグモードが有効化されているため Notice が出力されてしまっています。公開サイトではデバッグモードを有効化するべきではありません。define('WP_DEBUG', false); としてください。

    これらは両方ともよくある間違った設定・カスタマイズなのですが、書籍あるいは、どこかのサイトを参考にして行ったものでしょうか?日本語チームでは現在「問題解決のためのチェックリスト」を作り直しておりますのでよろしければ参考までにお教えください。

    トピック投稿者 cruijff14

    (@cruijff14)

    ご教授ありがとうございました。
    define(‘WP_DEBUG’, true);をdefine(‘WP_DEBUG’, false);に戻したらログインできました。
    これは、ログイン画面が真っ白になったためWEB上で調べた際、そのような指摘がありましたので、変更いたしました。その際、問い合わせのエラーログと違う内容でしたが、いろいろ触っているうちに問い合わせのログがどうしても消えなくなり、問い合わせた次第です。

    それから、回答にあります
    ———————————————————————–
    wp_enqueue_script() がよろしくない方法で呼ばれているようです。公開側でスクリプトを読み込む場合は wp_enqueue_scripts フック、管理画面で読み込む場合は admin_enqueue_scripts フックを利用して wp_enqueue_script() を呼んでください。
    ———————————————————————–
    は、今回何もしておりませんが、具体的には何処をどう変更したらいいのでしょうか?
    WP初心者のため、お手数をお掛けして申し訳ありません。ご教授ください。

    モデレーター gatespace

    (@gatespace)

    こんにちは。
    「今回何もしておりません」とのことですが、
    wp_enqueue_script() はプラグインやテーマで使われていると思われますので、
    お使いになられているテーマ、及び、プラグインを書いてみたらどうでしょう?

    モデレーター Seisuke Kuraishi

    (@tenpura)

    そうですね。gatespace さんがおっしゃるようにプラグインかテーマに問題がある可能性が高いです。オーソドックスな方法ですが以下手順でどこに問題があるか調べられると思います。

    1. プラグインをすべて無効化し、テーマをデフォルトの Twenty Eleven にする
    2. define('WP_DEBUG', true); にする
    3. プラグイン、テーマをひとつずつ元の状態に戻していく過程でエラーが出たものが問題のコードを持っている
4件の返信を表示中 - 1 - 4件目 (全4件中)
  • トピック「ログインできない」には新たに返信することはできません。