Skip to content
New issue

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

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

Already on GitHub? # to your account

Taxonomy URLs aren't localizable #4281

Closed
jasonvarga opened this issue Sep 17, 2021 · 1 comment
Closed

Taxonomy URLs aren't localizable #4281

jasonvarga opened this issue Sep 17, 2021 · 1 comment

Comments

@jasonvarga
Copy link
Member

Bug Description

Taxonomies always use the "current" site when building their URLs.

Also, it always uses the handle in the URL which may not be appropriate for all locales.

public function uri()
{
$site = Site::current();
$prefix = $this->collection() ? $this->collection()->uri($site->handle()) : '/';
return URL::tidy($prefix.str_replace('_', '-', '/'.$this->handle));
}

Extra Detail

Solution to this may also be the solution to #2403

Ref #2841 (comment)

Environment

Statamic 3.2.x-dev Pro
Laravel 8.61.0
PHP 8.0.8
No addons installed

@jasonvarga
Copy link
Member Author

#2334 basically

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

No branches or pull requests

1 participant