ElkArte Community

Elk Development => Bug Reports => Topic started by: live627 on May 17, 2016, 08:25:32 pm

Title: action=viewquery error
Post by: live627 on May 17, 2016, 08:25:32 pm
http://localhost/Elkarte/index.php?action=viewquery;sa=hide produces an error

Sorry, we can't let you access this section. We can't even tell you if it exists. You're welcome to visit the main page and choose your way from there.

why querycat no exist?
Title: Re: action=viewquery error
Post by: emanuele on May 18, 2016, 05:36:28 am
Do you have the debug enabled? Otherwise I guess the error message seems legit (i.e. you cannot access the "viewquery" section).

Another interesting thing (happening on this site, not tested on clean localhost) is that there is different styling but I'm not sure where it comes from.
Title: Re: action=viewquery error
Post by: Flavio93Zena on May 18, 2016, 09:45:27 am
Code: [Select]
.action_viewquery a, .action_viewquery strong, #debug_logging a, #debug_logging strong
In css, for example ;)
Title: Re: action=viewquery error
Post by: live627 on May 18, 2016, 07:33:10 pm
QuoteDo you have the debug enabled?
yes, logged in as admin

Quotethere is different styling
same here
Title: Re: action=viewquery error
Post by: emanuele on May 19, 2016, 05:45:59 am
Ohh... I think I remember the problem. From time to time it happens to me as well, usually in moment I can't afford thinking about debugging a darn session issue and so I just repeat until it works and then I forget about it.

The failure happens at
Code: [Select]
if ($db_show_debug !== true || !isset($this->_req->session->debug))
because session->debug is not set (yet).
I see a couple of possibilities:
1) the check in viewquery is done before the value is set in some edge case (but that looks to me less frequent that I even experienced),
2) some javascript in the background does something without queries (though, the funny part about this one is that probably $_SESSION['debug'] is never deleted, so it should never happen).