Closed (fixed)
Project:
Custom Field
Version:
4.0.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2026 at 07:20 UTC
Updated:
18 Jun 2026 at 14:50 UTC
Jump to comment: Most recent
Having numeric column names leads to the following fatal error:
TypeError: Drupal\custom_field\Plugin\Field\FieldFormatter\BaseFormatter::prepareFormattedSubfieldValue(): Argument #3 ($name) must be of type string, int given, called in /var/www/html/web/modules/contrib/custom_field/src/Plugin/Field/FieldFormatter/BaseFormatter.php on line 557 in Drupal\custom_field\Plugin\Field\FieldFormatter\BaseFormatter::prepareFormattedSubfieldValue()
Create a custom field with numeric column names
Handle this case better
Write fix
Write test
Review
None
None
None
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
lendudePushed a fix and test for this.
Cursor was used to help create the fix and test.
Comment #5
apmsooner commentedThank you for the patch!