Problem/Motivation

Steps to reproduce

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

Proposed resolution

Remaining tasks

API changes

Data model changes

Command icon Show commands

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

vladimiraus created an issue. See original summary.

vladimiraus’s picture

Issue summary: View changes
apmsooner’s picture

Thanks for the info. Ill find the issue and make a patch tonight or in the morning.

apmsooner’s picture

Version: 4.0.0 » 4.0.x-dev
Status: Active » Needs review

Here'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.

mrconnerton’s picture

Can confirm

  • A page with a view is now loading when it wasn't before
  • Editing the view and a custom field date works when it wasn't before
  • When I save a date filter as an exposed filter and apply, the ajax is breaking, but I can't rule out that isn't something hinky on my own site causing it.
apmsooner’s picture

Thanks, 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.

apmsooner’s picture

There 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.

apmsooner’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

apmsooner’s picture

Status: Fixed » Closed (fixed)