Support » Plugin: GDPR » I can’t deactivate plug-in

  • Resolved andreagilfone

    (@andreagilfone)


    Hi,
    when I try to deactivate this plugin, my homepage and all the pages of my site are white. No error, no lock, no code, nothing, a completly white page.

    • This topic was modified 3 years, 2 months ago by andreagilfone.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Fernando Claussen

    (@fclaussen)

    Hmm.. That’s odd.

    Since I can’t ask for access I will try to guide you into how to get an error message.

    Go into your FTP, open the file wp-config.php

    Enabling debugging: https://codex.wordpress.org/WP_DEBUG
    Follow the steps in the link above.

    Repeat the steps that cause the error. See if any errors show up in the screen and/or if a file called debug.log was created inside the wp-content folder.

    Please share the error message found using this method.

    Thread Starter andreagilfone

    (@andreagilfone)

    My error on deactivating GDPR.

    Fatal error: Uncaught Error: Call to undefined function is_allowed_cookie() in /web/htdocs/www.eurosudsrl.com/home/wp-content/themes/x-child/functions.php:24 Stack trace: #0 /web/htdocs/www.eurosudsrl.com/home/wp-includes/class-wp-hook.php(286): analytics('') #1 /web/htdocs/www.eurosudsrl.com/home/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 /web/htdocs/www.eurosudsrl.com/home/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /web/htdocs/www.eurosudsrl.com/home/wp-includes/general-template.php(2614): do_action('wp_head') #4 /web/htdocs/www.eurosudsrl.com/home/wp-content/themes/x-child/framework/views/global/_header.php(16): wp_head() #5 /web/htdocs/www.eurosudsrl.com/home/wp-content/themes/x/framework/functions/global/view-routing.php(182): include('/web/htdocs/www...') #6 /web/htdocs/www.eurosudsrl.com/home/wp-content/themes/x/framework/functions/global/view-routing.php(55): X_View_Router::render('/web/htdocs/www...', Array, true) #7 /web/htdocs/www.eurosudsrl.com/home/wp-content/the in /web/htdocs/www.eurosudsrl.com/home/wp-content/themes/x-child/functions.php on line 24

    EDIT: in function.php I’ve found a code that I’ve written:

    /*Stop Analytics GDPR	*/
    add_action( 'wp_head', 'analytics' );
    function analytics() {
      if ( ! is_allowed_cookie( '_ga' ) ) {
        ?>
        <script>
          window['ga-disable-UA-75618759-1'] = true; 
        </script>
        <?php
      }
    }
    
    /*End Stop Analytics GDPR*/

    Resolved. The problem was there.

    • This reply was modified 3 years, 2 months ago by andreagilfone. Reason: Resolve
    • This reply was modified 3 years, 2 months ago by andreagilfone.
    Plugin Author Fernando Claussen

    (@fclaussen)

    Yes. If you are removing the plugin you need to undo the changes.

    Or, for reference, in the future you could wrap these type of functions in something like.

    if( function_exists( 'is_allowed_cookie' ) ) {
    // your code
    }

    That would prevent these kind of errors.

    Plugin Author Fernando Claussen

    (@fclaussen)

    Don’t forget to turn debugging off. Having it set to ON will slow your site down.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I can’t deactivate plug-in’ is closed to new replies.