TOP › Forums › バグ報告と提案(Requests and Feedback) › WordPress 6.8.0でFunction wp_is_block_theme was called incorrectly.が発生
- This topic has 3 replies, 2 voices, and was last updated 1 year, 6 months ago by
Murodon.
Viewing 2 reply threads
-
AuthorPosts
-
-
2025年4月20日 at 12:45 #1535
Murodon
ParticipantType: wp KUSANAGI Version 9.6.9-1.el9 conoha CentOS Stream 9 *** (active) nginx : nginx125 *** * nginx.service - The NGINX HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: disabled) Active: active (running) since Sun 2025-04-20 03:12:52 JST; 8h ago *** (inactive) httpd : httpd24 *** * httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: disabled) Active: inactive (dead) *** (active) php : php82 *** * php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; preset: disabled) Active: active (running) since Sun 2025-04-20 00:53:11 JST; 10h ago *** (active) mariadb : mariadb10.6 *** * mariadb.service - MariaDB 10.6.21 database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled) Active: active (running) since Fri 2025-04-04 14:22:58 JST; 2 weeks 1 day ago *** (inactive) psql : *** *** (inactive) pgpool-II : *** *** python *** Python 3.9.22 *** Cache status *** bcache on fcache off *** WAF *** off *** SELinux *** off status completed.Wordpress6.8.0へアップグレード後、フロントページを見ると
Notice: Function wp_is_block_theme was called incorrectly. This function should not be called before the theme directory is registered. Please see Debugging in WordPress for more information. (This message was added in version 6.8.0.) in /home/kusanagi/profile_folder/DocumentRoot/wp-includes/functions.php on line 6121とNoticeが発生します。
wp_is_block_themeはテーマ内では使用していなかったので、使用箇所を調べたところ、
mu-plugins>kusanagi-core>modules>theme-accelerator>theme-acccelerator-logic.php
の
public static function is_block_templates() { if ( ! function_exists( 'wp_is_block_theme' ) || ! function_exists( 'wp_theme_has_theme_json' ) ) { return false; } if ( wp_is_block_theme() || wp_theme_has_theme_json() ) { return true; } return false; }この箇所で使用しているのみでした。
試しにKusanagiプラグインにてテーマアクセラレーターを無効にしたところ、Noticeが発生しなくなりました。
プラグインはアップデート済みです。ChatGPTではafter_setup_theme のフックを使うと推奨しているようです。
以上ご報告まで。
-
2025年4月23日 at 08:57 #1537
hideishi
Participantmurodon さん
ご指摘ありがとうございます。
wp_is_block_theme()の呼び出しを修正しますので少々お待ちください。 -
2025年4月24日 at 14:07 #1538
hideishi
Participantmurodon さん
修正版をリリースしました。ご確認ください。
https://kusanagi.tokyo/releases/19410/-
2025年4月24日 at 22:00 #1539
Murodon
Participanthideishi様
修正版ありがとうございます。
1.3.9にupdateしてテーマアクセラレーターを管理画面よりONにして、Noticeが出てこないことを確認できました。
大事に使わせていただきます。ご対応ありがとうございました。
-
This reply was modified 1 year, 6 months ago by
Murodon.
-
This reply was modified 1 year, 6 months ago by
-
-
-
AuthorPosts
Viewing 2 reply threads
- You must be logged in to reply to this topic.