- This topic has 8 replies, 3 voices, and was last updated 4 years ago by Tom.
-
AuthorPosts
-
April 8, 2020 at 5:05 am #1231074Michael
Hi guys,
I’m working through W3C validation tests for the site, and am getting some errors on blog pages that I don’t appear to have control over eg https://validator.w3.org/nu/?doc=https%3A%2F%2Freclaimdesign.org%2Fcommissioned-work%3Fao_noptimize%3D1
The results mention autocomplete=”nope” as being an error for the text area. Shouldn’t that be “off”? And there were several errors relating to ItemProp – that’s microdata markup isn’t it? If it is, I don’t understand how it’s in there because I turned off schema with
add_filter( 'generate_schema_type', '__return_false' );
Also x-dns-prefetch-control errors apparently.Please could you help me resolve these?
Michael.
April 8, 2020 at 9:34 am #1231546DavidStaffCustomer SupportHi there,
that autocomplete attribute is not coming from GP’s Comment text field. Something else maybe a Spam Protection or SEO plugin has inserted a hidden Text Field.
Schema – do you have any custom functions that may be including the some itemProps attributes ?
April 8, 2020 at 11:13 am #1231663MichaelHi David, I’ve been researching this afternoon, and it looks like autocomplete=βnopeβ might have something to do with AntiSpam Bee plugin, so I’ve written to them to ask for more info.
Thank you for your suggestion about the custom snippets. To be honest I couldn’t see anything amiss when I looked over them, but as you suggested this as a possible cause I disabled all of them and started to add back in one by one, and lo and behold you are right! It’s this one that is the culprit from RankMath:
/* Version2 * * Filter to add plugins to the TOC list. * * @param array TOC plugins. */ add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) { $toc_plugins['seo-by-rank-math/rank-math.php'] = 'Plugin Name'; return $toc_plugins; });
I will write to them now. Thank you very much for pointing me in the right direction!
April 8, 2020 at 11:35 am #1231682MichaelHi David,
I got it wrong, it looks like it is actually a GP code snippet to turn off schema which is causing the itemprop error:
add_filter( 'generate_schema_type', '__return_false' );
I initially thought it was RankMath’s snippet, but that was due to the cache not clearing instantly (so I ran the test too quickly again, and the RankMath snippet was next in line from the GP one, is what I mean!)
I have double checked, and with the GP snippet disabled, the itemprop errors are no longer flagged.
Please could you help me fix it?
Thank you π
Michael.
April 8, 2020 at 7:13 pm #1231982TomLead DeveloperLead DeveloperHi there,
What are the specific itemprop errors you’re getting?
April 9, 2020 at 3:40 am #1232283MichaelHello Tom,
Thanks for getting back to me. I’ve turned the GP Schema Off code snippet back on, and re-run the validation for:
And these are the itemprop errors I get:
https://www.dropbox.com/s/xrj2tzcabns2uiu/itemprop-validation-errors.jpg?dl=0
If I disable the GP Schema Off snippet, the errors go away.
The above is just an example page – all of the pages look like they get the itemprop errors (as was highlighted to me in Website Auditor). If you want to run a test on any of the other pages on my site, you can append
?ao_noptimize=1
to the url – this will bypass the minification stuff and make the line numbers tally up so it’s easier to see what is happening where.Thank you for your help!
Michael.
April 9, 2020 at 9:40 am #1232898TomLead DeveloperLead DeveloperLooks like something we need to fix in the theme – I’ve made a note to get it done in 2.5.0 π
April 9, 2020 at 11:02 am #1232990MichaelThank you Tom – much appreciated π
April 9, 2020 at 5:26 pm #1233344TomLead DeveloperLead DeveloperThanks for pointing it out π
-
AuthorPosts
- You must be logged in to reply to this topic.