Cable Trace visual issue #10918

Closed
opened 2025-12-29 21:37:43 +01:00 by adam · 8 comments
Owner

Originally created by @krancslawomir on GitHub (Mar 19, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v.4.2.5

Python Version

3.11

Steps to Reproduce

Connect with each other 2 Devices with rear ports then set cable trace.

Image

Expected Behavior

99 should be on the left side and 100 on the right
Cables should not cross each other.

Observed Behavior

First of all the 99 should be on the left side and 100 on the right

Image

Besides that between ports 3,4 and 100,99 there are 2 cross-connections.
Unfortunately, they overlap each other.
The inscription Cable # 628 is a visual bug you can't see what is underneath.

Originally created by @krancslawomir on GitHub (Mar 19, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v.4.2.5 ### Python Version 3.11 ### Steps to Reproduce Connect with each other 2 Devices with rear ports then set cable trace. ![Image](https://github.com/user-attachments/assets/3d4a495a-08f0-42b7-aa22-67f54c1e5379) ### Expected Behavior 99 should be on the left side and 100 on the right Cables should not cross each other. ### Observed Behavior First of all the 99 should be on the left side and 100 on the right ![Image](https://github.com/user-attachments/assets/282e3faa-204f-4be5-be7b-b90f770244c6) Besides that between ports 3,4 and 100,99 there are 2 cross-connections. Unfortunately, they overlap each other. The inscription Cable # 628 is a visual bug you can't see what is underneath.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:37:43 +01:00
adam closed this issue 2025-12-29 21:37:43 +01:00
Author
Owner

@jnovinger commented on GitHub (Mar 26, 2025):

@krancslawomir , can you provide a complete and detailed list of steps to take to recreate this issue from an empty install of NetBox? I've tried in both 4.2.5 and 4.2.6 and am not having any luck reproducing the bug.

@jnovinger commented on GitHub (Mar 26, 2025): @krancslawomir , can you provide a complete and detailed list of steps to take to recreate this issue from an empty install of NetBox? I've tried in both 4.2.5 and 4.2.6 and am not having any luck reproducing the bug.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 3, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Apr 3, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@krancslawomir commented on GitHub (Apr 3, 2025):

I'm afraid it's impossible for me to recreate this issue from an empty install of NetBox.
My company's NetBox is full of production data.

I'll try to recreate this issue in the demo.netbox.dev and I'll let you know about results.

@krancslawomir commented on GitHub (Apr 3, 2025): I'm afraid it's impossible for me to recreate this issue from an empty install of NetBox. My company's NetBox is full of production data. I'll try to recreate this issue in the demo.netbox.dev and I'll let you know about results.
Author
Owner

@jeremystretch commented on GitHub (Apr 4, 2025):

I wonder if this is as simple as 100 being ordered before 99 because they're sorted as strings (1 being lesser than 9).

@jeremystretch commented on GitHub (Apr 4, 2025): I wonder if this is as simple as 100 being ordered before 99 because they're sorted as strings (1 being lesser than 9).
Author
Owner

@jakubsokolowski01 commented on GitHub (Apr 4, 2025):

Hello, I'm working with @krancslawomir and I managed to reproduce the problem on https://demo.netbox.dev/.
I started by creating Patch Panel (!TEST! ODF2) having 144 ports in the !TEST! rack.
The front ports are named [A-L][1-12]. Rear ports are named 1-144.
The second patch panel (!TEST! ODF3) having 24 ports I also added to the rack !TEST!
The front ports are named [1-12][a-b]. Rear ports are named Port[1-24].

Image

I connected Rear ports 105 and 106 of Patch Panel !TEST! ODF2 to Patch Panel !TEST! ODF3 rear ports 9 and 10 (the connection looks like this 105<->9 and 106<->10)

Image

Image

Then I added a new device (!TEST! DEV1) and in it I added interfaces.
In the next step, I connected interface C3 (!TEST! DEV1) to front ports 5a and 5b of Patch Panel !TEST! ODF3 (5a is connected to rear port 9, and 5b is connected to 10).

Image

Image

When you click “Trace”, in the screenshot below, you can see the replicated error.

Image

It looks like NetBox is swapping the order of the displayed back ports, causing this visual connection display error ( swaps the order of rear Port 10 with Port 9 !TEST! ODF3) Possibly related to what @jeremystretch writes

Image

@jakubsokolowski01 commented on GitHub (Apr 4, 2025): Hello, I'm working with @krancslawomir and I managed to reproduce the problem on https://demo.netbox.dev/. I started by creating Patch Panel (!TEST! ODF2) having 144 ports in the !TEST! rack. The front ports are named [A-L][1-12]. Rear ports are named 1-144. The second patch panel (!TEST! ODF3) having 24 ports I also added to the rack !TEST! The front ports are named [1-12][a-b]. Rear ports are named Port[1-24]. ![Image](https://github.com/user-attachments/assets/462dd5a7-55b7-4c1f-beb0-a66425cc1d29) I connected Rear ports 105 and 106 of Patch Panel !TEST! ODF2 to Patch Panel !TEST! ODF3 rear ports 9 and 10 (the connection looks like this 105<->9 and 106<->10) ![Image](https://github.com/user-attachments/assets/14f08c63-d3a4-4fc6-b18f-fe67c59564d7) ![Image](https://github.com/user-attachments/assets/d5c44391-ed36-4806-858e-a038cd76b533) Then I added a new device (!TEST! DEV1) and in it I added interfaces. In the next step, I connected interface C3 (!TEST! DEV1) to front ports 5a and 5b of Patch Panel !TEST! ODF3 (5a is connected to rear port 9, and 5b is connected to 10). ![Image](https://github.com/user-attachments/assets/ab4e338b-9e0f-4896-a3d3-fefa1c92dc4f) ![Image](https://github.com/user-attachments/assets/5dacb625-1d2a-4009-9a6c-7c49d10df194) When you click “Trace”, in the screenshot below, you can see the replicated error. ![Image](https://github.com/user-attachments/assets/8ec9f646-9219-415d-b16b-de0398f67282) It looks like NetBox is swapping the order of the displayed back ports, causing this visual connection display error ( swaps the order of rear Port 10 with Port 9 !TEST! ODF3) Possibly related to what @jeremystretch writes ![Image](https://github.com/user-attachments/assets/49453678-4a06-4241-b2b9-ccd4f9dabade)
Author
Owner

@jeremystretch commented on GitHub (Apr 4, 2025):

@jakubsokolowski01 if you rename Port 9 to Port 09 does it fix the ordering?

@jeremystretch commented on GitHub (Apr 4, 2025): @jakubsokolowski01 if you rename Port 9 to Port 09 does it fix the ordering?
Author
Owner

@jakubsokolowski01 commented on GitHub (Apr 4, 2025):

@jeremystretch Yes it fix the ordering.

Image

@jakubsokolowski01 commented on GitHub (Apr 4, 2025): @jeremystretch Yes it fix the ordering. ![Image](https://github.com/user-attachments/assets/a627c1f3-0e32-4283-94da-4a3a37b31504)
Author
Owner

@jeremystretch commented on GitHub (Apr 4, 2025):

Great, thank you. It seems like this is just a natural ordering issue with front & rear ports (not actually related to the cable trace). We should look into enabling natural ordering for all device components, similar to what we do for interfaces currently.

@jeremystretch commented on GitHub (Apr 4, 2025): Great, thank you. It seems like this is just a [natural ordering](https://en.wikipedia.org/wiki/Natural_sort_order) issue with front & rear ports (not actually related to the cable trace). We should look into enabling natural ordering for all device components, similar to what we do for interfaces currently.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10918