DB update 1366 (multi-word Did you mean) can fail

Bug #2023590 reported by Galen Charlton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned
3.11
Confirmed
Medium
Unassigned

Bug Description

Database update script 1366.schema.DYM-multi-word.sql (from bug 1997485) can fail with errors like this:

psql:1366.schema.DYM-multi-word.sql:777: ERROR: invalid input syntax for integer: ""3""
CONTEXT: SQL statement "UPDATE config.metabib_class SET low_result_threshold = val::INT"
PL/pgSQL function inline_code_block line 12 at SQL statement

This is because the library settings such as "opac.did_you_mean.low_result_threshold" that are consulted during the upgrade can evidently contain JSON strings for the integers (i.e., with quotes wrapping the value like this: "3") rather than the bare integer value (i.e., 3).

An extra TRIM and some value checks in the upgrade script should fix this.

Revision history for this message
Galen Charlton (gmc) wrote :

Separately, it's worth looking into whether one of the library settings editors is incorrectly treating integer settings as strings.

Changed in evergreen:
milestone: none → 3.11.1
importance: Undecided → Medium
tags: added: install-upgrade
description: updated
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Galen Charlton (gmc) wrote (last edit ):

To answer my question:

- the Dojo Library Settings editor saved integer settings as JSON string literals
- the Angular one (which was introduced in 3.10) saves integer settings as JSON integer literals

Changed in evergreen:
milestone: 3.11.1 → 3.12-beta
Revision history for this message
Terran McCanna (tmccanna) wrote :

Removing milestones as there isn't a pullrequest yet

Changed in evergreen:
milestone: 3.12-beta → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.