Postponed (maintainer needs more info)
Project:
Redirect
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2017 at 15:08 UTC
Updated:
28 Feb 2018 at 11:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rutiolmaInitial patch. Tests needed.
Comment #3
rutiolmaComment #5
rutiolmaNew patch with bug fixes.
Comment #6
dev.patrick commentedComment #8
berdirThis functionality will eventually move into core and I think it is very unlikely that it would be added there.
It doesn't really make sense, just because your content is language neutral doesn't mean that the site itself is, that still needs to have a language and be translated.
Any link that is generated by Drupal would still have a prefix, not having that is simply not correct.
Comment #9
rutiolma@Berdir can you clarify the reason why a link should always have a prefix?
In my specific case, this is a critical issue because there should be a language neutral page (not necessarily a language selection page but behaving like it) and we can't show any sign of default or preferential language.
So for a specific neutral language content type, it should be possible to access it directly without a language prefix.
Do you see an acceptable way to do this?
Comment #10
berdirI see.
I think it is wrong because you have a set of language negotations rules, by not having a language prefix in the URL, all you do is fall back to the next, which might be browser language then it's going to an arbitrary language, or it will be the default language.
What redirect does support is route-based exclusions, you could have a custom route that serves your node/content and add the flag there to skip all of this. If you have a custom request subscriber that runs before redirect.module you could even add that at runtime to the normal node route and one specific node id, or being on the frontpage.
Comment #11
rutiolmaThanks for the input.
I've created a module to create a route override, with a "_disable_route_normalizer" property, for language neutral content types. Tests still missing https://www.drupal.org/project/disable_route_normalizer