Skip Navigation

[Resolved] Cannot edit or create Forms since update to Types 3.1.2

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

Problem:
A Forms update triggered the following error:

Fatal error: Call to undefined function get_current_screen() in /var/www/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/utility/condition/post_type/editor/is_block.php on line 67

Solution:
This issue was fixed with an update to Forms 3.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.

Our next available supporter will start replying to tickets in about 0.68 hours from now. Thank you for your understanding.

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)

This topic contains 11 replies, has 2 voices.

Last updated by bjoernH 5 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1154533
error_cred.PNG

I am trying to: Create or edit forms. The content field of the form shows nothing, although there are some fields added.

I expected to see: Before the update to 3.1.2, I was able to add and edit forms without any problem. Relationship forms cannot be added or edited, either.

Instead, I got:

#1154787

Nigel
Supporter

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

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

Hi there

You say updating to Types 3.1.2 broke this, does reverting to Types 3.1.1 fix it?

FYI there are imminent updates of most Toolset plugins, probably tomorrow, and you might find things working after update to Types 3.2 along with the other updates.

But in the meantime, can you check your browser console on those pages to see if there are any JS errors?

Also, check your PHP logs.

If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

That will create a file debug.log in your /wp-content/ directory which you can examine in any text editor. Try editing a form again and then inspect the log. If you don't find the debug.log file it means it didn't generate any warnings or errors.

One further step you might take is to try to see if there are any 3rd party conflicts.

Could you please try disabling the non-Toolset plugins and switching theme to twentyseventeen then trying again? If the issue disappears then it should be possible to determine the source of any conflict by a process of elimination.

Let me know how that goes so I can see how to proceed.

#1155459

Hi Nigel,
thanks for your help so far.
In my productive site, this still is a problem. I deactivated all of the plugins that are not absolutely necessary, but it still does not solve the problem.
In debug mode, I get the following error when opening the form editor:

Uncaught TypeError: CodeMirror.overlayMode is not a function
hidden link line 202

In my test page, I cannot duplicate the error. It is really strange...

#1155522

Nigel
Supporter

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

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

Are there any differences between your production site and your development site (plugin versions? active plugins? must-use plugins? PHP versions?)

#1156071

My issue is resolved now. Thank you!

#1156109

Sorry, I was a little hasty there.
After the update to 3.2, my frontend forms do not work anymore. I cannot edit or submit new items. In the backend, this works fine. I have de-activated all plugins that interfered with Toolset. What could be the problem here? This is a serios error for my application.

#1156130

Nigel
Supporter

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

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

Can you check your PHP logs for errors?

I have some other reports of a fatal error, call to undefined function get_current_screen(), and would like to know if it is the same issue.

#1156134

Nigel, this is the error I am getting:

Notice: Undefined index: post_reference_type in /var/www/html/wp-content/plugins/cred-frontend-editor/application/models/form/relationship.php on line 415

Fatal error: Call to undefined function get_current_screen() in /var/www/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/utility/condition/post_type/editor/is_block.php on line 67

#1156150

Nigel
Supporter

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

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

OK, that's the same error.

Let me escalate this and add to the same internal ticket.

I'll update you when I have news. As we have multiple reports this will receive prompt attention.

#1156197

Hi Nigel,

I have rolled back to the previous versions of Toolset and can confirm that everything works fine now. I will follow your recommendation when to start the update process again. Thanks for your quick feedback, that was very helpful!

#1156270

Nigel
Supporter

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

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

Hi Bjoern

We released an update to Types 3.2.1 which fixes the issue in Forms, if you want to go ahead an update again and retry.

#1158776

Thank you, NIgel!