• Resolved piccart

    (@piccart)


    Hello,

    I’ve tweaked some colours in the Banner’s options and I can see our colours are saved. But in frontend it still looks the same as with default colours.

    I’ve noticed there is an error in the console saying:

    Refused to apply style from <URL> because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.

    It seems that this error could also happen if the stylesheet is not found and so the mime type is actually an html error.

    the <URL> is always pointing to the current page url with /# at the end, like:

    https://domain.com/current-page/#

    any ideas?

    thanks for your help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter piccart

    (@piccart)

    I investigated a bit more and I did find the css files into our CDN at this path:

    /uploads/complianz/css/banner-1-optin.css

    I can also see the the stylesheet is included in the head in frontend and the url is correctly pointing to the CDN.

    The url has a version appended, but if I paste that url in my browser I can see the content of the file. And the css rules in there don’t contain my colours, but rather they have the default ones.

    In admin I can see it’s including the file banner-preview-1-optin.css and, oddly enough, it does contain our customised colours but the preview is still showing with the default colours…

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @piccart,

    Going by the error you attached, MIME type (‘text/html’) is not a supported stylesheet MIME type, it does indeed sound like something else is being loaded instead of the CSS file (it could be a 404 page for example).

    I would recommend starting by clearing cache/CDN, and if you additionally provide an URL to the website in question; that would allow us to take a closer look as well.

    Kind regards, Jarno

    Thread Starter piccart

    (@piccart)

    hello @jarnovos and thanks for your reply!

    Unfortunately the website is on staging and it’s not public at the moment…

    Though I can see the css file is actually being loaded in frontend and therefore it doesn’t seem to be the origin of the error.

    /uploads/complianz/css/banner-1-optin.css?v=27

    Is the plugin loading other css files which might be erroring out?

    Maybe the problem is the fact that if I click on the link to see the included file, it contains the default colours rather than my custom colours. That could suggests an issue when generating the styles maybe? or do you load the customisations from a separate file?

    Thread Starter piccart

    (@piccart)

    Hello again!

    so in the end I’ve realised that the file was being cached by Cloudfront before hitting the cdn. Now I’ve tweaked a couple of settings and the frontend popup is picking up my custom styles correctly.

    though I can still see that error about the mime / missing stylesheet… I’ve tried deactivating the plugin and the error doesn’t show up. I can see it’s loading this file correctly as well:

    /content/plugins/complianz-gdpr/assets/css/cookieblocker.min.css?ver=6.4.2

    what other stylesheet could be erroring out?

    I’ve also noticed that when I click to Accept the cookies, it throws another error in the console

    “Uncaught ReferenceError: vgo is not defined”

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @piccart,

    If both ‘cookieblocker.min.css’ and ‘banner-1-optin.css’ are being loaded, not sure what Complianz CSS file your error would otherwise refer to. It’s a bit challenging to say what could cause that error without being able to see it occur.

    For your other console error, it sounds like you have a blocked Marketing script which loads after consent, and it then tries to call the ‘vgo’ variable which is not defined or loaded yet.

    If we can view the site in question, that would allow us to get a better idea of what the cause could be.

    Kind regards, Jarno

    Thread Starter piccart

    (@piccart)

    Hello @jarnovos

    After some investigation I’ve realised that vgo() is a method found in ActiveCampaign tracking scripts.

    The problem is that we use ActiveCampaign only to embed a form, and we haven’t enabled the tracking logic, so that js library is not loaded. But when I selected AC plugin during the Wizard setup, Complianz was assuming that it had to fire that script after the cookies are accepted.

    So I have now disabled Active Campaign from the Integrations section, and I just mention it in the list of Services. I think that would be enough for GDPR because the data is sent to AC only if the user actively submits the form to subscribe to the newsletter. I think there is no need to block anything before consent.

    though if possible, it would probably be better if Complianz’ script had a check for the existence of vgo() before trying to fire it, as it’s just an optional feature of Active Campaign. ??

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @piccart,

    Thank you for sharing this additional feedback. For a future release of the plugin, we will investigate a check to prevent the “vgo() is undefined” error from occurring with ActiveCampaign implementations that do not use the tracking JavaScript.

    Thanks again for bringing this to our attention ??

    Kind regards, Jarno

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Colours and styles are not applied’ is closed to new replies.