Problem/Motivation
We are using the latest 9.x version and facing the below mentioned error.
Steps to reproduce
Proposed resolution
Fixed via the patch file
Remaining tasks
User interface changes
API changes
Data model changes
InvalidArgumentException: $string ("") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct() (line 132 of core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php).
Drupal\date_range_formatter\Plugin\Field\FieldFormatter\DateRangeFormatterRangeFormatter->t() (Line: 98)
Drupal\date_range_formatter\Plugin\Field\FieldFormatter\DateRangeFormatterRangeFormatter->viewElements() (Line: 91)
Drupal\Core\Field\FormatterBase->view() (Line: 275)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple() (Line: 233)
Drupal\Core\Entity\Entity\EntityViewDisplay->build() (Line: 307)
Drupal\field_formatter\Plugin\Field\FieldFormatter\FieldWrapperBase->getFieldOutput() (Line: 194)
Drupal\ui_patterns_field_formatters\Plugin\Field\FieldFormatter\PatternOneForAllFormatter->viewElements() (Line: 36)
Drupal\pam_fields\Plugin\Field\FieldFormatter\PamFieldsPatternOneForAllFormatter->viewElements() (Line: 91)
| Comment | File | Size | Author |
|---|---|---|---|
| date_range_formatter_daterange_issue.patch | 1.34 KB | rahul_ |
Issue fork date_range_formatter-3581156
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
Comment #2
yusuf_khan commentedComment #3
gauravkr.mishra90@gmail.com commentedit worked for me
Comment #4
pameeela commentedThis is a duplicate of #3309324: Passing empty value to t() when same day + time for start and end date