Skip Navigation

[Resolved] Cannot Import views

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

Problem:

There is an issue where the following fatal error is encountered when importing Toolset Types settings on the Toolset -> Import / Export page:

Call to undefined function get_current_screen

Solution:

This issue has been fixed in the Types version 3.3.4

Relevant Documentation:

This support ticket is created 4 years, 8 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Sammut 4 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1306201

Hi!

I loaded up one of the sample sites (magazine site) on to my dev server. I then created an export of the views to load into another site. However, the import will not complete and I am receiving the following error. As a side note both sites are running the same versions of wp, plugins, etc. I switched the URL name to unlink any links.

Howdy!

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, Toolset Types.

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

hidden link

To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

Error Details
=============
An error of type E_ERROR was caused in line 141 of the file /home/charlo2269/public_html/wp-content/plugins/types/application/controllers/compatibility/Gutenberg.php. Error message: Uncaught Error: Call to undefined function get_current_screen() in /home/charlo2269/public_html/wp-content/plugins/types/application/controllers/compatibility/Gutenberg.php:141
Stack trace:
#0 /home/charlo2269/public_html/wp-content/plugins/types/application/controllers/compatibility/Gutenberg.php(73): OTGS\Toolset\Types\Controller\Compatibility\Gutenberg->is_active_for_current_post_type()
#1 /home/charlo2269/public_html/wp-includes/class-wp-hook.php(286): OTGS\Toolset\Types\Controller\Compatibility\Gutenberg->OTGS\Toolset\Types\Controller\Compatibility\{closure}(2873, Object(WP_Post), false)
#2 /home/charlo2269/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#3 /home/charlo2269/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#4 /home/charlo2269/public_html/wp-includes/post.php(3951): do_action('save_post', 2873, Object(WP_Post), false)
#5 /home/charlo2269/public_html/wp-content/plugins/wp-views/embedded/inc/wpv-import-export-embedded.php(902): wp_insert_post(Array, tr

#1306225

Hello,

It is a known issue, see our errata:
https://toolset.com/errata/fatal-error-when-importing-toolset-types-settings/

Yes, this issue will be fixed in the upcoming Types version 3.3.4, it is in QA status, but I am not sure when will it be released, it should be very soon.

#1306567

Types 3.3.4 has been released, you can download it here:
https://toolset.com/account/downloads/
please test it and feedback if the problem is fixed, thanks

#1309945

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.