Generated URLs ignore settings.BASE_PATH
Plugin-rendered buttons href attribute ignore the BASE_PATH netbox value.
For example, given the base path internal/netbox/, the url of the button "Edit Floorplan" (in the context of /dcim/locations/{some-id}/floorplans/) should be /internal/netbox/plugins/floorplan/floorplans/1/edit/, but instead its /plugins/floorplan/floorplans/1/edit/
I suspect everything is like that, seeing as even the static stuff is broken (static/netbox_floorplan/floorplan/utils.js for example)
I can confirm that other plugins don't have this problem.
FYI I have installed everything correctly running ./manage.py collectstatic before restarting netbox[-rq]
Hello, I'm willing to file a PR to fix this properly :
- add a bundle step for static files
- replace hardcoded URLs in templates with
urltemplate tag
Let me know if I should
@AdamBrutsaert Yes, please go ahead. We have put the making of floorplans on hold for a while, at the end of a big todo list, but we still have a use for it.
This would be a great idea, we're also affected by this issue. Otherwise great solution! 👍