opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.36k stars 754 forks source link

firmware: /ui pages miss css/js after upgrade #342

Closed gitdevmod closed 9 years ago

gitdevmod commented 9 years ago

web page with https://fw/ui/ does not display correctly ex: https://fw/ui/core/firmware/#checkupdate it takes around 10sec to display the page capture d ecran_2015-08-25_21-16-12

System: OPNsense 15.7.9-i386 FreeBSD 10.1-RELEASE-p17 LibreSSL 2.2.2

fichtner commented 9 years ago

We've seen this one other time, the package contents not being installed correctly. Can you check if your disk is full:

# df -h

Console root menu option 12 should upgrade to 15.7.10 ok and fix the GUI if it wasn't due to a full disk. Note that the 15.7.10 update will reboot.

gitdevmod commented 9 years ago

It's a vbox dynamic disk of 10GB, root@OPNsense:~ # df -h Filesystem Size Used Avail Capacity Mounted on /dev/ada0s1a 9.7G 809M 8.1G 9% / devfs 1.0K 1.0K 0B 100% /dev devfs 1.0K 1.0K 0B 100% /var/dhcpd/dev

I installed OPNsense from OPNsense-15.7_LibreSSL-cdrom-i386.iso, updated to 15.7.9 from the console menu then updated to 15.7.10 from console menu, the bug still remains

fichtner commented 9 years ago

Browser cache maybe? We moved themes around. E.g. Firefox cache handling is very sticky. Try another browser, close and reopen, maybe empty cached css and javascript.

mschilt commented 9 years ago

Screenshot looks like a problem I also experienced (somehow the theme was set to 'pfsense_ng' instead of 'opnsense'. (had to set it to 'simple' and then back to 'opnsense' to restore it completely but this does not work anymore since 'simple' theme is gone with 15.7.10).

@gitdevmod could you try this: Connect to the box by using your browsers dev tools/network. Watch if you get any 404 back and have a look at the URL of that file (most probably a css file). Do you see any references to the 'simple' or the 'pfsense_ng' theme?

fichtner commented 9 years ago

The pfsense_ng issue happens when a pfsense config was imported and affects all pages. It reads like this only happens on the firmware upgrade page?

gitdevmod commented 9 years ago

@fichtner I tried firefox and chrominium with removing cache and still the same. It was also the case from ui/proxy @mschilt I tried to change the theme to simple and did not see anything I switched then back to opnsense. The issue is now resolved since I selected opnsense theme (only one theme in the list like you said) in settings page and applied In source code of the ui/firmware page there is no reference to pfsense_ng

fichtner commented 9 years ago

@mschilt @gitdevmod is this somehow reproducible? the workaround described by @mschilt seems odd, it points to a bug in the theme load process we've been unable to trigger locally.

gitdevmod commented 9 years ago

@mschilt from the opnsense installation there is no access.log file at least in /var/log/lighttpd directory

fichtner commented 9 years ago

@gitdevmod last question for today, was the full GUI affected or only the /ui parts? Sorry, I guess you already answered that with /ui only. :)

mschilt commented 9 years ago

@gitdevmod great that it is now solved. @fichtner Happened to me the last time when I was updating (there is another 'issue' regarding the messed up interface order, etc.). For me only the new parts of the gui were affected (/ui/)

fichtner commented 9 years ago

Thanks guys, keeping this open for further investigation.

gitdevmod commented 9 years ago

@fichtner if I recall correctly, possible way to reproduce: install 15.7 then upgrade to 15.7.9 select simple theme then change back to opnsense ui/ display issue appears update to 15.7.10 still the same select again opnsense in settings page then apply and ui/ page works now

AdSchellevis commented 9 years ago

Found the issue, the new code handled an empty theme tag differently. Fixed in https://github.com/opnsense/core/commit/358318954034bf5a9410c3bd05346fbcd73b7ace

fichtner commented 9 years ago

Could reproduce... closed, thanks!