Problem/Motivation

The Search result content template for podcast episodes (node.podcast_episode.search_result) shows a Taxonomy chip bound to field_tags delta 0. That field is optional, and none of the default podcast episodes has a tag, so every episode in the search results prints the error instead of the chip and logs:

LogicException occurred during rendering of component 1db7ad2e-8d3f-4bd5-972e-42a72664e77d in Content template Podcast episode content items — Search result view (node.podcast_episode.search_result): Requested delta 0 for unlimited cardinality field, but only deltas [0, -1] exist.

Steps to reproduce

  1. Install Varbase 11 with The Rightup 1.0.x-dev.
  2. Go to /search and search for "part-time" (or "studio", "episode").
  3. The episode result shows the error text, and the log has the LogicException.

Proposed resolution

Bind the chip to the episode's podcast instead: field_podcast delta 0, the podcast's title. field_podcast is required and single-valued, so the chip always has a value and names the show. The template dependencies follow: tags field, Tags vocabulary and the taxonomy module out; field_podcast and the Podcast content type in, matching what Drupal calculates.

Tested on a fresh Varbase 11 + The Rightup 1.0.x site: searching "part-time", "studio" and "episode" now gives no LogicException in the page or the log (before: 2, 4 and 2 in the page, 5 in the log). The chip reads "SMALL PRACTICE" for "The Part-Time Studio", and config validation of the template reports 0 violations.

Possible follow-up, not part of this fix: nine news templates bind field_news_categories at delta 0, and that field is not required. Every default news item has a category, so nothing fails today, but a news item saved without one would hit the same exception.

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

User interface changes

  • The podcast episode search result chip shows the podcast name instead of a tag.

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A

Issue fork rightup-3631049

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’s picture

Status: Active » Needs review
rajab natshah’s picture

The Rightup search for part-time at 1440 wide: before with the old episode search result template, after with the template from !84, where the chip reads the podcast name.

Before

Before

After

After

  • rajab natshah committed c2b6881e on 1.0.x
    fix: #3631049 Bind the podcast episode search result chip to the podcast...
rajab natshah’s picture

Status: Needs review » Fixed
Issue tags: +rightup-1.0.6

✅ Released rightup-1.0.6

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.