[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.
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.
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:
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.
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...
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.
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
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!