Reviewed: https://reviews.mahara.org/7635 Committed: https://git.mahara.org/mahara/mahara/commit/547ee20150d0e416d80d910a32a1e9e401afccce Submitter: Robert Lyon ([email protected]) Branch: 17.04_STABLE
commit 547ee20150d0e416d80d910a32a1e9e401afccce Author: Cecilia Vela Gurovic <[email protected]> Date: Wed Apr 12 11:01:53 2017 +1200 Bug 1681629: Fix error when searching for tagged collections Change-Id: I0e0f5de1d28047d1926f4b944a41768fb8dd73ae behatnotneeded: no new functionality (cherry picked from commit 814b9f7ffde302403a1f4a5a50805ddfbddf0bf8) -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1681629 Title: Search on "Pages and collections" doesn't work for collections Status in Mahara: Fix Committed Status in Mahara 17.04 series: Fix Committed Status in Mahara 17.10 series: Fix Committed Bug description: Mahara master / 17.04RC1 When you try to search for a collection, the following error message is returned: [WAR] cf (lib/errors.php:859) Failed to get a recordset: postgres8 error: [-2: ERROR: syntax error at or near ")" LINE 1: SELECT * FROM "view_tag" WHERE view IN () ^] in EXECUTE("SELECT * FROM "view_tag" WHERE view IN () ")Command was: SELECT * FROM "view_tag" WHERE view IN () Call stack (most recent first): log_message("Failed to get a recordset: postgres8 error: [-2: E...", 8, true, true) at /home/kristina/code/mahara/htdocs/lib/errors.php:95 log_warn("Failed to get a recordset: postgres8 error: [-2: E...") at /home/kristina/code/mahara/htdocs/lib/errors.php:859 SQLException->__construct("Failed to get a recordset: postgres8 error: [-2: E...") at /home/kristina/code/mahara/htdocs/lib/dml.php:517 get_recordset_sql("SELECT * FROM "view_tag" WHERE view IN () ", false) at /home/kristina/code/mahara/htdocs/lib/dml.php:466 get_recordset_select("view_tag", " WHERE view IN ()", null, "", "*", "", "") at /home/kristina/code/mahara/htdocs/lib/dml.php:666 get_records_select_array("view_tag", "view IN ()") at /home/kristina/code/mahara/htdocs/lib/view.php:5377 View::get_extra_view_info(array(size 1), false) at /home/kristina/code/mahara/htdocs/lib/view.php:3801 View::get_myviews_data(12, 0, "asdfasdf", null, null, "titleanddescriptionandtags", "latestviewed") at /home/kristina/code/mahara/htdocs/lib/view.php:4025 View::views_by_owner() at /home/kristina/code/mahara/htdocs/view/index.php:25 [WAR] cf (lib/dml.php:517) Failed to get a recordset: postgres8 error: [-2: ERROR: syntax error at or near ")" LINE 1: SELECT * FROM "view_tag" WHERE view IN () ^] in EXECUTE("SELECT * FROM "view_tag" WHERE view IN () ")Command was: SELECT * FROM "view_tag" WHERE view IN () Call stack (most recent first): get_recordset_sql("SELECT * FROM "view_tag" WHERE view IN () ", false) at /home/kristina/code/mahara/htdocs/lib/dml.php:466 get_recordset_select("view_tag", " WHERE view IN ()", null, "", "*", "", "") at /home/kristina/code/mahara/htdocs/lib/dml.php:666 get_records_select_array("view_tag", "view IN ()") at /home/kristina/code/mahara/htdocs/lib/view.php:5377 View::get_extra_view_info(array(size 1), false) at /home/kristina/code/mahara/htdocs/lib/view.php:3801 View::get_myviews_data(12, 0, "asdfasdf", null, null, "titleanddescriptionandtags", "latestviewed") at /home/kristina/code/mahara/htdocs/lib/view.php:4025 View::views_by_owner() at /home/kristina/code/mahara/htdocs/view/index.php:25 To replicate: 1. Set up a collection "Collection" with the tags "collectiontag" and "tag". 2. Set up a page "Page" with the tag "pagetag" and "tag". 3. Search within "Title, description" / "Title, description, tags" for "collection", "collectiontag" and "tag" You get an error message. Expected result: It finds your page and / or collection. Additionally, if you select to search within "Tags" but don't provide a search term, all results should be displayed. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1681629/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

