Skip Navigation

Fatal error when activating Toolset Views after Toolset Forms

Resolved

Reported for: Toolset Forms 2.5.5

Resolved in: Views 3.1.2

Symptoms

If you happen to activate Toolset Views after Toolset Forms, or update Toolset Views, after updating Toolset Forms, a fatal error can happen and the Views plugin won’t be activated.

This is the PHP error in question:

PHP Fatal error: Cannot declare class ToolsetCommonEs\Library\WordPress\Rest, because the name is already in use in .../wp-views/vendor/toolset/common-es/php/Library/WordPress/Rest.php on line 5

 

In some cases, you might get the following PHP error:

( ! ) Fatal error: Uncaught Error: Class 'ToolsetCommonEs\Rest\Route\ARoute' not found in .../woocommerce-views-old/inc/Rest/Route/ShortcodeRender.php on line 11

This error happens in cases where you do one of the following:

  • You activate WooCommerce Views when Toolset Access and Toolset Toolset Forms Commerce are active, but no other Toolset Plugin are.
  • When you deactivate Toolset Forms after the first PHP error listed above happened.

Workaround

The current workaround is to activate first Toolset Views, and then Toolset Forms. This will help you avoid the fatal error.

If you need to update, deactivate all Toolset Plugins for a moment and update them one by one, then later re-activate them. Remember: activate Toolset Views before Toolset Forms.

The same issue happens with Toolset Blocks, so if you are using it you can follow the same steps.

Comments are closed