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

Fix locales tag not outputting collection specific term urls #6466

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Aug 8, 2022

Fixes #6418
Fixes #3833
Replaces #4047

Since it's looking likely that there will be a taxonomy overhaul, I figured it's better to just apply a quick workaround into the locales tag, rather than a "proper" fix that'll end up affecting way too many parts of the codebase, and eventually may have not even be needed if taxonomies are changing. That's why #4047 was sitting there for so long - it was too big of a change. Plus I was tired of seeing it sit there.

This PR will make the locales tag compare the ID to the "page" ID. If it's the same term, it'll just use the term object, which will be associated with the collection already and therefore output the collection specific URL.

The downside to this is that if you're using a taxonomy:foo tag pair, with a locales tag inside it, while on a collection specific taxonomy term url... if the page's term is in that loop, it'll output the collection specific url. Super edge case. In that case though, you can add collection_term_workaround="false" to the locales tag. Dumb, but hey.

@jasonvarga jasonvarga mentioned this pull request Aug 8, 2022
3 tasks
@jasonvarga jasonvarga merged commit 4097142 into 3.3 Aug 8, 2022
@jasonvarga jasonvarga deleted the fix/locales-tag-collection-term-url branch August 8, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant