• Resolved cosbe

    (@becosfx)


    Hi!

    I have used Script Center (Block a script, iframe or plugin) to target either CSS or ID of the DIV that contains a theme’s feature to display Youtube Videos (it is the outer container for that feature, which can be a gallery, a slider, a full page video, etc.), but it only works occasionally.

    I can’t figure out why sometimes it is working while most of the time it doesn’t. Curiously, even when it is working and the placeholder is displayed, a simple reloading of the page will make it disappear and then not appear again even if the consent is re-accepted/denied.

    I tried every possible combination in the available settings: targeting CSS or ID, with and without dependency… it is usually not working, only rarely works. And I can’t figure out why.

    What works ok though is the blocker enabled for Youtube as a Service, but that only works for regularly embedded videos. I assume it blocks the default iframe just fine. But I don’t want to display the videos in square boxes throughout the pages… I was hoping to have complianz work with another method of displaying videos. And although the Script Center (Block a script, iframe or plugin) seems to be just the feature for that, I can’t make it work.

    I deactivated and reactivated the plugin, stopped any other plugins that use Ajax, I uninstalled Lightspeed, so there is no cache involved… to no avail.

    I don’t know what else to do.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor jarnovos

    (@jarnovos)

    Hi @becosfx,

    Currently I see a correctly blocked YouTube element on the attached page, the remaining one seems to be a “Slider” element added by your theme (and therefore it is likely not covered by the default YouTube integration).

    The latter will require a custom integration, such as by blocking the script that initializes this slider/video, under Complianz > Integrations > Script Center > Block a script, iFrame or Plugin.

    It appears that the slider is loaded by a script znpb_frontend, so you could try using that as the “Script/URL to Block” in your integration. But note that that theme script might contain more functionality than just the sliders, which would therefore also be blocked before obtaining consent.

    Kind regards, Jarno

    Thread Starter cosbe

    (@becosfx)

    Hi! Thank you for replying.

    As I wrote, targeting the slider’s unique css class or ID of the div container doesn’t do anything most of the time, but sometime, this works.

    Currently, I am targeting the ID of the div, which is the most external container of the slider and is provided by the slider setup for this very purpose, to manipulate/format its content.

    The question is why sometime it works but then a simple page refresh/reload eliminates the css inserted by complianz on the same container?

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @becosfx,

    I can’t say that I’ve seen that before. Are you possibly targeting an ID or class which isn’t always the exact same, so the placeholder is only added in certain cases?

    Kind regards, Jarno

    Thread Starter cosbe

    (@becosfx)

    Hmm… for other elements I don’t have the option to selectively change the ID which is generated to be the same as the element’s css class name. But for the one that you can see down the page, I can change the ID, which I did. The first css class that looks like randomly named, is the one I targeted previously. But now I target the ID. So for this element, the css name and the ID are different.

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @becosfx,

    Assuming that your question concerns the slider, i.e. the YouTube implementation (second video on the page) from your theme, I would try using one of these classes to add the placeholder: zn-iosSliderEl or zn-iosSlider.

    Or add your own <div> with a custom class around the element in question, and target that instead.

    Kind regards, Jarno

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Targeted CSS/ID in the Script Center only occasionally working’ is closed to new replies.