OOM issue when debugging is enabled

Created on 27 May 2024, 6 months ago
Updated 20 June 2024, 5 months ago

Problem/Motivation

When I enable label_help_debug in settings.php, I get an out of memory error.

Steps to reproduce

  1. Install demo_umami.
  2. Enable label_help_debug in settings.php:
    $settings['label_help_debug'] = TRUE;
    
  3. Visit an edit form for the Article node type with a few fields on it.

Proposed resolution

Replace var_export() with dump() which has added protection from memory issues and recursion, and has an improved UI.

Add a separate setting to enable full Form API $element dumps, which can cause normal page rendering issues due to the dump being called early in a hook_form_alter() function before any other response output is sent.

Add the following setting to your settings.php to enable dumps.

$settings['label_help_debug_dump'] = TRUE;

This debug mode leverages the Symfony Variable Dumper `dump()` to provide a drillable screen dump of the Form API element array. However, because this dump runs inside the form_alter, it can result in incomplete page load. This is expected.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

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