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()
...
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.