Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
[SRM-1237] Updated card enhancer to correctly access the date string …
Browse files Browse the repository at this point in the history
…value and pass it to the date converter. (#220)
  • Loading branch information
MdNadimHossain authored Jan 25, 2024
1 parent edba7d6 commit 5d839ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Plugin/jsonapi/FieldEnhancer/CardLinkEnhancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public function getCardFields(EntityInterface $node) {
}
// Add the date field for publication.
if ($node->hasField('field_publication_date') && !$node->field_publication_date->isEmpty()) {
$card_fields['date'] = TideLandingPageHelper::localDateAndTimeFormatter($node->get('field_publication_date')->getValue()[0]);
$card_fields['date'] = TideLandingPageHelper::localDateAndTimeFormatter($node->get('field_publication_date')->getValue()[0]['value']);
}
}
if ($module_handler->moduleExists('tide_profile')) {
Expand Down

0 comments on commit 5d839ca

Please sign in to comment.