Troubleshooting Missing Vehicle Categories After Code Modifications in Traccar

SebastienC2 months ago

Hello, to add new vehicle categories, I modified the following parts:

preloadImages.js :

Capture d'écran 2024-10-17 103756.png

load.js :

Capture d'écran 2024-10-17 103845.png

fr.json :

Capture d'écran 2024-10-17 103927.png

However, after recompiling and clearing the cache, the categories do not appear. Could you please help me with this?

Best,

Sebastien C

Track-trace2 months ago

I dont know, but i notice that only your category uses an uppercase letter P.

Meaby you could try to modify an existing line. For instance, train (you will not put trackers on trains right?) :)

Just to see if it works / makes any difference.

SebastienC2 months ago

Thank you for your feedback, but it's the same result with or without uppercase letters. I tried with "excavator" and it's the same, while other modifications work fine. Could it be that I'm missing something to declare?

Anton Tananaev2 months ago

Which of the apps are you trying to modify? I see you have a change in the legacy app as well.

SebastienC2 months ago

I'm working on the modern app for this modification.

Anton Tananaev2 months ago

Have you added it to the deviceCategories.js?

SebastienC2 months ago

Indeed, it works better now, thank you!