[TYPO3-core] RFC: Bug #8915: "List users online" not DBAL compliant - Module "beuser" crashes
Christian Trabold
christian.trabold at dkd.de
Mon Jul 7 18:13:42 CEST 2008
This is an SVN patch request.
Type: Bugfix
Bugtracker references:
http://bugs.typo3.org/view.php?id=8915
Branches:
trunk
Problem:
If DBAL-Extension is installed the "List users online"-Feature throws
this error:
DBAL fatal error: No handler found in handler_getFromTableList() for:
"(be_sessions, be_users u) LEFT OUTER JOIN be_users bu ON
(ses_backuserid=bu.uid)" (SQL engine parse ERROR: No table name found as
expected in parseFromTables()!: near "(be_sessions, be_users u) LEFT
OUTER JOIN be_users")
After that, the module is not accessible anymore until the
browser-session has been killed by closing the browser.
Solution:
I removed "LEFT OUTER JOIN" from the SQL-Statement and all works as
expected (see attached patch). Is "LEFT OUTER JOIN" really necessary?
Notes:
1) I could not install DBAL in 4.2 to reproduce this with latest
version, but the sourcecode is similar in 4.2 compared to 4.1.7.
2) I left the table-prefix "be_users." to make the code more readable.
3) phpDoc comments could be more verbose eg.
/**
* Shows an overview of online users
*
* @author Martin Kutschker
* @return string $content The HTML-Code for the user table
*/
Greetings
Christian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 8915_beuser_mod_index.php.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080707/1cce13be/attachment.txt
More information about the TYPO3-team-core
mailing list