Skip Navigation

[Resolved] Fatal error: Uncaught Error: Argument 1 passed

This support ticket is created 4 years, 1 month 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
- 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/Karachi (GMT+05:00)

Author
Posts
#1871049
Elementor image issue 2.png

I am trying to:
Load the preview of the page and make changes to the elements. It all looks good in the editor but when I preview, the system throws a fatal error and now the page content doesn't load and only the header and footer appear (overlapped on to one another.
Every preview throws the same error:
Fatal error: Uncaught Error: Argument 1 passed to OTGS\Toolset\Access\Controllers\Filters\ErrorPreview::filter_posts_results() must be of the type array, null given, called in /wordpress/core/5.6/wp-includes/class-wp-hook.php on line 287
in /srv/htdocs/wp-content/plugins/types-access/application/controllers/filters/post_preview.php on line 113

Call stack:

OTGS\T\A\C\F\ErrorPreview::filter_posts_results()
wp-includes/class-wp-hook.php:287
WP_Hook::apply_filters()
wp-includes/plugin.php:255
apply_filters_ref_array()
wp-includes/class-wp-query.php:3045
WP_Query::get_posts()
wp-includes/class-wp-query.php:3448
WP_Query::query()
wp-includes/class-wp.php:624
WP::query_posts()
wp-includes/class-wp.php:747
WP::main()
wp-includes/functions.php:1291
wp()
wp-blog-header.php:16
require()
index.php:17

Link to a page where the issue can be seen:
hidden link
Or
hidden link

I expected to see: a functioning page

Instead, I got:
No data except for header and footer on the page and above mentioned error on preview page.

#1872699

Hi,

When I checked your website, the Access plugin was deactivated, however, we've recently received another report about this same error for the preview screen.

After doing some tests on a couple of different server environments, our initial findings are that the issue seems to be a conflict with the WordPress preview screen and the Access plugin, only for websites hosted at WordPress.com.

These findings have been shared with the concerned team already and I'll keep you updated with the progress, through this ticket.

regards,
Waqar

#1872755

Thank You Waqar for the update.

#1875363

I'm happy to update you that this will be fixed in the upcoming 2.8.10 release of Toolset Access.

Meanwhile, you can also use the updated "post_preview.php" file from the following link to replace the one on your website in the folder: /types-access/application/controllers/filters
hidden link

#1876131

Thanks, Waqar!

#2025937

Hi,

Just wanted to confirm that a fix for this issue was covered in Toolset Access 2.8.10.

You're welcome to update and let us know, in case you still experience something out of place.

regards,
Waqar