watchfulli / XCloner-Wordpress

Backup and Restore Plugin for Wordpress
https://wordpress.org/plugins/xcloner-backup-and-restore/
GNU General Public License v2.0
94 stars 28 forks source link

Fatal error: Uncaught Error: Undefined constant Monolog\Utils::DEFAULT_JSON_FLAGS #299

Open CodeShakingSheep opened 10 months ago

CodeShakingSheep commented 10 months ago

Hi, I just wanted to check out this plugin because the repo is open-sourced on GitHub and its encryption feature. However, when I go to the dashboard after plugin activation I see this fatal error:

image

Fatal error: Uncaught Error: Undefined constant Monolog\Utils::DEFAULT_JSON_FLAGS in /var/www/wordpress__4/wp-content/plugins/backwpup/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:35 Stack trace: #0 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(113): Monolog\Handler\AbstractHandler->getDefaultFormatter() #1 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\AbstractHandler->getFormatter() #2 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle() #3 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/vendor/monolog/monolog/src/Monolog/Logger.php(642): Monolog\Logger->addRecord() #4 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/lib/Xcloner_Filesystem.php(699): Monolog\Logger->info() #5 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/admin/partials/xcloner_init_page.php(34): Watchfulli\XClonerCore\Xcloner_Filesystem->backup_storage_cleanup() #6 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/admin/class-xcloner-admin.php(130): require_once('...') #7 [internal function]: Xcloner_Admin->xcloner_init_page() #8 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/lib/Xcloner.php(837): call_user_func_array() #9 /var/www/wordpress__4/wp-content/plugins/xcloner-backup-and-restore/lib/Xcloner.php(831): Watchfulli\XClonerCore\Xcloner->display() #10 /var/www/wordpress__4/wp-includes/class-wp-hook.php(324): Watchfulli\XClonerCore\Xcloner->xcloner_display() #11 /var/www/wordpress__4/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #12 /var/www/wordpress__4/wp-includes/plugin.php(517): WP_Hook->do_action() #13 /var/www/wordpress__4/wp-admin/admin.php(259): do_action() #14 {main} thrown in /var/www/wordpress__4/wp-content/plugins/backwpup/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php on line 35
There has been a critical error on this website. Please check your site admin email inbox for instructions.

I run this website with PHP 8.2.14 and WordPress 6.4.2 on an nginx server. Would very much appreciate a fix. Still would love to check this out.

CodeShakingSheep commented 8 months ago

This error still persists even with the newer plugin version. @Ars92 Do you know what's going on there?

Edit: I checked the logs again and this seems to be a conflict with BackWPUp plugin. After I disabled BackWPUp plugin the error messages disappeared.

Edit 2: Although I could fix it by disabling BackWPup plugin, I think a fix would still be nice as you suggested here @Ars92 .