Skip to content

missing FROM-clause entry for table "t_brunoais" at character 290 #21

@chiara-paci

Description

@chiara-paci

Hi,

after enabling the readOtherTopics extension, some users are complaying about SQL errors when looking for messages, and PostgreSQL log contains many lines like these:

2021-01-09 12:42:30.032 CET [31427] phpbb@phpbb ERROR:  missing FROM-clause entry for table "t_brunoais" at character 290
2021-01-09 12:42:30.032 CET [31427] phpbb@phpbb STATEMENT:  SELECT COUNT(DISTINCT t.topic_id) as total_results FROM phpbb_topics t, phpbb_posts p
                                        WHERE p.poster_id = '93'
                                                                         AND ((p.forum_id NOT IN (1, 2, 17, 18, 21, 23, 24)
                                AND p.post_visibility = 1))
                                                                         AND p.forum_id NOT IN (1, 2, 17, 18, 21, 23, 24) AND t_brunoais.topic_id = p.topic_id  AND (t_brunoais.forum_id IN (3, 39, 38, 37, 11, 36,
 35, 34, 33, 31, 30, 6, 29, 28, 27, 26, 25, 22, 10, 20, 19, 12, 15, 13, 8, 9, 16, 7, 14, 5, 4)
                                                OR t_brunoais.topic_poster = 93 )
                                                                        AND t.topic_id = p.topic_id

2021-01-09 12:43:10.859 CET [31489] phpbb@phpbb ERROR:  missing FROM-clause entry for table "t_brunoais" at character 290
2021-01-09 12:43:10.859 CET [31489] phpbb@phpbb STATEMENT:  SELECT COUNT(DISTINCT t.topic_id) as total_results FROM phpbb_topics t, phpbb_posts p
                                                                WHERE p.poster_id = '93'
                                                                         AND ((p.forum_id NOT IN (1, 2, 17, 18, 21, 23, 24)
                                AND p.post_visibility = 1))

I suppose it's something in event/search_listener.php, but I'm not able to figure out how to fix.

Our platform is PhpBB 3.3.2, PHP 7.3.19, PostgreSQL 11.9.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions