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 for #77 #78

Open
wants to merge 1 commit into
base: 8.x-1.x
Choose a base branch
from
Open

Fix for #77 #78

wants to merge 1 commit into from

Conversation

penyaskito
Copy link

When using different negotiation methods for interface and content, there are redirect loops

@Berdir
Copy link
Member

Berdir commented Jan 21, 2016

#77

@Berdir
Copy link
Member

Berdir commented Jan 21, 2016

That seems weird to me. What if the page you're looking an isn't a content entity? And can you share your negotiation methods?

@penyaskito
Copy link
Author

@Berdir Didn't take that into account, so I didn't test it. But I guess in that case the language returned will be NULL, so it will check the LanguageInterface::TYPE_URL as it does now and the loop won't happen.

My negotiation methods are:

  • Interface: Selected (set to English).
  • Content: URL (prefixed per language), Selected (set to English).

@Berdir
Copy link
Member

Berdir commented Feb 11, 2016

You might want to have a look at https://www.drupal.org/node/2641118, which is trying to solve many of the redirect features that we have in a generic way in core.

It removes a lot of configurability, which I'm not sure we really need but according to the patch author, it supports your use case already. Want to try that out?

I'd be absolutely open to consder using an approach similar to that one in redirect.module, should make it a lot easier if that feature gets into core. We need to check if that covers all the automatic redirect scenarios or if theres's something we need to keep. Performance tests would also be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants