Title: PHP Errors and JavaScript Issues
Last modified: February 8, 2023

---

# PHP Errors and JavaScript Issues

 *  Resolved [tenacityio](https://wordpress.org/support/users/tenacityio/)
 * (@tenacityio)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/)
 * We are receiving an error that breaks the Page Editor.
 * Uncaught Error: date() expects at most 2 arguments, 3 given
   [wp-content/plugins/cmb2/includes/CMB2_Base.php:315](https://detourxp.com/wp-admin/post.php?post=152769&action=edit&classic-editor#qm-fatal)
   Additionally, something to do with this plugin is breaking JavaScript on the 
   page though there is no error in the console.The server was recently updated 
   to PHP8.0, which is now the minimum version. We’ve found the same error coming
   from the Gamipress version. Our install is the current version 6.1.1

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * (@jtsternberg)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16452660)
 * I tested with PHP 8 and am not seeing any issues. This might be specific to Gamipress.
 *  Thread Starter [tenacityio](https://wordpress.org/support/users/tenacityio/)
 * (@tenacityio)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16471612)
 * It’s not just Gamipress. 
   When activated, it reports the following error. (Gamipress
   not active.) I look at it, and basically, it’s using call_user_func but not limiting
   parameters.[https://help.tenacity.io/rRu5r0nl](https://help.tenacity.io/rRu5r0nl)
 * When activated, it also breaks the Standard Editor and WP Bakery (but only on
   Pages), which makes sense because it’s only being used for Pages in our theme.
   
   [https://help.tenacity.io/Jruy0qwR](https://help.tenacity.io/Jruy0qwR)I think
   this is likely two separate issues. Gamipress activation generates the same errors
   since they use CMB2 as a library.I found the following[https://stackoverflow.com/questions/34116787/cmb2-tinymce-menu-bar-not-showing](https://stackoverflow.com/questions/34116787/cmb2-tinymce-menu-bar-not-showing)
   But I’ve been through our theme code, and we don’t use wysiwyg fields, so it 
   didn’t apply. Perhaps there is something else?
 *  Plugin Author [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * (@jtsternberg)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16471624)
 * Can you provide the CMB2 box registration code, or is that all in 3rd party code(
   e.g. other plugins like gamipress)?
 *  Thread Starter [tenacityio](https://wordpress.org/support/users/tenacityio/)
 * (@tenacityio)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16471644)
 * Registration Code? Like an activation code for the plugin?
   Or do you mean the
   theme code that uses CMB2?
 *  Plugin Author [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * (@jtsternberg)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16471656)
 * The theme code that uses CMB2.
 *  Thread Starter [tenacityio](https://wordpress.org/support/users/tenacityio/)
 * (@tenacityio)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16471671)
 * Sure here is all of the related PHP code that use CMB2 in the theme.
   [https://gist.github.com/tenacityio/a6d3afb28a8192677431b53d610567d1](https://gist.github.com/tenacityio/a6d3afb28a8192677431b53d610567d1)
 *  Plugin Author [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * (@jtsternberg)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16471674)
 * Yah the issue is the default_cb param is set to `date` so it’s calling that as
   a function. If trying to set a string, then probably need to do something like
   this:
 * `’default_cb' => function() {return ‘date’;}`
 *  Thread Starter [tenacityio](https://wordpress.org/support/users/tenacityio/)
 * (@tenacityio)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16471727)
 * [@jtsternberg](https://wordpress.org/support/users/jtsternberg/) That seems to
   have eliminated the error and restored the editor. Thank you! That would have
   taken forever to figure out.
 *  Plugin Author [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * (@jtsternberg)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16474440)
 * Glad it’s sorted. 👍

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘PHP Errors and JavaScript Issues’ is closed to new replies.

 * ![](https://ps.w.org/cmb2/assets/icon.svg?rev=2866672)
 * [CMB2](https://wordpress.org/plugins/cmb2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cmb2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cmb2/)
 * [Active Topics](https://wordpress.org/support/plugin/cmb2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cmb2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cmb2/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/php-errors-and-javascript-issues/#post-16474440)
 * Status: resolved