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

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

Open
penyaskito opened this issue Jan 21, 2016 · 3 comments

Comments

@penyaskito
Copy link

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

I tracked this down to redirectNormalizeAliases(), where we are checking if the used path is the same one than saved for the current system path. However, we call $this->languageManager->getCurrentLanguage() which defaults to interface language.

I think it should use $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT) instead.

@Berdir Berdir mentioned this issue Jan 21, 2016
@Berdir
Copy link
Member

Berdir commented Feb 1, 2016

We might want to consider implementing https://www.drupal.org/node/2641118, likely allows us to throw out most if not all of our custom methods. We might lose some configurability however.

@IT-Cru
Copy link

IT-Cru commented Apr 13, 2016

Could this also be happen when some of our users has 'preferred_admin_langcode' NULL?

@anavarre
Copy link

No issue here with the below, so I suspect we're talking about preferred_langcode instead.

mysql> SELECT preferred_admin_langcode FROM users_field_data;
+--------------------------+
| preferred_admin_langcode |
+--------------------------+
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| en                       |
| en                       |
| en                       |
| en                       |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| en                       |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
| NULL                     |
+--------------------------+
37 rows in set (0.06 sec)

mysql> SELECT preferred_langcode FROM users_field_data;
+--------------------+
| preferred_langcode |
+--------------------+
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
| en                 |
+--------------------+
37 rows in set (0.00 sec)

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

No branches or pull requests

4 participants