Fix filter modifier form submission bug with 'action' field collision

Forms with a field named "action" (e.g., ObjectChangeFilterForm) were causing
the form.action property to be shadowed by the field element, resulting in
[object HTMLSelectElement] appearing in the URL path.

Use form.getAttribute('action') instead of form.action to reliably retrieve
the form's action URL without collision from form fields.

Fixes form submission on /core/changelog/ and any other forms with an 'action'
field using filter modifiers.
This commit is contained in:
Jason Novinger 2025-11-20 05:23:50 -06:00
parent c8af43f3f2
commit 05e1317f5e
3 changed files with 3 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -37,7 +37,9 @@ export function initFilterModifiers(): void {
}
}
window.location.href = `${form.action}?${params.toString()}`;
// Use getAttribute to avoid collision with form fields named 'action'
const actionUrl = form.getAttribute('action') || form.action;
window.location.href = `${actionUrl}?${params.toString()}`;
});
}
}