Problem/Motivation

Once a site has a second language with translated podcasts and episodes, two views multiply their rows by the number of translations.

  • The "More episodes of this podcast" block (podcast_episodes, display more_by_podcast) repeated the same episode on an episode page, because each of its two relationships (the show, and the show's other episodes) joins every translation of the related node. Only the base table has a language filter.
  • The podcast cards (podcasts view, the Episodes count) counted each episode once per translation: 19 episodes showed as 76, 10 as 40.

A single-language site is unaffected.

Steps to reproduce

  1. Install a second language and translate the shows and episodes.
  2. Open an episode page and read the More episodes block: the same episode appears more than once. Open the podcasts listing and read the episode count of each show.

Proposed resolution

  • podcast_episodes, display more_by_podcast: override the filters with the default ones plus a language filter (interface language, und, zxx) on each of the two relationships, and make the query distinct.
  • podcasts: aggregate the Episodes count as Count DISTINCT instead of Count.

Checked on a fresh build with an Arabic translation, in English and Arabic: the block shows three different episodes, and the counts read 19, 10 and 8.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ❌ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ❌ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release varbase-11.0.x, varbase_podcasts_base-1.0.1

User interface changes

  • On a multilingual site the More episodes block lists different episodes and the podcast cards show the real episode counts.

API changes

  • N/A

Data model changes

  • Two filters and a distinct query on one display, one aggregation type on one field.

Release notes snippet

  • The podcast views no longer repeat episodes or inflate episode counts on multilingual sites.

AI-Generated: Yes. Drafted and tested with Claude Code, reviewed by the contributor.

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

rajab natshah created an issue. See original summary.

  • rajab natshah committed ff01bd8d on 1.0.x
    fix: #3628164 Podcast views repeat episodes and inflate counts on...

  • rajab natshah committed e27f3513 on 2.0.x
    fix: #3628164 Podcast views repeat episodes and inflate counts on...
rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.