Sounds like a Firefox issue. What version do you use on PC? What extensions are activated? e.g. check if you have disabled redirects in the web-developer toolbar.
It works as expected here, with the latest FF on WinXP...
I’m running FF 3.0.4 on Vista. No Extensions installed. I have a notification activated that alerts me when redirects happen, but I don’t have anything set to prevent redirects (as far as I know). Any other thoughts? This is mysterious.
Here’s a thought (and I confess to knowing practically nothing about php) is there a way to rewrite the code so that it doesn’t append the "webloginmode=lo" to the URL and yet still recognizes whether the user is logged in or out? If so, then I think that would solve the problem. Seems like there should be a way to pass the variable without appending it to the URL.
Here’s one snippet of related code from weblogin.inc.php
// display logout
$tpl = $tpls[1];
$url = preserveUrl($modx->documentObject[’id’]);
$url = $url.((strpos($url,"?")===false) ? "?":"&")."webloginmode=lo";
$tpl = str_replace("[+action+]",$url,$tpl);
$tpl = str_replace("[+logouttext+]",$logoutText,$tpl);
$output .= $tpl;
And here’s another from weblogin.common.inc.php
function preserveUrl($docid = ’’, $alias = ’’, $array_values = array(), $suffix = false) {
global $modx;
$array_get = $_GET;
$urlstring = array();
unset($array_get["id"]);
unset($array_get["q"]);
unset($array_get["webloginmode"]);
$array_url = array_merge($array_get, $array_values);
foreach ($array_url as $name => $value) {
if (!is_null($value)) {
$urlstring[] = urlencode($name) . ’=’ . urlencode($value);
}
}
$url = join(’&’,$urlstring);
if ($suffix) {
if (empty($url)) {
$url = "?";
} else {
$url .= "&";
}
}
return $modx->makeUrl($docid, $alias, $url);
}
There’s also a bit about it in weblogin.processor.inc.php at line 93 (which seems to be related to password generation which I am not using and have not tested)
But I don’t understand how they all fit together or why webloginmode=lo needs to be appended to the URL.
Thoughts?
Ok, another interesting scenario. I’ve just tested the login using Lunascape rendering with Trident, Gecko and WebKit and they all work fine also. Seems like the problem is that for some reason on my version of FF when I click "logout" it rewrites the URL as index.php?id=2&webloginmode=lo but then never refreshes/discards the webloginmode=lo portion. In all other browser tests, the URL goes back to just index.php?id=2 which works fine.
Seems like this might by chance just be a quirk in my paricular FF instance, but I’m concerned that the problem may manifest for other users. Any ideas on a work around? Like a forced rewrite of the url to lop off the webloginmode=lo after the logout processes...I mean other than how it already does/doesn’t do it?
Thx
C
The current version of FF I have on Vista is 3.0.10 so you might try again after an update.
The link you posted above seems to work for me in FF w/ Vista Ultimate (I don’t get a blank page).
works fine with 3.0.10 / XP
The logout worked fine for me in FF3 Vista Ultimate, although I did see a white screen flash for about a second before the page reappeared.
BTW, you could use a link to the home page in the menu.
I had some others test the page. Apparently FF on Windows doesn’t like the following
$modx->sendRedirect($url,0,’REDIRECT_REFRESH’);
Found on line 180 in weblogin.processor.inc.pho
But replacing this line simply with
$modx->sendRedirect($url);
Solves the problem.