Plugin Author
Brecht
(@brechtvds)
What AMP plugin are you using? The ones I recently tested don’t output the comment form, so this code wouldn’t be there either.
@brechtvds, https://wordpress.org/plugins/amp/
The error comes from “/wp-recipe-maker/templates/public/comment-rating-form.php” (Line 48, 51, 54, 57, 60, 63). I have edited the file and removed the onclick event code for now. But I don’t want to do this manually after every update.
I have the “Comment Ratings” option enabled in the plugin settings (WP Recipe Maker > Settings > Star Ratings).
Plugin Author
Brecht
(@brechtvds)
I did test that plugin and they automatically remove those onclick attributes, making the page valid. Is that not the case for you?
@brechtvds, Yes it does. But it’s still a validation error that should be fixed in the recipe plugin. The AMP plugin keeps reminding of it on every page load.
If you don’t want to add a checkbox there should at least be a filter to turn it off.
Plugin Author
Brecht
(@brechtvds)
Just wanted to clarify that the markup is actually valid. The plugin is AMP compatible and because of the way the comment ratings were built they even function without that JS that gets stripped on AMP pages.
If I’m not mistaken you can mark those warnings the AMP plugin gives as being reviewed, and it doesn’t show those anymore. But sure, I’ll look into not outputting them in the first place to prevent them from showing up.
Plugin Author
Brecht
(@brechtvds)
Hi again,
I wanted to let you know we just released WP Recipe Maker 7.1.0 which should automatically remove these onclicks on AMP pages.
@brechtvds, Thank you for the update 🙂