Problem/Motivation

\Drupal\calendar_view\Plugin\views\style\CalendarViewBase::processResult contains a workaround for recurring smart date fields but that breaks the result if we use a smart data which is not recurring.

Proposed resolution

A first step is to check if the field definition allows recurring. As mine doesn't, this already resolves my issue. But I can imagine that others may have smart date fields that allow recurring but an instance may not use it. As I don't have such a use case, I don't know how to handle that. At least for the first step, I'll provide an MR.

Command icon 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

jurgenhaas created an issue. See original summary.

jurgenhaas’s picture

Status: Active » Needs review

matthieuscarset’s picture

Thank you for reporting the issue and please forgive the inconvenience.

After a second read and more research into how \Drupal\views\Plugin\views\field\EntityFIeld::getValue() works, I realized the processResult() method can be even simpler.

I've fixed the situation in this commit on 2.0.x.

Would you be able to review and confirm the results are now processed without any exceptions?

Looking forward to reading you.

jurgenhaas’s picture

Status: Needs review » Reviewed & tested by the community

This works great, thanks for the very quick fix on that. I saw the processResult with nested foreach loops before too but haven't looked deeper then. Glad you addressed this here too, so that we get an even better performance.

matthieuscarset’s picture

Status: Reviewed & tested by the community » Fixed

Thanks a lot for testing and confirming the fix.

Will be shipped on next release soon.

Marking this issue as fixed for now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.