• Resolved DogHustler

    (@doghustler)


    Hey!

    I’m having a problem. The pop up (modal) shows on the cookie policy page that I have selected in the plugin settings.

    I’ve tried deleting browser cache etc and have reloaded the page several times, with no luck.

    Any help would be appreciated!

    //Dan

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Johan Jonk Stenstr?m

    (@jonkastonka)

    I just tried it but it works fine on my testing sites. Can you send me the URL to where the problem occurs?

    Thread Starter DogHustler

    (@doghustler)

    Plugin Author Johan Jonk Stenstr?m

    (@jonkastonka)

    What I think is happening is that your theme is overwriting the classes of the body element.

    I add a class to body if the visitor visits the chosen policy page in cookies-and-content-security-policy.php:

    if ( $post->ID == get_cacsp_options( 'cacsp_option_settings_policy_link' ) ) {
     $classes[] = 'modal-cacsp-do-not-show-cookie-modal';
    }

    The javascript for showing the modal looks for this, and if it’s not there, the modal is shown.

    Thread Starter DogHustler

    (@doghustler)

    Thanks for the replies and help!

    I’m starting to get really confused now, this is super strange… =)

    The website gets the .modal-cacsp-open class, so that one is now overwritten, but for some reason .modal-cacsp-do-not-show-cookie-modal is.

    I have tried deactivating all plugins but still not working.

    I have also tried manually removing all scripts in the source code and everything in the functions.php without getting it to work.

    I must be missing something, but can’t figure out what it is that is breaking the plugin.

    When I change to a standard theme it works, so you must be correct in thinking it has something to do with the theme…

    //Dan

    Plugin Author Johan Jonk Stenstr?m

    (@jonkastonka)

    .modal-cacsp-open is added from javascript, that is a difference.

    So most likely the theme is deleting the classes from php, and then adding classes via javascript. I tested this by disabling javascipt and then body has no classes at all, this can also be seen if you visit view-source:https://www.egetis.com/cookie-policy/.

    So you need to debug your theme and fix accordingly.

    Thread Starter DogHustler

    (@doghustler)

    Yeah, that’s why I’m so confused. We built this theme from the ground up, so there are no functions that delete or alter any classes (unless they come from the core WordPress installation or one of the plugins used).

    I don’t think I will be able to figure this one out with my knowledge level, unfortunately. I will have to change to another cookie plugin…

    I think your plugin is the best one I’ve tried, though, so I’ll continue using it in the future! =)

    Thanks for the help and directions!

    //Dan

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cookie policy page shows the pop up banner’ is closed to new replies.