Problem/Motivation

On a node edit form with a paragraph having a date field with empty value, i got this error when i trigger an ajax callback on another field :
<br/><b>Warning</b>: DateTime::createFromFormat() expects parameter 2 to be string, array given in <b>/var/www/html/web/core/lib/Drupal/Component/Datetime/DateTimePlus.php</b> on line <b>251</b><br/>

Comments

fwust created an issue. See original summary.

fwust’s picture

Creating a temporary patch in order to avoid warning

cilefen’s picture

Status: Active » Postponed (maintainer needs more info)

Drupal 8 is unsupported.

fwust’s picture

Version: 8.9.x-dev » 9.5.x-dev
bvoynick’s picture

I believe the root cause here is already ticketed in #3052608

There's a patch in that ticket that resolved a similar issue with this error message for me. The patch still needs tests for consideration for merge to core.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bvoynick’s picture

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Issue tags: +Bug Smash Initiative

Seems #5 pointed out this is a duplicate so going to close out for now.

manthan.chauhan’s picture

I have reroll patch for version 10.2.2

manthan.chauhan’s picture

Updated patch