Resolve "Warning: var_export does not handle circular references"

Created on 6 March 2025, 28 days ago

Problem/Motivation

We're seeing this error on some nodes:

Stack trace : 
Warning: var_export does not handle circular references in Drupal\patternkit\PatternFieldProcessorPluginManager->traverseSchema() (line 229 of /modules/contrib/patternkit/src/PatternFieldProcessorPluginManager.php)

This notice/warning/error occurs when the block data deviates from what the defined pattern schema allows. This is most likely caused by migrated patterns from D7 that do not align with the latest schemas for those patterns provided.

Proposed resolution

We were able to successfully resolve this issue by replacing the 2 var_export() instances with json_encode() here: https://git.drupalcode.org/project/patternkit/-/blob/9.1.0-beta8/src/Pat...

πŸ› Bug report
Status

Active

Version

9.1

Component

Module Core

Created by

πŸ‡ΊπŸ‡ΈUnited States firewaller

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024