Title: Errors on WordPress.com with newest version
Last modified: April 9, 2019

---

# Errors on WordPress.com with newest version

 *  Resolved [kriskarkoski](https://wordpress.org/support/users/kriskarkoski/)
 * (@kriskarkoski)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/errors-on-wordpress-com-with-newest-version/)
 * Hi there! I am part of the WordPress.com Happiness team and following the recent
   update to your plugin our users are experiencing 500 errors when trying to create
   new pages or edit existing pages, even if they do not have any forms created 
   in the plugin.
 * Here is the error:
 *     ```
       PHP Fatal error: Uncaught TypeError: Argument 1 passed to CMB2::add_field() must be of the type array, string given, called in /wpcom-142972740/wp-content/plugins/constant-contact-forms/vendor/cmb2/cmb2/includes/CMB2.php on line 1435 and defined in /wpcom-142972740/wp-content/plugins/constant-contact-forms/vendor/cmb2/cmb2/includes/CMB2.php:1453 Stack trace: 
       #0 /wpcom-142972740/wp-content/plugins/constant-contact-forms/vendor/cmb2/cmb2/includes/CMB2.php(1435): CMB2->add_field('<p>No forms ava...') 
       #1 /wpcom-142972740/wp-content/plugins/constant-contact-forms/vendor/cmb2/cmb2/includes/CMB2.php(217): CMB2->add_fields(Array) 
       #2 /wpcom-142972740/wp-content/plugins/constant-contact-forms/vendor/cmb2/cmb2/includes/helper-functions.php(238): CMB2->__construct(Array, 'ctct') 
       #3 /wpcom-142972740/wp-content/plugins/constant-contact-forms/vendor/jtsternberg/shortcode-button/shortcode-button.php(254): cmb2_get_metabox(Array, 'ctct') 
       #4 /wpcom-142972740/wp-content/plugins/constant-contact-forms/vendor/jt
       ```
   
 * Please let me know if I can provide any additional information. Thanks!

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

 *  Plugin Author [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * (@constantcontact)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/errors-on-wordpress-com-with-newest-version/#post-11409625)
 * We have [https://wordpress.org/support/topic/warnings-on-edit-page-after-1-5-0-update/](https://wordpress.org/support/topic/warnings-on-edit-page-after-1-5-0-update/)
   as a duplicate issue for this one, and we’re planning to release a 1.5.1 version
   shortly that addresses this specific issue.
 * Stay tuned and keep an eye out for this one.
 *  [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * (@jtsternberg)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/errors-on-wordpress-com-with-newest-version/#post-11409629)
 * Hello, CMB2 author here. This is because the field registration arrays are not
   being correctly handled here: [https://plugins.trac.wordpress.org/browser/constant-contact-forms/trunk/includes/class-shortcode-admin.php#L90](https://plugins.trac.wordpress.org/browser/constant-contact-forms/trunk/includes/class-shortcode-admin.php#L90)
 * Basically, it’s adding a new “field” with an id of “before” and the field array
   is a string, “<p>No forms available…”, so it’s breaking. It looks like this was
   probably neglected in a refactor or something.
 * It looks like it should be something more like this:
 *     ```
       if ( empty( $forms ) ) {
       	$args = [
       		[
       			'name'   => '',
       			'type'   => 'title',
       			'id'     => 'oops-no-forms',
       			'before' => sprintf(
       				// translators: placeholder will store url for forms list page.
       				__( '<p>No forms available. Visit your <a href="%s">forms list</a> to create one.</p>', 'constant-contact-forms' ),
       					esc_url( admin_url( 'edit.php?post_type=ctct_forms' ) )
       			),
       		]
       	];
       }
       ```
   
 *  Plugin Author [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * (@constantcontact)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/errors-on-wordpress-com-with-newest-version/#post-11409852)
 * The spot and messaging has been adjusted in version 1.5.1
 * Thanks.

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

The topic ‘Errors on WordPress.com with newest version’ is closed to new replies.

 * ![](https://ps.w.org/constant-contact-forms/assets/icon-256x256.png?rev=2951825)
 * [Constant Contact Forms](https://wordpress.org/plugins/constant-contact-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/constant-contact-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/constant-contact-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/constant-contact-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/constant-contact-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/constant-contact-forms/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/errors-on-wordpress-com-with-newest-version/#post-11409852)
 * Status: resolved