Closed vonsch76 closed 1 year ago
Surprising, I don't think we have anything special where this character would be a problem.
@spleen1981 please could you take a look at this?
Both terms and posts slugs are sanitized before saving with sanitize_title
, which allows dashes (and it works based on my test).
Also, uniqueness of candidate slug is tested per language, but a suffix should be automatically added in that case if test fails.
Is your slug unique per language?
I also thought weird, still here is the example.
while without the dash
something is wrong with attached images
something is wrong with attached images
originally sent from email, edited here
I'm confused, "our-services" slug (which is not a category slug but categories base slug) is working or not? It looks like is working and online.
Our services - that is a slug from a category - does not work when it has the dash in it..When changed just to services it works fine. It does not translate into the equivalent with the dash, while translates without.
On Sun, 2 Apr 2023 at 17:54, Giovanni Cascione @.***> wrote:
I'm confused, "our-services" slug (which is not a category slug but categories base slug) is working or not? It looks like is working and online.
— Reply to this email directly, view it on GitHub https://github.com/qtranslate/qtranslate-xt/issues/1306#issuecomment-1493377927, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXKJAKLPS6GBPIQHNG6YK3W7GOLFANCNFSM6AAAAAAWPTDWZQ . You are receiving this because you authored the thread.Message ID: @.***>
What is currently https://hajoznijo.hu/hu/our-services/, which I can see it's working? A separate page?
What happens if instead of our-services
you use test-services
as the category slug?
by surprise test-services also seem to work fine. Seems that I have the conflict elsewhere.
No surprise, as said above, slug uniqueness is tested before saving, and you already seem to have a page with that slug.
Category slug will also be used for items archive page, so it would be in conflict with existing page.
To use that slug for the category, you should remove the existing page, set the slug for the category and use the resulting archive page to do the same job of current our-services
page, maybe using templates to have the same result.
I think we can close here anyways.
@herrvigg seems that the slugs translation does not work when the category (maybe other as well) has a dash (-) character. So when I had "our-services" then no translation when changed to "services", then the translation went fine. The other slug translations with the dash just work fine.