[TYPO3-core] RFC: Bug #8915: "List users online" not DBAL compliant - Module "beuser" crashes

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Mon Jul 7 22:10:55 CEST 2008


Christian Trabold schrieb:
> 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?

It's used for the SU-feature. As you can see the statement joins 
be_users a second time (first for the real user, then for the "back user").

It never worked with DBAL because TYPO3's query parser used by DBAL 
doesn't handle brackets in the FROM clause.

This lack is a real problem, so it should be addressed instead of 
writing a workaround for the BE-User module.

Masi


More information about the TYPO3-team-core mailing list