fix: remove orphaned taxonomy template extending deleted category view#436
Merged
Conversation
taxonomy.blade.php extended a 'category' view that no longer exists in this theme; category/tag/taxonomy archives were consolidated into archive.blade.php and its Archive view composer. Any taxonomy archive request rendered taxonomy.blade.php, failed to resolve the missing view, and threw 'InvalidArgumentException: View [category] not found', producing an error page. Deleting taxonomy.blade.php lets taxonomy requests fall through the Sage template hierarchy to archive.blade.php, whose Archive composer already handles is_tax()/is_category()/is_tag() and supplies the required data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
taxonomy.blade.phpcontains only@extends('category'), butcategory.blade.phpno longer exists in this theme — it was removed when category/tag/taxonomy archives were consolidated intoarchive.blade.php(and itsArchiveview composer). Any custom-taxonomy archive request renderstaxonomy.blade.php, Blade fails to resolve the missingcategoryview, and it throwsInvalidArgumentException: View [category] not found— an uncaught exception that produces an error page.This is the same bug fixed in medihealth (generoi/medihealth#42), found by sweeping GDS-theme repos for the same signature.
Fix
Delete
taxonomy.blade.php. Taxonomy requests then fall through the Sage template hierarchy toarchive.blade.php, whoseArchivecomposer (app/View/Composers/Archive.php) already handlesis_tax() || is_category() || is_tag()and supplies the required$content/querydata.Note: repointing to
@extends('archive')is not used because theArchivecomposer binds to thearchive/homeview names; letting the request resolve to thearchiveview directly ensures the composer runs.Verification
category.blade.phpis absent andarchive.blade.php+ theArchivecomposer (handlingis_tax/is_category/is_tag) are present in this repo.🤖 Generated with Claude Code