Unformatted table name breaks matrix

Bug #1851175 reported by Robert Lyon on 2019-11-03
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Status tracked in 20.04
19.10
High
Unassigned
20.04
High
Unassigned

Bug Description

Unable to get matrix form and instead get:

Failed to get a recordset: postgres8 error: [-18: ERROR: relation "block_instance" does not exist LINE 2: INNER JOIN block_instance bi ON bi.id = bid.bloc... ^] in EXECUTE("SELECT MAX("positiony") FROM "mh_block_instance_dimension" bid INNER JOIN block_instance bi ON bi.id = bid.block WHERE bi.view = ?")Command was: SELECT MAX("positiony") FROM "mh_block_instance_dimension" bid INNER JOIN block_instance bi ON bi.id = bid.block WHERE bi.view = ? and values was (0:8)

To test:

1) have a new/clean database
2) update config.php and set $cfg->dbprefix = 'cats_';
3) install site
4) enable smart evidence in Admin -> Institutions configuration
5) create a collection of at least 1 page and set it to use a smart evidence matrix
6) view the matrix page and click on a point

It should pop up a modal but it doesn't

Reviewed: https://reviews.mahara.org/10557
Committed: https://git.mahara.org/mahara/mahara/commit/6459c465101d6242f47a5e65c53fb7e3f18ddd19
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit 6459c465101d6242f47a5e65c53fb7e3f18ddd19
Author: Robert Lyon <email address hidden>
Date: Mon Nov 4 12:44:20 2019 +1300

Bug 1851176: Adding a skin when on custom theme and using dbprefix

Get table not found error

Also fix for Bug 1851175 - as both fixes were to escape table name
correctly

Note: also fixed another table call that was not escaped correctly

behatnotneeded

Change-Id: I1acdafe9c29aa610a8d947b6fbbf95883b26f8c6
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/10565
Committed: https://git.mahara.org/mahara/mahara/commit/3487188098b93f85493b92a58e55b8d6a03b6a22
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 19.10_STABLE

commit 3487188098b93f85493b92a58e55b8d6a03b6a22
Author: Robert Lyon <email address hidden>
Date: Mon Nov 4 12:44:20 2019 +1300

Bug 1851176: Adding a skin when on custom theme and using dbprefix

Get table not found error

Also fix for Bug 1851175 - as both fixes were to escape table name
correctly

Note: also fixed another table call that was not escaped correctly

behatnotneeded

Change-Id: I1acdafe9c29aa610a8d947b6fbbf95883b26f8c6
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 6459c465101d6242f47a5e65c53fb7e3f18ddd19)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers