Tagged: Cookie Consent
-
AuthorPosts
-
January 7, 2020 at 1:31 am #1170872
Hi guys,
Something happened to the Schema markup. The Cookie consent is marked as WebPage but it has a BlogPost property and it throws 16 errors and more warnings.
Here’s the first error: The property blogPost is not recognized by Google for an object of type WebPage
And one screenshot:
I turned off the Cookie Consent message but I am still getting this. Please, help!!
Thank you!!
Havi
PS: Happy 2020!!!January 7, 2020 at 12:06 pm #1171010Hey havi,
Thank you for the inquiry.
Is that the home page? We didn’t find any errors in it when we tested it in the structured data testing tool.
Best regards,
IsmaelJanuary 11, 2020 at 1:15 am #1172322Hi Ismael!
Actually, it doesn’t happen on the pages but on the blogs. Pick any blog post and it throws the error.
Sent you a link on the Private Content Section
Thank you!!
Havi
January 13, 2020 at 8:21 am #1172684Hi,
Thank you for the update.
Try to add this snippet in the functions.php file to unset the itemtype attribute of the body tag in the single post pages.
function avf_markup_helper_attributes_modified($attributes, $args) { if( $args['context'] == 'body' && is_singular('post') ) { unset($attributes['itemtype']); unset($attributes['itemscope']); } return $attributes; } add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_modified', 10, 2);
Best regards,
IsmaelJanuary 14, 2020 at 6:49 pm #1173560Hi Ismael!
It did remove the markup for the cookie consent but a new one showed up.
Before code:
After adding code to functions.php
Thank you!!
Havi
January 15, 2020 at 4:14 am #1173774Hi,
Thank you for following up.
We are getting the same set of errors when we ran the staging site in the tool. Can we have access to the site? Please post the login details in the private field. And make sure that the Appearance > Editor panel is accessible.
Best regards,
IsmaelJanuary 16, 2020 at 1:04 am #1174723Hi Ismael,
Sending them your way!!
Thank you!
Havi
January 16, 2020 at 10:29 am #1174825Hi,
Thank you for the info.
It seems to be an issue with the privacy tabs. We replaced the filter in the functions.php file with the following code.
function avf_markup_helper_attributes_modified($attributes, $args) { if(is_singular('post')) { if( ( $args['context'] == 'body' || $args['context'] == 'entry' ) && $args['custom_markup'] != 'article') { unset($attributes['itemtype']); unset($attributes['itemscope']); unset($attributes['itemprop']); } } return $attributes; } add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_modified', 10, 2);
Please edit the includes > loop-index.php file, look for this code around line 144:
echo "<article class='".implode(" ", get_post_class('post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo'=>false).">";
Replace it with:
echo "<article class='".implode(" ", get_post_class('post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo'=>false, 'custom_markup' => 'article')).">";
This should remove the markup in the privacy tabs.
Best regards,
IsmaelJanuary 16, 2020 at 7:57 pm #1175169Hi Ismael!
It worked like a charm! Should I create a folder called includes on the Child Theme and drop the modified loop-index.php file in there? Or do we want this to stay only until the next Enfold release?
Thank you!!
Havi
January 18, 2020 at 2:42 am #1175736Guys,
Markup cannot be tested and getting a search console error: Logo missing url on markup.
I’m removing the changes from the live site but you can see them on the staging site.
Reviewed further and it seems to happen only on this post – also, the sidebar shows up on the bottom?: https://staging-conversionsciencesdev.kinsta.cloud/visualizing-your-marketing-and-sales-process/ (happens both on the live and staging sites)
Havi
- This reply was modified 4 years, 11 months ago by havi. Reason: Found more info
January 19, 2020 at 10:18 pm #1176136Hi Ismael,
Do I have to apply the exact same fix to all of the sites I manage? I think this is a bug.
My other sites do not have staging areas so I will not update Enfold for them. I don’t want to ruin the markup. I also found some kind of hiccup on the live site and got a notification from Search Console “no Logo” seems to happen only on this post where the sidebar shows up on the bottom?: https://staging-conversionsciencesdev.kinsta.cloud/visualizing-your-marketing-and-sales-process/ (happens both on the live and staging sites same post)
Please help!
Thank you!
Havi
January 20, 2020 at 3:34 am #1176178Hi,
Thank you for following up.
Reviewed further and it seems to happen only on this post – also, the sidebar shows up on the bottom?: visualizing-your-marketing-and-sales-process/
Did you enable the schema markup option of another plugin (e.g Yoast)? The markup with the error is not generated by the theme.
Reviewed further and it seems to happen only on this post – also, the sidebar shows up on the bottom?: visualizing-your-marketing-and-sales-process/
We found a lot of html code in the page, so it is possible that there are unclosed or invalid tags in it. Please check the markup and make sure that all tags are closed properly.
Also, if possible, please open a new thread for additional inquiries so that we can close this thread and keep it relevant to the original topic.
Best regards,
IsmaelJanuary 31, 2020 at 12:45 am #1180119Hi Ismael!
Yes, you were right. That was the first thing I did (clean up that code) but I missed one div. Back to the original topic: Do I have to apply the exact same fix to all of the sites I manage? Or was this fixed on 4.7.2?
Thank you!!!
Havi
January 31, 2020 at 10:26 am #1180204 -
AuthorPosts
- You must be logged in to reply to this topic.