Calendar module ignores field style settings because it bypasses ViewsRow plugin theme

Created on 24 July 2025, 5 days ago

Problem/Motivation

In Drupal 10, the Calendar Views style and row plugins bypass views_view_fields, rendering every event field directly. The default plugin theme views_view_row_calendar isn’t implemented, so custom field templates never apply—and early population of #rendered_fields makes overrides difficult.

This how it was done in D7: https://git.drupalcode.org/project/calendar/-/blob/7.x-3.x/includes/cale...

Steps to reproduce

  1. Create a Calendar view display with event fields in Drupal 10+ and add wrapper or field styles on the fields in the Views UI.
  2. Inspect the rendered output—observe that all fields are output without rendering the field styles through views-view-fields.html.twig templates.
  3. Check the render array in the Views style plugin; note #theme points to views_view_row_calendar with no corresponding template or hook_theme registration.

Proposed resolution

  1. Override the Views Row Plugin’s $usesFields to TRUE.
  2. Change themeFunctions() in the row plugin to return ['views_view_fields'] instead of views_view_row_calendar.
  3. Ensure we call the ViewsRow plugin's ::themeFunctions() through to the template to render the template.
  4. Try not to break BC in the templates (EEK)
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada joelpittet Vancouver

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024