SOLVED: TwentyTen Child theme PHP Warning block-patterns.php
-
Hello. I recently updated the WordPress core from 5.7.2 to 5.8, after backing up everything and after updating plugins and themes. This was on a multisite network. One of the sites uses a Child Theme based on the TwentyTen theme. I dutifully also ran the “update network” option. I instantly got the infamous White Screen of Death on the one site in focus. When I finally located the PHP error log, the pertinent entries were along these lines:
PHP Warning: require( ~ /public_html/ ~ /wp-content/themes/ ~ child-theme/block-patterns.php): failed to open stream: No such file or directory in / ~ /public_html/ ~ /wp-content/themes/twentyten/functions.php on line 743
I had the presence of mind to notice the key was likely “block-patterns.php” — however, when I googled using terms such as…
TwentyTen Child theme PHP Warning block-patterns.php
…I got nothing related to speak of. I quickly sleuthed out that the issue was not in the child theme’s functions.php file, but rather in the parent theme’s functions.php file. Finally, I noticed it was calling for the existence of a new code file, block-patterns.php, but it was calling for its existence inside the child theme, not just the parent theme!
I solved this by simply making a copy of the newly existing file, block-patterns.php, in the parent theme, and moving that copy into the child theme. Problem solved. I hope this helps anyone else facing the same issue.
- The topic ‘SOLVED: TwentyTen Child theme PHP Warning block-patterns.php’ is closed to new replies.