nextjs-wordpress-starter icon indicating copy to clipboard operation
nextjs-wordpress-starter copied to clipboard

Error when activating WDS plugins

Open phanuelmutuma opened this issue 2 years ago • 3 comments

Describe the bug Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "WDS_Headless_Core\activation_callback" not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php:307 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #1 C:\xampp\htdocs\wordpress\wp-includes\plugin.php(476): WP_Hook->do_action(Array) #2 C:\xampp\htdocs\wordpress\wp-admin\plugins.php(194): do_action('activate_wds-he...') #3 {main} thrown in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php on line 307

To Reproduce Steps to reproduce the behavior:

  1. Install plugins via composer
  2. Try to activate either of the WDS plugins

Expected behavior The plugins should activate normally without error

Desktop (please complete the following information):

  • OS: Windows 21H2
  • Browser Microsoft edge with Chromium
  • Version 90

phanuelmutuma avatar Oct 20 '22 16:10 phanuelmutuma

@phanuelmutuma What is the version of PHP? It seems that PHP 8.1.x gives a Fatal error on several plugins.

mrEckendonk avatar Oct 23 '22 22:10 mrEckendonk

I was able to work around this by temporarily adding a couple require statements in each of the WDS plugins:

I opened a PR for one of them here to provide an example: https://github.com/WebDevStudios/wds-headless-core/pull/12

alexstandiford avatar Feb 03 '23 14:02 alexstandiford

Same error today with PHP 8.1.9, switching to PHP 7.4.30 resolved it

sdoigmm avatar May 22 '23 06:05 sdoigmm