-
Notifications
You must be signed in to change notification settings - Fork 9
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
Big button and little button on the Navbar at the same time with OctoPrint 1.4.1rc2 #14
Comments
There are no entries in config.yaml for this plugin. |
Concur, I saw that as well. I ended up having to restart in safe mode, as SES is not the only plugin which seems to have issues. |
Any logs/error in the chrome devTools Console ? (F12 to open) I can't reproduce the issue on my setup |
I guess it's more insidious than I thought. Chrome Version 83.0.4103.116 (Official Build) (64-bit) works. FireFox 78.0.1 (64-bit) does not. It displays both buttons. Neither button has a tooltip on mouseover and neither button works. With OctoPrint 1.4.0, the plugin was working in FireFox, With OctoPrint 1.4.1rc2 it doesn't. I have a second RPi loaded with OctoPi which hasn't been updated yet (in fact, I think it's hosed as I can't login atm). I'll get that working again and recheck with OctoPrint 1.4.0. |
Verified the conflict occurs when enabling Below is the console log:
|
FYI, the issue is that something inside this plugin's JS files doesn't sit well with being minified through OctoPrint. Minification got reenabled as part of a PR that got included in 1.4.1rc1 and rc2. Considering this observed breakage here I guess I need to disable it again. |
It might cause SyntaxErrors in third party plugins that cannot be caught by the system and which then nuke ALL other third party plugins. See Sebclem/OctoPrint-SimpleEmergencyStop#14 and FormerLurker/Octolapse#567 This change can manually be applied by setting ``` yaml devel: webassets: minify: false ``` in config.yaml
@foosel Can i do something on my side to prevent this ? Or are you planing to keep minification off ? |
It's off by default for third party plugins, but there's a setting in You certainly should make sure your plugin works minified too, so turn it on and check what is breaking there exactly and fix it. Usually it's something like a forgotten |
@foosel I think it's more an Octolaps issue. I have setup a dev server to fix this issue and if i only install the Octolaps plugin, i have an error un firefox:
If i only install my plugin, there is no issue. I also have checked my JS file and add some missing |
Ah, then @FormerLurker also needs to check something there. |
@foosel, I will take a look at this. I would prefer my code to be minified too :). I was running it with the minification with one of the earlier releases and didn't notice any syntax errors, but will try it with this plugin installed and see what's going on. @Sebclem, as a workaround you could disable the octolapse navbar icon within the Octolapse main settings and see if that solves the issue temporarily. |
@Sebclem, I just saw this and realized I forgot to post my findings. I tracked the issue down to one of three files: jquery.minicolors.min.js Not sure yet which one is the culprit, but it appears the minifier has trouble with previously minified code. I ran this script through the .net bundler, and it didn't have any issues. It doesn't look like it touches any files ending with .min.js, which I believe is the appropriate way to handle this. Also, fyi, just to double check, I added all missing semicolons to all 3 of those files, which made no difference. The minification process typically strips out the final semicolon in a block, and it was those that I re-added. TLDR: Replacing all of the .min.js files with non-minified content solved the error you were seeing. There were several missing semicolons in my own files, but none that would trigger any syntax error. Adding those made no difference. |
I upgraded from 1.4.0 to 1.4.1rc2 (I skipped rc1) and now both the big button and the little button are on the Navbar at the same time. Furthermore, the setting for which button to display doesn't appear to work.
The text was updated successfully, but these errors were encountered: