#5441 - Similar submission conflict detection does not prevent creation of catalogue
| Identifier | #5441 |
|---|---|
| Issue type | Minor issue (breaks specific functionality) |
| Title | Similar submission conflict detection does not prevent creation of catalogue |
| Status | Completed |
| Handling member | PDStig |
| Version | 10.0.43 |
| Addon | catalogues |
| Description | When creating a new catalogue, if similar submission error is triggered, the catalogue is already created (so proceeding results in an error saying the catalogue already exists).
The catalogue should not be created until after proceed is clicked. |
| Steps to reproduce | |
| Additional information | Probably has to do with auto-creating categories... I think the similar submission is for the categories in my case at which point the catalogue was already created... and proceeding tries to re-create the entire catalogue instead of the category which triggered the error.
I think "similar submission" should not be checked for auto-creating categories. |
| Funded? | No |
| Commits |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
* The double submission check looks in the action logs. But the action logs do not map category to catalogue. Therefore, double submission cannot compare based on catalogue to prevent this bug.
* We also cannot do a direct database check for an existing category because titles are stored as translation IDs. This means we would have to translate every row in order to do a check to see if the title exists.
* We probably cannot use a redirect hack to prevent this bug (e.g. create the catalogue first, then redirect to another actualiser for creating the categories); this will break the do-next schema.
* Finally, we cannot simply remove the double submission check; it's the only guard we have against making categories with the same name (though a very bad one as it's still very possible to do, not that it would break anything though because they would have different IDs).
Also worth noting that this gets even more complicated when factoring in child categories.
When creating a new catalogue, if similar submission error is triggered, the catalogue is already created (so proceeding results in an error saying the catalogue already exists).
This fix sets mass import mode on when creating a catalogue with auto_fill categories to prevent this from happening.