[TYPO3-core] RFC #12071: t3lib_sqlparser is not able to parse alias of a joined table
Moreno Feltscher
moreno at luagsh.ch
Mon Sep 28 22:09:31 CEST 2009
Hi Xavier
Thanks for this patch, great improvement!
One question left:
- if ($stack[$pnt]['JOIN']['withTable'] =
$this->nextPart($parseString,'^([[:alnum:]_]+)[[:space:]]+ON[[:space:]]+',1)) {
+ if ($stack[$pnt]['JOIN']['withTable'] =
$this->nextPart($parseString,'^([[:alnum:]_]+)[[:space:]]+',1))
Why did you remove the "ON part" here?
Cheers
Moreno
On Mon, 28 Sep 2009 21:59:59 +0200, Xavier Perseguers
<typo3 at perseguers.ch> wrote:
> Hi,
>
> This is a RFC patch request.
>
> Type: Bugfix
>
> Branches: trunk (at least) but 4.2 and 4.1 would apply too
>
> Bugtracker reference:
> http://bugs.typo3.org/view.php?id=12071
>
> Problem:
> Bug 5120 already reported a similar problem (although it is possible
> that there was still another problem) and more recently, with
> feeditadvanced, having DBAL installed makes use of Core's SQL parser
> and gives this error:
>
> DBAL fatal error: No handler found in handler_getFromTableList() for:
> "sys_lockedrecords AS locks LEFT JOIN be_users AS user ON
> locks.userid=user.uid" (SQL engine parse ERROR: No join fields found in
> parseFromTables()!: near "user ON locks.userid=user.uid ")
>
> Problem is that the "AS user" from "LEFT JOIN be_users AS user" is not
> supported by Core's SQL parser.
>
> Solution:
> It could be possible to remove the alias part of the join in the
> corresponding query ("AS user") and this would work but I find it more
> useful to make the Core SQL parser a bit more powerful.
>
> Regards.
>
> Sidenote: I hope being able to quickly (!) get enough +1's as it is
> (sadely) not located within DBAL and I fear only DBAL suffer from this
> bug.
>
More information about the TYPO3-team-core
mailing list