Pagination not working #6384

Closed
opened 2025-12-29 19:40:04 +01:00 by adam · 2 comments
Owner

Originally created by @LordVeovis on GitHub (Apr 20, 2022).

NetBox version

v3.2.0,v3.2.1

Python version

3.9

Steps to Reproduce

  1. Use the docker image netboxcommunity/netbox:v3.2-ldap
  2. Create 100 random elements of the same type (ips for instance)
  3. Change the number of displayed element with the dropdownlist at the bottom-right of the page

Expected Behavior

Pagination (dropdown list to select the number of displayed element on a page or selecting a ) should work.
Same goes when selecting a page.

Observed Behavior

Nothing is happening, no js errors on Chrome.

Analysis

I suspect the htmx.js is not loaded. I was able to fix this with this as root:

cd /opt/netbox/netbox
wget -O static/htmx.min.js 'https://unpkg.com/htmx.org@1.7.0/dist/htmx.min.js'

and applying this diff

--- ./templates/base/base2.html
+++ ./templates/base/base.html
@@ -26,6 +26,7 @@
     {# Page title #}
     <title>{% block title %}Home{% endblock %} | NetBox</title>

+    <script src="/static/htmx.min.js" defer></script>
     <script type="text/javascript">
       /**
        * Set the color mode on the `<html/>` element and in local storage.
Originally created by @LordVeovis on GitHub (Apr 20, 2022). ### NetBox version v3.2.0,v3.2.1 ### Python version 3.9 ### Steps to Reproduce 1. Use the docker image netboxcommunity/netbox:v3.2-ldap 2. Create 100 random elements of the same type (ips for instance) 3. Change the number of displayed element with the dropdownlist at the bottom-right of the page ### Expected Behavior Pagination (dropdown list to select the number of displayed element on a page or selecting a ) should work. Same goes when selecting a page. ### Observed Behavior Nothing is happening, no js errors on Chrome. ### Analysis I suspect the htmx.js is not loaded. I was able to fix this with this as root: ```bash cd /opt/netbox/netbox wget -O static/htmx.min.js 'https://unpkg.com/htmx.org@1.7.0/dist/htmx.min.js' ``` and applying this diff ```diff --- ./templates/base/base2.html +++ ./templates/base/base.html @@ -26,6 +26,7 @@ {# Page title #} <title>{% block title %}Home{% endblock %} | NetBox</title> + <script src="/static/htmx.min.js" defer></script> <script type="text/javascript"> /** * Set the color mode on the `<html/>` element and in local storage. ```
adam closed this issue 2025-12-29 19:40:04 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 20, 2022):

Use the docker image netboxcommunity/netbox:v3.2-ldap

This repository accepts bug reports only for stable releases of the NetBox core project. If you're experiencing an issue with a particular Docker build, please raise an issue under netbox-docker.

As this issue does not appear to be reproducible using the core project (you can verify on the public demo), I'm going to close this out.

@jeremystretch commented on GitHub (Apr 20, 2022): > Use the docker image netboxcommunity/netbox:v3.2-ldap This repository accepts bug reports only for stable releases of the NetBox core project. If you're experiencing an issue with a particular Docker build, please raise an issue under [netbox-docker](https://github.com/netbox-community/netbox-docker). As this issue does not appear to be reproducible using the core project (you can verify on the [public demo](https://demo.netbox.dev/)), I'm going to close this out.
Author
Owner

@LordVeovis commented on GitHub (Apr 20, 2022):

Thank you for pointing me out in the right project. After more investigation on my side, it was because I had /opt/netbox/netbox/static on a volume to share the content with our nginx frontend.

@LordVeovis commented on GitHub (Apr 20, 2022): Thank you for pointing me out in the right project. After more investigation on my side, it was because I had /opt/netbox/netbox/static on a volume to share the content with our nginx frontend.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6384