3

I'm working on a website that has been met with the WordPress "white screen of death" error, 'The site is experiencing technical difficulties.'

I believe this occurred when updating all plugins, I have tried disabling all plugins of the website (by renaming the /wp-content/plugins to /wp-content/plugins.hold), but that did not work. I did the same with disabling the used theme but got the same result.

So after enabling debugging and looking through the debug.log, I have found this error:

PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata() in /home/uni19047/public_html/udu.com.au/wp-includes/blocks/archives.php:119

I am not sure what is causing this and I would really appreciate any help in this.

Here's the full log.

[28-Sep-2020 16:34:36 UTC] PHP Warning:  include_once(/home/uni19047/public_html/udu.com.au/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /home/uni19047/public_html/udu.com.au/wp-content/advanced-cache.php on line 22
[28-Sep-2020 16:34:36 UTC] PHP Warning:  include_once(): Failed opening '/home/uni19047/public_html/udu.com.au/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/uni19047/public_html/udu.com.au/wp-content/advanced-cache.php on line 22
[28-Sep-2020 16:34:36 UTC] PHP Notice:  The called constructor method for WP_Widget in Roots_Vcard_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /home/uni19047/public_html/udu.com.au/wp-includes/functions.php on line 4503
[28-Sep-2020 16:34:36 UTC] PHP Warning:  include_once(/home/uni19047/public_html/udu.com.au/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /home/uni19047/public_html/udu.com.au/wp-content/advanced-cache.php on line 22
[28-Sep-2020 16:34:36 UTC] PHP Warning:  include_once(): Failed opening '/home/uni19047/public_html/udu.com.au/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/uni19047/public_html/udu.com.au/wp-content/advanced-cache.php on line 22
[28-Sep-2020 16:34:37 UTC] PHP Notice:  The called constructor method for WP_Widget in Roots_Vcard_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /home/uni19047/public_html/udu.com.au/wp-includes/functions.php on line 4503
[28-Sep-2020 16:34:37 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function register_block_type_from_metadata() in /home/uni19047/public_html/udu.com.au/wp-includes/blocks/archives.php:119
Stack trace:
#0 /home/uni19047/public_html/udu.com.au/wp-includes/class-wp-hook.php(286): register_block_core_archives('')
#1 /home/uni19047/public_html/udu.com.au/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/uni19047/public_html/udu.com.au/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#3 /home/uni19047/public_html/udu.com.au/wp-settings.php(525): do_action('init')
#4 /home/uni19047/public_html/udu.com.au/wp-config.php(114): require_once('/home/uni19047/...')
#5 /home/uni19047/public_html/udu.com.au/wp-load.php(37): require_once('/home/uni19047/...')
#6 /home/uni19047/public_html/udu.com.au/wp-cron.php(39): require_once('/home/uni19047/...')
#7 {main}
  thrown in /home/uni19047/public_html/udu.com.au/wp-includes/blocks/archives.php on line 119
[28-Sep-2020 16:34:37 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function register_block_type_from_metadata() in /home/uni19047/public_html/udu.com.au/wp-includes/blocks/archives.php:119
Stack trace:
#0 /home/uni19047/public_html/udu.com.au/wp-includes/class-wp-hook.php(286): register_block_core_archives('')
#1 /home/uni19047/public_html/udu.com.au/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/uni19047/public_html/udu.com.au/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#3 /home/uni19047/public_html/udu.com.au/wp-settings.php(525): do_action('init')
#4 /home/uni19047/public_html/udu.com.au/wp-config.php(114): require_once('/home/uni19047/...')
#5 /home/uni19047/public_html/udu.com.au/wp-load.php(37): require_once('/home/uni19047/...')
#6 /home/uni19047/public_html/udu.com.au/wp-blog-header.php(13): require_once('/home/uni19047/...')
#7 /home/uni19047/public_html/udu.com.au/index.php(17): require('/home/uni19047/...')
#8 {main}
  thrown in /home/uni19047/public_html/udu.com.au/wp-includes/blocks/archives.php on line 119
[28-Sep-2020 16:34:45 UTC] PHP Warning:  include_once(/home/uni19047/public_html/udu.com.au/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /home/uni19047/public_html/udu.com.au/wp-content/advanced-cache.php on line 22
[28-Sep-2020 16:34:45 UTC] PHP Warning:  include_once(): Failed opening '/home/uni19047/public_html/udu.com.au/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/uni19047/public_html/udu.com.au/wp-content/advanced-cache.php on line 22
[28-Sep-2020 16:34:45 UTC] PHP Notice:  The called constructor method for WP_Widget in Roots_Vcard_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /home/uni19047/public_html/udu.com.au/wp-includes/functions.php on line 4503
[28-Sep-2020 16:34:45 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function register_block_type_from_metadata() in /home/uni19047/public_html/udu.com.au/wp-includes/blocks/archives.php:119
Stack trace:
#0 /home/uni19047/public_html/udu.com.au/wp-includes/class-wp-hook.php(286): register_block_core_archives('')
#1 /home/uni19047/public_html/udu.com.au/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/uni19047/public_html/udu.com.au/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#3 /home/uni19047/public_html/udu.com.au/wp-settings.php(525): do_action('init')
#4 /home/uni19047/public_html/udu.com.au/wp-config.php(114): require_once('/home/uni19047/...')
#5 /home/uni19047/public_html/udu.com.au/wp-load.php(37): require_once('/home/uni19047/...')
#6 /home/uni19047/public_html/udu.com.au/wp-blog-header.php(13): require_once('/home/uni19047/...')
#7 /home/uni19047/public_html/udu.com.au/index.php(17): require('/home/uni19047/...')
#8 {main}
  thrown in /home/uni19047/public_html/udu.com.au/wp-includes/blocks/archives.php on line 119

And I am using cPanel for this.

Please do give me some guidance on how to fix this, thanks very much.

1 Answer 1

1

What comes to my mind is that You should check Your wp-settings.php file, as it should include wp-includes/blocks.php file where "register_block_type_from_metadata" function is defined

check that file for this line of code:

require ABSPATH . WPINC . '/blocks.php';

if its not there, then Your wordpress installation could have been either hacked or interupted while updating

As We find Out, register_block_type_from_metadata function definition was missing in blocks.php file, due to wordpress update interuption. Replacing that file with the original version fixes the problem

9
  • Thanks a lot! But yes there is that code in the wp-settings.php file. It appears as require( ABSPATH . WPINC . '/blocks.php' ); Commented Sep 29, 2020 at 14:12
  • What about "register_block_type_from_metadata" function in wp-includes/blocks.php file? Commented Sep 29, 2020 at 14:34
  • Yes, there is no function for that in wp-includes/blocks.php. I guess that is the issue? This is the closest thing; function register_block_type( $name, $args = array() ) { return WP_Block_Type_Registry::get_instance()->register( $name, $args ); } Commented Sep 29, 2020 at 14:42
  • there should be function named exactly "register_block_type_from_metadata" Commented Sep 29, 2020 at 14:57
  • 1
    I edited the answer :) Keep in mind that there could be more corrupted files Commented Sep 29, 2020 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.