Skip Navigation

[Resolved] Latest Update to Forms 2.2 Produces Fatal Error

This thread is resolved. Here is a description of the problem and solution.

Problem:
Updating to Forms 2.2 produced the following PHP error:

[php]
Fatal error: Uncaught Error: Call to undefined function get_current_screen()

[php]

Solution:
This could occur in certain circumstances depending on the fields included in the form, and was fixed with a hotfix update to Forms 2.2.1

This support ticket is created 5 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by julieP 5 years, 12 months ago.

Assisted by: Nigel.

Author
Posts
#1156153

Latest round of updates to all my Toolset plugins (Types 3.2, Access 2.6, Forms 2.2, Views 2.7 & Maps 1.7) produces fatal error:-

Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/xxxxx/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/utility/condition/post_type/editor/is_block.php:67 Stack trace: #0 /home/xxxxx/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/utility/condition/post_type/editor/is_block.php(32): Toolset_Condition_Post_Type_Editor_Is_Block->get_post_type_by_current_screen() #1 /home/xxxxx/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php(157): Toolset_Condition_Post_Type_Editor_Is_Block->is_met() #2 /home/xxxxx/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php(121): WPToolset_Forms_Conditional->get_block_editor_form_selectors() #3 /home/xxxxx/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php(76) in /home/xxxxx/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/utility/condition/post_type/editor/is_block.php on line 67
#1156171

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Julie

We already have reports of this and it is being urgently addressed, we should have a fix out today.

It relates to the work preparing for Gutenberg and happens in certain conditions depending on what fields your form includes.

I'll escalate this and add it to the same internal ticket, will let you know when the fix is available.

#1156230

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

HI Julie

Types 3.2.1 was just released and fixes the issue, if you want to update and test again.

#1156862

Thanks for the update; not getting errors now.