Skip Navigation

[Waiting for user feedback] Fatal error when reusing migrated Views on Production

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.

This topic contains 1 reply, has 1 voice.

Last updated by Christopher Amirian 3 days, 13 hours ago.

Assisted by: Christopher Amirian.

Author
Posts
#2840297

Issue: Fatal error when reusing migrated Views on Production

What I’m trying to do
I am trying to reuse existing Toolset Views on the Blogs and Marketing Materials pages after migrating pages and views from dev2 → production.

Links where the issue can be seen

Live (Production):

hidden link

hidden link

hidden link

Development (dev2):

hidden link

hidden link

hidden link

Expected Result

I expected the Live pages to behave the same as:

hidden link

The View renders correctly on dev2.

Actual Result

On Live, when I try to use the existing Views, I get either:

An empty page, or

A fatal error

Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given
in /home/empower/public_html/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Integrations/Views.php:114

Stack trace:
#0 Views.php(114): array_merge(Array, NULL)
#1 Views.php(114): Toolset\DynamicSources\Integrations\Views->adjust_post_types_for_source_context_in_view('page', 10941)
#2 class-wp-hook.php(341): apply_filters()
#3 plugin.php(205): WP_Hook->apply_filters()
...

#2840428

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support.

That stack trace points to Toolset Blocks → Dynamic Sources → Views integration failing because it’s getting null where it expects a list of post types (often happens after migration when a View/CT reference is missing or a View is in trash).

This shows that the migration did not go well for some reason.

I suggest that you use a plugin such as All in one Migration or Duplicator to do the move to make sure all aspects are moved to the production.

Thanks.