Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Currently new joins are added to review ListSQLs without line breaks:

ReviewsEventHandler
$list_sqls[''] .= ' LEFT JOIN '.$item_table.' item_table ON item_table.ResourceId = %1$s.ItemId';
$list_sqls[''] .= ' LEFT JOIN '.$ci_table.' ci ON item_table.ResourceId = ci.ItemResourceId AND ci.PrimaryCat = 1';

 

As result, LeftJoinOptimizer may work incorrectly. It detects only one join (that code consists of 2 joins - users + item table). And, if users table alias is not protected, both joins are deleted. If fields from item table join are used for filtering - SQL error happens.

Solution

Add line breaks to ListSQLs configuration

Related Tasks

  • No labels