This error is shown in the browser:
ext-all.js:22 Uncaught TypeError: Cannot read property 'isModel' of null at F.extractData (ext-all.js:22) at F.extractData (ext-all.js:22) at F.readRecords (ext-all.js:22) at F.read (ext-all.js:22) at F.processResponse (ext-all.js:22) at F.<anonymous> (ext-all.js:22) at Object.callback (ext-all.js:22) at F.onComplete (ext-all.js:22) at F.onStateChange (ext-all.js:22) at XMLHttpRequest.<anonymous> (ext-all.js:22)
Usually it means that you have a problem with foreign keys in the database. You have some links to removed devices.
Would that be in the user_device table?
Yes, most likely.
Ok, I cleared all devices from user:
delete from user_device where userid = 1
And added one device again.
Problem solved :)
What database are you using?
MySql
I suspect that you are using MyISAM engine which doesn't support foreign keys. You need to use InnoDB engine with Traccar.
Show table status say MyISAM for all tables.
Is it easy to change it? Would it give any other problems?
It's not easy to change. As far as I know, you would have to re-create the database.
If you don't do it, you would always have problems with removing things from the database.
This seemed to work:
ALTER TABLE DATABASECHANGELOG ENGINE=InnoDB;
ALTER TABLE DATABASECHANGELOGLOCK ENGINE=InnoDB;
ALTER TABLE attribute_aliases ENGINE=InnoDB;
ALTER TABLE device_geofence ENGINE=InnoDB;
ALTER TABLE devices ENGINE=InnoDB;
ALTER TABLE events ENGINE=InnoDB;
ALTER TABLE geofences ENGINE=InnoDB;
ALTER TABLE group_geofence ENGINE=InnoDB;
ALTER TABLE groups ENGINE=InnoDB;
ALTER TABLE notifications ENGINE=InnoDB;
ALTER TABLE positions ENGINE=InnoDB;
ALTER TABLE server ENGINE=InnoDB;
ALTER TABLE statistics ENGINE=InnoDB;
ALTER TABLE user_device ENGINE=InnoDB;
ALTER TABLE user_geofence ENGINE=InnoDB;
ALTER TABLE user_group ENGINE=InnoDB;
ALTER TABLE users ENGINE=InnoDB;
Yes, but the problem is that you don't have foreign keys.
Hello,
The admin area gets a spinner in the device section when a device is deleted.:
How can this be fixed?
I have checked the user_device table and it seems to have the correct values