-
Bug
-
Resolution: Fixed
-
Blocker
-
3.0.3
-
None
-
PHP Environment: 5.2.5
Database: PostgreSQL 8.3.1
Searching on a single search term with all defaults except "Search within" changed to 'Topic titles only' will fail with this message:
General Error
SQL ERROR [ postgres ]ERROR: invalid reference to FROM-clause entry for table "m0" LINE 1: ...ordmatch m0, v3_topics t LEFT JOIN v3_posts p ON (m0.post_id... ^ HINT: There is an entry for table "m0", but it cannot be referenced from this part of the query. []
SQL
SELECT COUNT(DISTINCT p.post_id) AS total_results FROM v3_search_wordmatch m0, v3_topics t LEFT JOIN v3_posts p ON (m0.post_id = p.post_id) WHERE p.post_id = t.topic_first_post_id AND m0.word_id = 5158 AND m0.title_match = 1
BACKTRACE
FILE: includes/db/postgres.php
LINE: 177
CALL: dbal->sql_error()FILE: includes/search/fulltext_native.php
LINE: 666
CALL: dbal_postgres->sql_query()FILE: search.php
LINE: 418
CALL: fulltext_native->keyword_search()
Similarly, searching on a single search term with all defaults except "Display results as" changed to 'Topics' will fail with a similar message:
General Error
SQL ERROR [ postgres ]ERROR: invalid reference to FROM-clause entry for table "m0" LINE 1: ...ordmatch m0, v3_topics t LEFT JOIN v3_posts p ON (m0.post_id... ^ HINT: There is an entry for table "m0", but it cannot be referenced from this part of the query. []
SQL
SELECT COUNT(DISTINCT p.topic_id) AS total_results FROM v3_search_wordmatch m0, v3_topics t LEFT JOIN v3_posts p ON (m0.post_id = p.post_id) WHERE p.topic_id = t.topic_id AND m0.word_id = 5158
BACKTRACE
FILE: includes/db/postgres.php
LINE: 177
CALL: dbal->sql_error()FILE: includes/search/fulltext_native.php
LINE: 666
CALL: dbal_postgres->sql_query()FILE: search.php
LINE: 418
CALL: fulltext_native->keyword_search()
Post-oriented searches (i.e. all default settings) work just fine.