Skip to content

CSV Import fails with FormData constructor: Argument 1 does not implement interface HTMLFormElement #4962

Description

@djolemag

Environment

ZoneMinder: 1.38.3
Ubuntu: 24.04.4 LTS
Browser: Firefox (i navedi verziju ako želiš)
Theme: Dark (ako je relevantno)

Steps to reproduce

Open Network Scan.
Select CSV Import.
Choose a valid CSV file.
Click Save.

Expected result

The CSV file is uploaded and monitor import starts.

Actual result

Nothing happens.

Browser Developer Console shows:

Uncaught TypeError:
FormData constructor:
Argument 1 does not implement interface HTMLFormElement

The exception points to:

skins/classic/views/js/add_monitors.js
line 145

Current code:

const form = $j('#contentForm');
var formData = new FormData(form);

It appears that form is a jQuery object instead of an HTMLFormElement.

This was discovered while testing a multi-server deployment, but the issue appears unrelated to multi-server and looks like a client-side JavaScript bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions