Minneapolis area
Account created on 3 August 2015, over 9 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States pamelalies Minneapolis area

I'm getting this same error on a site running Drupal 10.1.8. We can't update to a later D10 release (yet) because we have a custom module the later versions don't run on.

πŸ‡ΊπŸ‡ΈUnited States pamelalies Minneapolis area

Hello - just wanted to report that I solved this issue, in case anyone has the same issue and comes across this page. This is the way I finally got it to work (I was able to get past my memory issue and print out the field array on my local):

$field_key = "field_creation_ymd_date";
$date_obj = strtotime($date_day);
// Check if the converted time is good, if it's false then we'll just leave the value alone, if true then update the field.
if ($date_obj !== false) {
// Obtained a valid $timestamp; $format is valid, now put it in the fields
$form[$field_key]["widget"][0]["ymd_date"]["year"]["#value"] = date('Y',$date_obj);
$form[$field_key]["widget"][0]["ymd_date"]["month"]["#value"] = date('m',$date_obj);
$form[$field_key]["widget"][0]["ymd_date"]["day"]["#value"] = date('d',$date_obj);
}

πŸ‡ΊπŸ‡ΈUnited States pamelalies Minneapolis area
πŸ‡ΊπŸ‡ΈUnited States pamelalies Minneapolis area
πŸ‡ΊπŸ‡ΈUnited States pamelalies Minneapolis area
πŸ‡ΊπŸ‡ΈUnited States pamelalies Minneapolis area
πŸ‡ΊπŸ‡ΈUnited States pamelalies Minneapolis area

pamelalies β†’ created an issue.

πŸ‡ΊπŸ‡ΈUnited States pamelalies Minneapolis area

This patch caused my site to throw: Warning: Array to string conversion in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 315 of core/lib/Drupal/Core/Entity/EntityStorageBase.php). Just posting this patch to undo it.

Production build 0.71.5 2024