Problems adding fields in device forms

tracotraca4 years ago

Hello, I had a problem with the code. I wanted to know if you could help me. I have added some fields, in the form of the device zone. But when adding or editing these fields, I get this error.

Unrecognized field "registrationNumber" (class org.traccar.model.Device), not marked as ignorable (14 known properties: "contact", "positionId", "model", "name", "uniqueId", "phone", "status", "attributes", "geofenceIds", "groupId", "id", "disabled", "category", "lastUpdate"])
at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 335] (through reference chain: org.traccar.model.Device["registrationNumber"])
Anton Tananaev4 years ago

You need to add those fields everywhere, including backend. Check existing fields for an example.

tracotraca4 years ago

Hello, thanks for answering.

The fields already had them added, they have the same parameters as those that already came in the traccar. I don't know if the problem will be that I use phpmyadmin, for the server. But the default fields, which come in the traccar, if you save them, the new ones don't. And they are written in the backends, and uploaded to the server.

Anton Tananaev4 years ago

If you get this error, clearly you didn't add it somewhere.