Duplicate key error on block edit page in Postgres
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Unassigned |
Bug Description
It is possible to get this error:
Failed to get a recordset: postgres8 error: [-5: ERROR: duplicate key value violates unique constraint "blocinst_
To reproduce:
1. Create a new page
2. Click on the Note block
3. Do not click on Add nor on Cancel, but press ESC key (because you just realised that you have selected the wrong text block)
4. Click on the Text block
5. Click on the Add button
The problem here is the using of 'ESC' key is not cleaning up info about old block, so is trying to save the old and new block with same block position
Changed in mahara: | |
milestone: | none → 18.04.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
In MySQL it behaves slightly differently and tries to display both blocks causing the config form to be confused