Open penyaskito opened 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?
@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:
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.
When using different negotiation methods for interface and content, there are redirect loops