Closed (fixed)
Project:
Custom Field
Version:
4.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2025 at 01:55 UTC
Updated:
17 Nov 2025 at 07:20 UTC
Jump to comment: Most recent
Update to version 4.0.0 from 3.1:
The following error is displayed on views with fields:
Error: Only arrays and Traversables can be unpacked in Drupal\custom_field\Element\DatetimeBase::valueCallback() (line 51 of l/web/modules/contrib/custom_field/src/Element/DatetimeBase.php).
Editing view is not working either.
Status report page /admin/reports/status also generates an error:
ArgumentCountError: Too few arguments to function Drupal\custom_field\Plugin\CustomFieldWidgetManager::__construct(), 3 passed in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 4 expected in Drupal\custom_field\Plugin\CustomFieldWidgetManager->__construct() (line 32 of /web/modules/contrib/custom_field/src/Plugin/CustomFieldWidgetManager.php).
Revering back to 3.1.16 fixes the crashes.
Tested on Drupal 11.2.5
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
vladimirausComment #3
apmsooner commentedThanks for the info. Ill find the issue and make a patch tonight or in the morning.
Comment #5
apmsooner commentedHere's the patch to fix the issue. You may need to clear cache but it should work now just fine. Please update the ticket accordingly if this fixes it for you.
Comment #6
mrconnerton commentedCan confirm
Comment #7
apmsooner commentedThanks, im not seeing any additional ajax issues but let me know if there’s more to the configuration I should test or any custom field related errors in the logs.
Comment #8
apmsooner commentedThere is a validation error for the new datetime advanced formatter that ill fix and push up to this later but probably unrelated to the issues you’re having.
Comment #9
apmsooner commentedComment #11
apmsooner commented