- Status changed to Fixed
almost 2 years ago 10:06am 20 January 2023 - Status changed to Needs work
almost 2 years ago 8:29pm 22 January 2023 - 🇳🇱Netherlands johnv
Hmm, I can reproduce it using the WebformOfficeHours element.
Test:
- enable Webform + WebForm UI
- create a Webform with an Office Hours element
- create a submission
- check the submission via admin/structure/webform/manage/TYPE/results/submissions - 🇳🇱Netherlands johnv
Above patch fixes the problem when displaying a Webform Submission with WebFormOfficeHours.
It is rather big - working on other issues as well.Main change is this, adding a parent:
- protected function unserialize(array $office_hours, array $element) { + protected function unserialize(array $office_hours, array $element, WebformSubmissionInterface $webform_submission) { - /** @var \Drupal\Core\Field\FieldItemListInterface $items */ - $items = \Drupal::typedDataManager() - ->create($this->getFieldDefinition($element)); - ... + /** @var \Drupal\Core\Field\FieldItemListInterface $items */ + $items = \Drupal::typedDataManager() + ->create($this->getFieldDefinition(), + $values, + $element['#webform_key'], + $webform_submission->getTypedData() + ); + $items->filterEmptyItems(); return $items; }
- 🇳🇱Netherlands johnv
@original posters,
please share debug_backtrace(), so I can better check the root cause of your problem (or report back when the above change has successfully removed the error.) - Status changed to Postponed: needs info
almost 2 years ago 4:46pm 24 January 2023 - Status changed to Fixed
about 1 year ago 8:25am 2 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.