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
Anonymous User 14701108
(@anonymized-14701108)
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 6 years, 9 months ago by
Anonymous User 14701108. Reason: Resolve
-
This reply was modified 6 years, 9 months ago by
Anonymous User 14701108.
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.
Don’t forget to turn debugging off. Having it set to ON will slow your site down.