Fetal Error Compatibility issues
-
?recently upgraded my PHP version to 8.3 and I have the?latest version of WordPress 6.6. Looks like plugin is not compatible with the latest versions. I am getting Fetal Error while editing page~
Uncaught Error: date() expects at most 2 arguments, 3 given
wp-content/plugins/cmb2/includes/CMB2_Base.php:315
Looks like it is not compatible with latest php version.
The page I need help with: [log in to see the link]
-
Can you provide the CMB2 configuration that you’re using so that we can troubleshoot?
I am using free plugin. I just have option to activate and deactivate it. The configuration should be default. I just updated php version8.3 couple days ago. After that i am having this issue. also i have WordPress version 6.6 and in plugin it shows Warning:?This plugin?has not been tested?with your current version of WordPress. I am assuming it could be the plugin issue. Below is the complete error log~
PHP Fatal error: Uncaught ArgumentCountError: date() expects at most 2 arguments, 3 given in /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php:315\nStack trace:\n#0 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(315): date()\n#1 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(273): CMB2_Base->do_callback()\n#2 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(1345): CMB2_Base->get_param_callback_result()\n#3 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(778): CMB2_Field->get_default()\n#4 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(756): CMB2_Field->val_or_default()\n#5 /var/www/html/wp-content/plugins/cmb2/includes/types/CMB2_Type_Multi_Base.php(77): CMB2_Field->escaped_value()\n#6 /var/www/html/wp-content/plugins/cmb2/includes/types/CMB2_Type_Select.php(21): CMB2_Type_Multi_Base->concat_items()\n#7 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Types.php(605): CMB2_Type_Select->render()\n#8 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Types.php(101): CMB2_Types->select()\n#9 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Types.php(90): CMB2_Types->_render()\n#10 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(934): CMB2_Types->render()\n#11 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(315): CMB2_Field->render_field_callback()\n#12 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(273): CMB2_Base->do_callback()\n#13 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(249): CMB2_Base->get_param_callback_result()\n#14 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(872): CMB2_Base->peform_param_callback()\n#15 /var/www/html/wp-content/plugins/cmb2/includes/CMB2.php(472): CMB2_Field->render_field()\n#16 /var/www/html/wp-content/plugins/cmb2/includes/CMB2.php(268): CMB2->render_field()\n#17 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Hookup.php(736): CMB2->show_form()\n#18 /var/www/html/wp-admin/includes/template.php(1456): CMB2_Hookup->metabox_callback()\n#19 /var/www/html/wp-admin/includes/post.php(2384): do_meta_boxes()\n#20 /var/www/html/wp-admin/edit-form-blocks.php(319): the_block_editor_meta_boxes()\n#21 /var/www/html/wp-admin/post.php(187): require(‘…’)\n#22 {main}\n thrown in /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php on line 315, referer:
I got another fetal error email while edit page. When i switched to recovery mode i got below error.
This plugin failed to load properly and is paused during recovery mode.
An error of type
E_ERROR
was caused in line315
of the file/var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php
. Error message:Uncaught ArgumentCountError: date() expects at most 2 arguments, 3 given in /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php:315 Stack trace: #0 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(315): date() #1 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(273): CMB2_Base->do_callback() #2 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(1345): CMB2_Base->get_param_callback_result() #3 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(778): CMB2_Field->get_default() #4 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(756): CMB2_Field->val_or_default() #5 /var/www/html/wp-content/plugins/cmb2/includes/types/CMB2_Type_Multi_Base.php(77): CMB2_Field->escaped_value() #6 /var/www/html/wp-content/plugins/cmb2/includes/types/CMB2_Type_Select.php(21): CMB2_Type_Multi_Base->concat_items() #7 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Types.php(605): CMB2_Type_Select->render() #8 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Types.php(101): CMB2_Types->select() #9 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Types.php(90): CMB2_Types->_render() #10 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(934): CMB2_Types->render() #11 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(315): CMB2_Field->render_field_callback() #12 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(273): CMB2_Base->do_callback() #13 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Base.php(249): CMB2_Base->get_param_callback_result() #14 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Field.php(872): CMB2_Base->peform_param_callback() #15 /var/www/html/wp-content/plugins/cmb2/includes/CMB2.php(472): CMB2_Field->render_field() #16 /var/www/html/wp-content/plugins/cmb2/includes/CMB2.php(268): CMB2->render_field() #17 /var/www/html/wp-content/plugins/cmb2/includes/CMB2_Hookup.php(736): CMB2->show_form() #18 /var/www/html/wp-admin/includes/template.php(1456): CMB2_Hookup->metabox_callback() #19 /var/www/html/wp-admin/includes/post.php(2384): do_meta_boxes() #20 /var/www/html/wp-admin/edit-form-blocks.php(319): the_block_editor_meta_boxes() #21 /var/www/html/wp-admin/post.php(187): require('...') #22 {main} thrown
Looks like a reply I thought I had published didn’t get published.
CMB2 once activated, doesn’t do anything right away. It’s a PHP library so you need to make use of code to start initializing things. For example https://github.com/CMB2/CMB2/wiki/Basic-Usage#create-a-metabox
I’m looking for whatever code you’re using to create the metaboxes, like in the example above, so that I can copy/paste that code into a local install and see if I can recreate the error, so I can start checking on how to resolve the error.
Hi,
I have installed premium theme which use CMB2 Library.
Here is the link to file that creates meta boxes. https://we.tl/t-XYLl6ykKFY
For me everything seems to fine. Hope you can find out what is wrong. It just related to date.
If this is part of a premium theme, then the developers of the the theme should be handling fixing things, and if they find that it’s a bug that needs to be trickled up to the core plugin here, we can get a GitHub issue opened to look into it.
Their support should still be the first place though, in this specific case.
- The topic ‘Fetal Error Compatibility issues’ is closed to new replies.