Open muzzwood opened 9 years ago
It appears to only happen on the resource set by the "site_start" setting. Works fine on any other resource. And If I set site_start to a different resource, the original one then works fine.
Tried a fresh modx install. All worked perfectly until I turned Friendly URLs on. Some kind of issue going on there.
On further examination, it appears the wrong URIs are being generated. I have no idea why that's causing the manager to be logged out but it is anyway...
In my .htaccess file I've got: RewriteEngine On RewriteBase /mysite
If I delete the modx cache and clear my cookies, I can load up the resource with lingua.selector on the web context and the link shows it is pointed to http://localhost/mysite/?lang=zh This is correct and if I click on the link, it works and I don't get logged out of the manager.
Problem is, if I look at where the link is pointing on this newly loaded page, it shows: http://localhost//mysite/index.html?lang=en
Note the double slash // just after localhost!
Clicking this link will log me out of the manager.
Ok I think I've worked it out.
In the lingua.selector snippet, line 206 needs to be changed from: $pageURL = $parseUrl['scheme'] . '://' . $parseUrl['host'] . '/' . $parseUrl['path'] . $itemUri;
to $pageURL = $parseUrl['scheme'] . '://' . $parseUrl['host'] . $parseUrl['path'] . $itemUri;
I would think this is going to work in some cases but not in others. The logout issue was only affecting me on Localhost, with the .htaccess RewriteBase set to /subdir/. On the MODX Cloud it never happens. This fix does stop the problem on localhost. I haven't checked what it would do on the Cloud installation. I wonder if it's only an issue in a subdir installation?
Testing out Lingua for the first time. Placed the selector snippet on the home resource to test. Works fine until I go back to the manager which presents me with the login screen as soon as I try to load another manager page. It only happens when I click on the language link in the selector drop down on the web context. Modx 2.3.3
Any ideas what could be causing this?
Edit: I've tried deleting the cache and removing all cookies.