Hi,
I was wondering, glancing at the code, why Translation Redirect doesn't work for logged in users?
Well... I can see in the code why it doesn't work, but what is the reasoning behind this?
Is it so content administrators could edit content in foreign language while their website stays in their own language?
I kind of like to have this feature globally on the website for all users, and removing the check for user ID doesn't seem to break anything else.
Can this perhaps be made an option?
Sven
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | i18n_redirect-bypass-translation-redirection-1196784-9.patch | 1.08 KB | GDrupal |
Comments
Comment #1
jose reyero commentedBecause it is a SEO module and search engine crawlers are anonymous users.
Not checking for uid does break the users' ability to visit that links (they may intend to).
Comment #2
no2e commentedBut SEO is not only about crawlers …
for example, a logged in user could copy&paste a URL and link to it from some external page. Now this "undesirable" URL stays there. And that can lead to several other problems (like some users using that URL for social bookmarking, etc.).
A configuration option for it would be great: "enable/disable redirection for logged in users" (maybe for specific roles only)
Alternative, for those who land here:
Using "Global Redirect" with activated "Language Path Checking" seems to do the job (at the moment the dev version only, because the release 7.x-1.3 breaks in combination with i18n)
Comment #3
kristen polI agree that it would be nice to make this configurable and I could create a patch if desired. It does make sense to me to have it redirect for logged-in users as well in case they are using an outdated URL (e.g. link from another site or from an old email, etc.) and there is a translation available that wasn't previously there. Or, a new language has been added, so any old links they are referencing will be redirected.
@Jose Reyero - let me know if you'd like me to make a patch or feel free to mark back as "closed (won't fix)" if you still think that is the best approach.
Thanks,
Kristen
Comment #4
webflo commented@Kristen Pol: Please submit a patch i will review.
Comment #5
webflo commentedComment #6
kristen polOk, I will try to do that in a couple weeks. I'm finishing up a book on Drupal 7 i18n right now and in crunch mode!
Kristen
Comment #7
jose reyero commentedWell, it seems patch not coming :-)
Anyway, we don't really want more options in i18n, and there are other modules to trick links to whatever behavior you may want.
Comment #8
kristen polAh, yes... this slipped under the rug... but, since you don't want the patch, that is where it will stay!
:)Kristen
Comment #9
GDrupal commentedProviding a patch that creates a new permission 'bypass translation redirection' that you can use by role to control translation redirection.
Comment #10
jose reyero commentedThanks for the patch but:
It doesn't properly update the module description, permission name is hard to understand, etc.. it doesn't even fit the module's stated purpose ... But on top of that, really, we don't want to change current default behavior for 50K users who then would come back here asking WTF.. nor making the module options still more complex.
Anyway I don't want to encourage you to improve the patch, I don't really think the feature has a place here.
Again, this is a SEO module that does what it does, and part of it is rewriting incoming links when users have shared one with mixed interface/language description. No complexity, no weird permissions, it just works as advertised, you can enable it or not.
While 4 years ago it may have been worth considering, we are mostly in a maintenance status right now, thinking more of how to upgrade to Drupal 8 than adding new features in D7 version. And I'm talking about new features not hacking around existing ones.
If you still want to provide the feature somehow, the place for it is a new module and if you don't want a stand alone one, it will be welcomed here, https://www.drupal.org/project/i18n_contrib