UCL / frrant

2 stars 0 forks source link

500 error caused by app crit search within original text create form #471

Open tcouch opened 1 month ago

tcouch commented 1 month ago

Describe the bug The text editor on the original text create form (used in fragment, anonymous fragment, and testimonium create views) has the mentions plugin enabled for apparatus criticus searching. This sends a get request to /search/ajax/apparatus-criticus/ whenever the hash key '#' is pressed. Unfortunately, this request needs to include an object_id as one of the parameters, but object_id=null because this is a yet to be created object. As a result we get a 500 error.

It's not a massive problem in terms of user experience as you'd only actually see the ajax request response if you are looking at the network pane, but it does mean we get emails when it happens in production.

Recommendation: App crit search should probably be disabled on this form.