Help Link for FHRP Group Assignment not working (404 Not Found) #6121

Closed
opened 2025-12-29 19:37:00 +01:00 by adam · 4 comments
Owner

Originally created by @991jo on GitHub (Feb 21, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.1.8

Python version

3.9

Steps to Reproduce

  1. create a device
  2. add an interface
  3. go to the interface view
  4. press the "Assign Group" Button on the FHRP Group card
  5. Press the "Help" Button on the top-right of the page

Expected Behavior

A either a help page is shown explaining FHRP group assignments or no help button is shown at all.

Observed Behavior

The web server returns a 404 Not Found.
Other help pages work as intended.
The path a user is send to is /static/docs/models/ipam/fhrpgroupassignment/index.html

Originally created by @991jo on GitHub (Feb 21, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.1.8 ### Python version 3.9 ### Steps to Reproduce 1. create a device 2. add an interface 3. go to the interface view 4. press the "Assign Group" Button on the FHRP Group card 5. Press the "Help" Button on the top-right of the page ### Expected Behavior A either a help page is shown explaining FHRP group assignments or no help button is shown at all. ### Observed Behavior The web server returns a 404 Not Found. Other help pages work as intended. The path a user is send to is `/static/docs/models/ipam/fhrpgroupassignment/index.html`
adam added the type: bugstatus: accepted labels 2025-12-29 19:37:00 +01:00
adam closed this issue 2025-12-29 19:37:00 +01:00
Author
Owner

@ritkit commented on GitHub (Feb 24, 2022):

I can take a stab at this as a first contribution.

@ritkit commented on GitHub (Feb 24, 2022): I can take a stab at this as a first contribution.
Author
Owner

@JonathonReinhart commented on GitHub (Mar 3, 2022):

It looks like "FHRP Group Assignments" is just a section on the fhrpgroup page. So the correct URL should be: /static/docs/models/ipam/fhrpgroup/#fhrp-group-assignments

@JonathonReinhart commented on GitHub (Mar 3, 2022): It looks like "FHRP Group Assignments" is just a section on the `fhrpgroup` page. So the correct URL should be: `/static/docs/models/ipam/fhrpgroup/#fhrp-group-assignments`
Author
Owner

@ritkit commented on GitHub (Mar 4, 2022):

It looks like "FHRP Group Assignments" is just a section on the fhrpgroup page. So the correct URL should be: /static/docs/models/ipam/fhrpgroup/#fhrp-group-assignments

You are absolutely correct. However, it looks like the url for help is built based on the actual Forms URL/model information.
Currently the function that creates this URL is below

helpers.py

@register.filter()
def get_docs_url(model):
    """
    Return the documentation URL for the specified model.
    """
    return f'{settings.STATIC_URL}docs/models/{model._meta.app_label}/{model._meta.model_name}/'

However in the code above when the model name is passed it is FHRPGroupAssignment and therefor used in the URL.

So I see two choices.

  1. Create a wholly different page in Docs for FHRP Group Assignments. Though this seems like overkill for its own page.
  2. Add some crazy one off catch all for pages like this, but now it less dynamic. I hate this idea but it is an option.
  3. Add to the model to be able to define children so they can be called with /ParentModel/#Childname.

The third choice seems daunting to me but could be quite helpful in the long run. @jeremystretch any ideas?

@ritkit commented on GitHub (Mar 4, 2022): > It looks like "FHRP Group Assignments" is just a section on the `fhrpgroup` page. So the correct URL should be: `/static/docs/models/ipam/fhrpgroup/#fhrp-group-assignments` You are absolutely correct. However, it looks like the url for help is built based on the actual Forms URL/model information. Currently the function that creates this URL is below [helpers.py](https://github.com/netbox-community/netbox/blob/develop/netbox/utilities/templatetags/helpers.py) ``` @register.filter() def get_docs_url(model): """ Return the documentation URL for the specified model. """ return f'{settings.STATIC_URL}docs/models/{model._meta.app_label}/{model._meta.model_name}/' ``` However in the code above when the model name is passed it is FHRPGroupAssignment and therefor used in the URL. So I see two choices. 1. Create a wholly different page in Docs for FHRP Group Assignments. Though this seems like overkill for its own page. 2. Add some crazy one off catch all for pages like this, but now it less dynamic. I hate this idea but it is an option. 3. Add to the model to be able to define children so they can be called with /ParentModel/#Childname. The third choice seems daunting to me but could be quite helpful in the long run. @jeremystretch any ideas?
Author
Owner

@jeremystretch commented on GitHub (Mar 24, 2022):

This just needs a separate page in the docs. I'll take care of it.

@jeremystretch commented on GitHub (Mar 24, 2022): This just needs a separate page in the docs. I'll take care of it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6121