When I install "Nuke 7.7 Patched 3.0" (on top of original PHP-Nuke 7.7 version of course), users with a non-default theme cannot logoff properly anymore.
For instance default theme = "DeepBlue" and a user chooses another theme "3DFantasy". When the user presses the logoff/exit button, the browser will go and stay blank with the following url in the address bar (http://path-to-nuke/modules.php?name=Your_Account&op=logout).
However, when you hit the refresh button in your browser (with the above url still in there) the user gets logged off after all.
Normally, the screen would refresh automatically and say "you are now logged out" before going to index.php automatically.
When the user switches back to the default theme, logoff works properly again.
Could this be a bug in function logout() in modules/Your_Account/index.php or in header.php?
Fatal error: Cannot redeclare opentable() (previously declared in C:\path-to-nuke\themes\3D-Fantasy\tables.php:10) in C:\path-to-nuke\themes\DeepBlue\theme.php on line 10
My suggestion would be here, but I'm unsure.
Code:
function logout() {
global $prefix, $db, $user, $cookie, $redirect;
cookiedecode($user);
$r_uid = $cookie[0];
$r_username = $cookie[1];
setcookie("user", false);
$db->sql_query("DELETE FROM ".$prefix."_session WHERE uname='$r_username'");
$db->sql_query("DELETE FROM ".$prefix."_bbsessions WHERE session_user_id='$r_uid'");
$user = "";
include("header.php");
OpenTable();
if ($redirect != "") {
echo "<META HTTP-EQUIV=\"refresh\" content=\"3;URL=modules.php?name=$redirect\">";
} else {
echo "<META HTTP-EQUIV=\"refresh\" content=\"3;URL=index.php\">";
}
echo "<center><font class=\"option\"><b>"._YOUARELOGGEDOUT."</b></font></center>";
CloseTable();
include("footer.php");
}
How can I solve this little bug?
TIA, Anton!
Reproduced in this way:
- Install PHP-Nuke 7.7 and import nuke.sql
- Create admin account (admin)
- Create a user account (test)
- Copy over Nuke 7.7 Patched 3.0 on top and overwrite files
- Run upgrade.php
- Logoff the phpnuke admin account if logged in.
- Logon as a user and change your theme other than the default (in Your Account)
- Logoff user
Now your browser will go and stay blank until you refresh your window (F5)
sneldown Nuke Cadet
Joined: Jun 03, 2005
Posts: 7
Posted:
Sat Jun 04, 2005 9:55 am
Please move this topic to "Bug Reports".
Xyberian Colonel
Joined: Mar 14, 2004
Posts: 1921
Location: Behind you
Posted:
Sat Jun 04, 2005 10:01 am
Hm... I fixed the bug... Geezz.... i don't remember how I fixed it. My site is 7.7 and I fixed it. When I remember it, I will post it. the META tag is not the ultimate solution to fix it out.
I'd also expect include_once to work as intended, but occasionally solutions to problems aren't straightforward (you probably know that better than I do).
I'll see what is the difference between the original mainfile.php (+ header.php) and the Patched ones.
As I can reproduce it over and over (as described above) on different systems, it really seems a little but nasty bug.
Maybe chatserv can have a look at it, so other users won't experience the same problem in the future.
Thanks a million for your info!
Edit: well, I didn't test Evaders99's info yet BobMarion, so please don't blame me for that.
Last edited by sneldown on Thu Jun 09, 2005 12:16 am; edited 3 times in total
BobMarion Nuke Soldier
Joined: Feb 20, 2003
Posts: 17
Posted:
Wed Jun 08, 2005 4:58 pm
You seem to misunderstand what mainfile is doing. It only includes the theme.php file if it isn't already loaded. Like other scripts have uncovered issues in the YA module this seems to be the case and I'm already looking at a solution which will be posted on my site once I find it.
Bob, my intention was to report this bug and describe it in detail so anybody could reproduce it. Not just "I got this error, help me!"
I sincerely hope to get PHP-Nuke (Patched) better and more pleasant for users to use it. Any posts previously were just speculation on a possible solution and therefore you shouldn't blame me or Evaders99 for our efforts. Sometimes it is just trial-and-error.
However I'm very glad you are participating in this issue and willing to spend your precious time on possible solutions.
Greetings,
Anton
Beta3 Private
Joined: Jul 30, 2005
Posts: 35
Posted:
Wed Aug 10, 2005 5:59 pm
hi,
i have the same problem and just looking for more info or solutions . . .
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum