Handling errors in forms in django-oscar
10:10 26 Jan 2026

In the dashboard/catalogue/product interface if in any of the tabs there's an error, a red circle appears in the tabs navigation for this tag. In dashboard.js I see this code:

var productErrorListener = $(this).find('[class*="error"]:not(:empty)').closest('.tab-pane').attr('id');

Which is good for bare oscar installation, but doesn't go well with JSONEditorWidget, which has element with jsoneditor-validation-errors-container class. As a result the red circle appears for innocent products if I have JSONEditorWidget setup to edit the jsons for them.

I recommend implementing stricter condition for find().

PS. I believe django-oscar mailing list is half dead, with spam floating on top… So writing here.

django-oscar