md-systems / redirect

DEPRECATED: Redirect moved back to drupal.org, use the official repository.
https://www.drupal.org/project/redirect
21 stars 29 forks source link

Fix for #77 #78

Open penyaskito opened 8 years ago

penyaskito commented 8 years ago

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

Berdir commented 8 years ago

77

Berdir commented 8 years ago

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 commented 8 years ago

@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:

Berdir commented 8 years ago

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.