Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template for Collection Taxonomy Details is not being used #9418

Closed
django-wong opened this issue Jan 30, 2024 · 1 comment · Fixed by #9421
Closed

Template for Collection Taxonomy Details is not being used #9418

django-wong opened this issue Jan 30, 2024 · 1 comment · Fixed by #9421

Comments

@django-wong
Copy link

Bug description

Background:
I have a tags taxonomy assigned to a collection news.

According to the document, when accessing /news/tags, the template resources/views/news/tags/index should be used.

image

But in my observation, it keeps resolving to resources/views/tags/index instead.

If I remove template and term_template from tags.yml, everything works as expected. However, these two configurations will revert to tags.index and tags.show after editing the configuration from Control Panel.

How to reproduce

  1. Create collection news
  2. Create taxonomy tags
  3. Assign tags to collection news
  4. Create 4 templates
  • news/tags/index.antlers.html
  • news/tags/show.antlers.html
  • tags/index.antlers.html
  • tags/show.antlers.html
  1. Visit /news/tags and /tags you will notice they are using the same template tags/index
  2. Remove template and term_template from tags.yml
  3. Visit the URLs, and you will notice they are using different templates as per the document.
  4. Edit Tags from the Control Panel
  5. template and term_template in tags.yml will revert to initial values.
  6. You can repeat step 5

Logs

No response

Environment

Environment
Application Name: XXX
Laravel Version: 10.41.0
PHP Version: 8.3.1
Composer Version: 2.6.6
Environment: local
Debug Mode: ENABLED
URL: local.myawesomeapp.com
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: ses
Queue: database
Session: database

Livewire
Livewire: v3.3.5

Statamic
Addons: 0
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.46.0 PRO

Installation

Existing Laravel app

Antlers Parser

Runtime (default)

Additional details

No response

@ryanmitchell
Copy link
Contributor

I've opened a PR here that should hopefully fix this: #9421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants