Thanks for mentioning this warning message.
I’ve created a GitHub issue so that I can investigate this further:
https://github.com/duracelltomi/gtm4wp/issues/121
I have the same issue as of yesterday. Don’t know what caused it and its killing me :S
We are still working on a fix, you can check the conversation on this GitHub PR:
https://github.com/duracelltomi/gtm4wp/pull/124
Hi Tomi,
How do I test on a sandbox site? I can check today.
Thanks!
Ricky
Hi Ricky,
Clone your live site so that all plugins, site data and options are kept.
On the sendbox site, you will need to access and modify one file in the plugin folder of GTM4WP: admin/admin.php
First, you will need to find the function called gtm4wp_show_warning()
Inside, you need to find this row:
$gtm4wp_user_notices_dismisses = get_user_meta( $current_user->ID, GTM4WP_USER_NOTICES_KEY, true );
Below you will need to change the block with this code:
if ( $gtm4wp_user_notices_dismisses === '' ) {
if ( is_array( $gtm4wp_def_user_notices_dismisses ) ) {
$gtm4wp_user_notices_dismisses = $gtm4wp_def_user_notices_dismisses;
} else {
$gtm4wp_user_notices_dismisses = array();
}
} else {
$gtm4wp_user_notices_dismisses = @unserialize( $gtm4wp_user_notices_dismisses );
if ( false === $gtm4wp_user_notices_dismisses || !is_array( $gtm4wp_user_notices_dismisses ) ) {
$gtm4wp_user_notices_dismisses = array();
}
}
$gtm4wp_user_notices_dismisses = array_merge( $gtm4wp_def_user_notices_dismisses, $gtm4wp_user_notices_dismisses );
Second, you will need to do the same in the gtm4wp_dismiss_notice()
function.