Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sporadically broken HTML formatting since at least 3.5.0 #12760

Closed
stavr666 opened this issue May 30, 2023 · 9 comments · Fixed by #13028
Closed

Sporadically broken HTML formatting since at least 3.5.0 #12760

stavr666 opened this issue May 30, 2023 · 9 comments · Fixed by #13028
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@stavr666
Copy link

NetBox version

v3.5.1

Python version

3.10

Steps to Reproduce

Spontaneously observed behavior:

  1. Open any list
  2. Click to any object
  3. Press "Go back" (or ALT+←) in browser

Expected Behavior

List will be rendered as usual.

Observed Behavior

Loaded only part of page, without sidebar, with empty head tag:

image

@stavr666 stavr666 added the type: bug A confirmed report of unexpected behavior in the application label May 30, 2023
@DanSheps
Copy link
Member

Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.5.2 (Also not able to reproduce on 3.5.1). Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.

@DanSheps DanSheps added the status: revisions needed This issue requires additional information to be actionable label May 30, 2023
@arthanson
Copy link
Collaborator

I have seen this also from time-to-time recently. I thought it was just some glitch when I was debugging stuff so didn't bother to track it down, but I have seen this several times. On a Mac using chrome browser, not sure if that has anything to do with it.

@jeremystretch jeremystretch changed the title [HTML] Rarely broken formatting since at least 3.5.0 Rarely broken HTML formatting since at least 3.5.0 May 30, 2023
@abhi1693
Copy link
Member

I don't think it's a bug with netbox. Just how browsers load the css and js. When you click back, if the styling is not loaded this happens and I have seen it on other sites too.

@DanSheps
Copy link
Member

DanSheps commented May 30, 2023

Yeah, I tried it with Chrome on both my prod and the demo and no joy. It could also be browser specific.

I think I may have seen it before too, and when I encountered it I thought at the time it was just a glitch with the HTMX request.

@stavr666
Copy link
Author

Please re-confirm the reported behavior on the current stable release

It's totally reproduceable in 3.5.0, 3.5.1, 3.5.2. I encountered it dozen time my own production installation (3.5.0, 3.5.1) and at least once in every 3 versions on your Demo-site, during my check of some conceptions before generating other reports there.

But I agree with @abhi1693 that it's look like browser-related (3 different Chromium-based), because it never reproduceable on repeat (forward-back buttons).

@DanSheps
Copy link
Member

DanSheps commented May 31, 2023

Honestly, the lack of HTML in the screenshot makes me think it is the browser replaying a HTMX request, which results in only a partial HTML being sent and it glitching. (You only get the table, not anything else like the nav menu)

If we had a consistent way to reproduce this, we could maybe track it down better.

@jeremystretch jeremystretch changed the title Rarely broken HTML formatting since at least 3.5.0 Sporadically broken HTML formatting since at least 3.5.0 Jun 2, 2023
@kkthxbye-code
Copy link
Contributor

Probably similar to this:

bigskysoftware/htmx#1201

I can reliably recreate it by going to the device list, order the table by a column, closing the tab and then hitting ctrl+shift+t in chrome (re-open closed tab). This only renders the table, without css.

Anyway, there's some context if anyone wants to look into it. There's some suggestions in the linked issue.

@DanSheps
Copy link
Member

DanSheps commented Jun 5, 2023

Looks like we might just need to use the cache-busting params.

@jeremystretch jeremystretch added status: under review Further discussion is needed to determine this issue's scope and/or implementation status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: revisions needed This issue requires additional information to be actionable status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jun 14, 2023
@jeremystretch
Copy link
Member

This seems like it can be addressed by setting the Vary: HX-Request response header as described here.

@jeremystretch jeremystretch added the severity: low Does not significantly disrupt application functionality, or a workaround is available label Jun 23, 2023
@DanSheps DanSheps self-assigned this Jun 27, 2023
@DanSheps DanSheps added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Jun 27, 2023
DanSheps added a commit that referenced this issue Jun 27, 2023
…RL and the HX-Request header (or lack thereof)
jeremystretch pushed a commit that referenced this issue Jun 29, 2023
…RL and the HX-Request header (or lack thereof)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants