[WP覚書]管理画面にプラグインエラーの表記が出るようになった場合は『function.php』の記述間違いを疑え( ゚Д゚)
20130129解決!!
function.phpで、あとから仕様追加したところで、以下のように前方に個別に記述してたところを、
<?php
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];
if(empty($first_img)){ //Defines a default image
$first_img = "http://ponnao.heteml.jp/images/noimages.png";
}
return $first_img;
}
?>
<?php
function new_excerpt_more($more) {
return ' ... <a class="more" href="'. get_permalink() . '">続きを読む</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
?>
以下のように、元々合った<?php ~ ?>内の後方に記述したらエラーメッセージがでなくなりました。
アップデートかなにかがきっかけでphp記述を厳密に認識するようになったのか。
今までかなり適当だったので、記述方法を勉強しないとなりません(><)
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];
if(empty($first_img)){ //Defines a default image
$first_img = "http://ponnao.heteml.jp/images/noimages.png";
}
return $first_img;
}
function new_excerpt_more($more) {
return ' ... <a class="more" href="'. get_permalink() . '">続きを読む</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
管理画面エラー記述まとめ
2012年の年末から2013年の1月末にかけてエラーでまくりだったので書き残しておきます。
最初に出たプラグイン「wordpress mobile admin」関連のエラーメッセージ
WordPressの管理画面をiPhoneなどのモバイル対応にするプラグイン -WordPress Mobile Admin | コリス
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, ‘<' not found in [サイトの絶対パス]/wp-content/plugins/wordpress-mobile-admin/functions.php on line 305 Warning: simplexml_load_string() [function.simplexml-load-string]: SoapFault exception: [ns1:Dev Key Auth Error - No Match] Developer key authentic in [サイトの絶対パス]/wp-content/plugins/wordpress-mobile-admin/functions.php on line 305 Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in [サイトの絶対パス]/wp-content/plugins/wordpress-mobile-admin/functions.php on line 305
記事更新後のエラー
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/ponnao-257/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/ponnao-257/wp-login.php on line 368
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/ponnao-257/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/ponnao-257/wp-login.php on line 380
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/ponnao-257/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/ponnao-257/wp-includes/pluggable.php on line 680
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/ponnao-257/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/ponnao-257/wp-includes/pluggable.php on line 681
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/ponnao-257/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/ponnao-257/wp-includes/pluggable.php on line 682
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/ponnao-257/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/ponnao-257/wp-includes/pluggable.php on line 876
ログアウトしたときの大量エラー( ゚Д゚)ヒョエー
「wp-login.php」と「pluggable.php」にエラー出まくりです。
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-login.php on line 368
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-login.php on line 380
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 697
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 698
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 699
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 700
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 701
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 702
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 705
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 706
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 707
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 708
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 711
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 712
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 713
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 714
Warning: Cannot modify header information – headers already sent by (output started at [サイトの絶対パス]/wp-content/themes/arthemia/functions.php:17) in [サイトの絶対パス]/wp-includes/pluggable.php on line 876
サーバのPHPアップデートのせいかなぁ。
hetemlのphpアップデートがあやしいなぁとは思ってる(^^;
まぁ記述がおかしかったのは自分のせいなので仕方ないですが。
【実施日時】
2013年01月15日(火)11時 ~18時の間で瞬断【メンテナンス内容】
PHP5.4導入に伴うモジュールのアップデート【サービス停止対象】
WEBサイトの表示【メンテナンスによる影響】
モジュールのアップデートに伴い上記メンテナンス中に瞬断が発生いたします。
メンテナンス終了までにサイトがアクセスできない際には、再度アクセスを
お願い致します。


横浜在住。Web制作の仕事をしているへっぽこワーキングマザーです。6歳児に育てられています。







ディスカッション
コメント一覧
まだ、コメントがありません