munkireport / munkireport-php

A reporting tool for munki
MIT License
393 stars 138 forks source link

Bug - custom.js is intermittently available #1011

Closed ofirgalcon closed 6 years ago

ofirgalcon commented 6 years ago

As far as I can tell this is what is occurring.

I'm still getting strange behaviour with custom.js - sometimes I see it, most times I don't.

bochoven commented 6 years ago

custom.js is just a static file served by your webserver. Could you elaborate on the issue?

ofirgalcon commented 6 years ago

I just used the sample custom.js - sometimes when I log in I can see the extra buttons it creates and sometimes not. It’s pretty random.

Ofir Gal consultancy Ltd www.galweb.com http://www.galweb.com/ Twitter http://twitter.com/galconsultancy#Skype iChat/AIM <aim:goim?screenname=galofir1> LinkedIn http://www.linkedin.com/in/ofirgal

On 12 Mar 2018, at 14:11, Arjen van Bochoven notifications@github.com wrote:

custom.js is just a static file served by your webserver. Could you elaborate on the issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/munkireport/munkireport-php/issues/1011#issuecomment-372322750, or mute the thread https://github.com/notifications/unsubscribe-auth/AP5NGO32NT5n_fA-Fxp6tq-gSvDAnZu2ks5tdoICgaJpZM4Smipu.

ofirgalcon commented 6 years ago

I still can't get custom.js to work, I put a copy of it in every possible location and still no joy. I am hosting this as an addon cpanel domain.

When I look at the source code in my browser I don't see a custom.js file. No error is displayed in the safari console.

bochoven commented 6 years ago

Try putting the full url in the config:

$conf['custom_js'] = 'https://fqdn/path/to/custom.js';
ofirgalcon commented 6 years ago

I tried that - when I do I see a custom.js is the browser source but it's not my custom.js, it appears to be the default one - from what I can tell it's the code for the default page (it has the favicons definitions at the top). My custom.js is not showing.

ofirgalcon commented 6 years ago

So strange, sometimes see a custom.js in the browser, sometimes I don't, but it's never the one I want.

ofirgalcon commented 6 years ago

OK so I served the file from a different domain on same server that doesn't have the htaccess redirect and web.config, just a plain clean domain and now it works. It seems to me something about the way MR redirects things confuses my web server.