Hello!
I have two: contexts: web(english) and de(german).
I have an issue with langRouter + pdoPage. It works correctly with web context until I haven't german language in the settings of my browser, but when I add it, the langRouter returns an empty result.
Could you help me resolve this issue?
MODx: 3.0.1-pl
langRouter: 1.4.2
English version located on url: http://localhost:8081/en/
German version located on url: http://localhost:8081/de/
my context settings:
base_url: /
cultureKey: en and de in the de context
url_scheme: https://
site_url: {url_scheme}{http_host}{base_url}{cultureKey}/
here is the langRouter log:
[2023-04-26 18:09:41] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:41] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Unhandled request:
REQUEST_URI: /en/profile/
REDIRECT_URI:
QUERY_STRING: q=en/profile/
q: en/profile/
Context: web
Site start: 1
[2023-04-26 18:09:41] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) contextmap: array(2) {
["en"]=>
string(3) "web"
["de"]=>
string(2) "de"
}
[2023-04-26 18:09:41] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:41] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Culture key found in URI:
REQUEST_URI: /profile/
REDIRECT_URI:
QUERY_STRING: q=en/profile/
q: profile/
Context: web
Site start: 1
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 166) PHP warning: Undefined array key "q"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Unhandled request:
REQUEST_URI: /assets/components/pdotools/connector.php
REDIRECT_URI:
QUERY_STRING:
q:
Context: web
Site start: 1
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) contextmap: array(2) {
["en"]=>
string(3) "web"
["de"]=>
string(2) "de"
}
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) Detected culture key: string(2) "de"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) Detected context key: string(2) "de"
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 166) PHP warning: Undefined array key "q"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Culture key not found in URI:
REQUEST_URI: /assets/components/pdotools/connector.php
REDIRECT_URI:
QUERY_STRING:
q:
Context: de
Site start: 114
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 198) Redirect to http://localhost:8081/de/?pdotreat3=1&pageId=6&hash=b5edf689092779b36e96e2bdc4b3cbc95f1be8e0
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 166) PHP warning: Undefined array key "q"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Unhandled request:
REQUEST_URI: /assets/components/pdotools/connector.php
REDIRECT_URI:
QUERY_STRING:
q:
Context: web
Site start: 1
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) contextmap: array(2) {
["en"]=>
string(3) "web"
["de"]=>
string(2) "de"
}
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) Detected culture key: string(2) "de"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) Detected context key: string(2) "de"
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 166) PHP warning: Undefined array key "q"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Unhandled request:
REQUEST_URI: /assets/components/pdotools/connector.php
REDIRECT_URI:
QUERY_STRING:
q:
Context: web
Site start: 1
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) contextmap: array(2) {
["en"]=>
string(3) "web"
["de"]=>
string(2) "de"
}
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) Detected culture key: string(2) "de"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) Detected context key: string(2) "de"
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 166) PHP warning: Undefined array key "q"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Culture key not found in URI:
REQUEST_URI: /assets/components/pdotools/connector.php
REDIRECT_URI:
QUERY_STRING:
q:
Context: de
Site start: 114
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 198) Redirect to http://localhost:8081/de/?pdouser=1&pageId=6&hash=0f7a4ea631e722615e70cfd727eef12ae0193c54
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:43] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 166) PHP warning: Undefined array key "q"
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Culture key not found in URI:
REQUEST_URI: /assets/components/pdotools/connector.php
REDIRECT_URI:
QUERY_STRING:
q:
Context: de
Site start: 114
[2023-04-26 18:09:43] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 198) Redirect to http://localhost:8081/de/?pdotreat1=1&pageId=6&hash=6b61654128b5084c489de49dcf1c40c4881ba6af
[2023-04-26 18:09:44] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Unhandled request:
REQUEST_URI: /de/?pdouser=1&pageId=6&hash=0f7a4ea631e722615e70cfd727eef12ae0193c54
REDIRECT_URI:
QUERY_STRING: q=de/&pdouser=1&pageId=6&hash=0f7a4ea631e722615e70cfd727eef12ae0193c54
q: de/
Context: web
Site start: 1
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) contextmap: array(2) {
["en"]=>
string(3) "web"
["de"]=>
string(2) "de"
}
[2023-04-26 18:09:44] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Unhandled request:
REQUEST_URI: /de/?pdotreat3=1&pageId=6&hash=b5edf689092779b36e96e2bdc4b3cbc95f1be8e0
REDIRECT_URI:
QUERY_STRING: q=de/&pdotreat3=1&pageId=6&hash=b5edf689092779b36e96e2bdc4b3cbc95f1be8e0
q: de/
Context: web
Site start: 1
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) contextmap: array(2) {
["en"]=>
string(3) "web"
["de"]=>
string(2) "de"
}
[2023-04-26 18:09:44] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Culture key found in URI:
REQUEST_URI: /?pdotreat3=1&pageId=6&hash=b5edf689092779b36e96e2bdc4b3cbc95f1be8e0
REDIRECT_URI:
QUERY_STRING: q=de/&pdotreat3=1&pageId=6&hash=b5edf689092779b36e96e2bdc4b3cbc95f1be8e0
q:
Context: de
Site start: 114
[2023-04-26 18:09:44] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Culture key found in URI:
REQUEST_URI: /?pdouser=1&pageId=6&hash=0f7a4ea631e722615e70cfd727eef12ae0193c54
REDIRECT_URI:
QUERY_STRING: q=de/&pdouser=1&pageId=6&hash=0f7a4ea631e722615e70cfd727eef12ae0193c54
q:
Context: de
Site start: 114
[2023-04-26 18:09:44] (ERROR @ /www/core/src/Revolution/modParser.php : 509) Could not find snippet with name !++site_start.
[2023-04-26 18:09:44] (ERROR @ /www/core/src/Revolution/modParser.php : 509) Could not find snippet with name !++site_start.
[2023-04-26 18:09:44] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Unhandled request:
REQUEST_URI: /de/?pdotreat1=1&pageId=6&hash=6b61654128b5084c489de49dcf1c40c4881ba6af
REDIRECT_URI:
QUERY_STRING: q=de/&pdotreat1=1&pageId=6&hash=6b61654128b5084c489de49dcf1c40c4881ba6af
q: de/
Context: web
Site start: 1
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 186) contextmap: array(2) {
["en"]=>
string(3) "web"
["de"]=>
string(2) "de"
}
[2023-04-26 18:09:44] (ERROR @ /www/core/components/langrouter/src/LangRouter.php : 164) PHP warning: Undefined array key "REDIRECT_URI"
[2023-04-26 18:09:44] (ERROR in LangRouter @ /www/core/components/langrouter/src/LangRouter.php : 169) Culture key found in URI:
REQUEST_URI: /?pdotreat1=1&pageId=6&hash=6b61654128b5084c489de49dcf1c40c4881ba6af
REDIRECT_URI:
QUERY_STRING: q=de/&pdotreat1=1&pageId=6&hash=6b61654128b5084c489de49dcf1c40c4881ba6af
q:
Context: de
Site start: 114
`