paulmassen / grav-plugin-seo

Manage your site’s meta tags for display in search engine results or social media networks. Create and manage json-ld microdata. Includes an easy-to-use live preview feature.
MIT License
84 stars 21 forks source link

Star rating is showing as invalid despite being disabled #101

Open RCheesley opened 3 years ago

RCheesley commented 3 years ago

Since updating to Grav v1.7.20 this plugin has been throwing an error preventing pages from being saved in the user interface.

Tracked it down to invalid form entry being detected in the Organization tab under the star rating, despite this not being enabled for the article.

I had to globally disable the organization metadata to allow users to save in the UI.

JensDebergh commented 3 years ago

@RCheesley I'm experiencing the same issue but turning off the organization metadata globally on a plugin level does not fix it for me.

Am I missing something? How did you solve it? Does the cache needs to be cleaned afterwards?

RCheesley commented 3 years ago

I don't recall, I disabled it globally and I think then probably had to clear the cache / re-edit the page.

JensDebergh commented 3 years ago

Just to clarify for anyone stumbling on this issue and don't know how to solve it.

To fix just remove the validate: from the seo-plugin yaml blueprint. This way you can still use organisation metadata without disabling the entire feature.

  1. The blueprint can be found inside of user/plugins/seo/blueprints/seo.yaml
  2. Search for header.orga.ratingValue
                            header.orga.ratingValue:
                              type: range
                              label: Star Rating
                              help: Choose a value between 0 and 5 which should be the average ratings for your product. Make sure the value is consistent with your actual reviews.
                              validate: <--- REMOVE THIS
                                min: 0
                                max: 5
                                step: 0.1
aloxe commented 3 years ago

@JensDebergh Is this still happening? I have grav v1.7.25 with this plugin and seo.yaml unmodified. I could enable microdata for organisation change the rating and save the page without error message.

JensDebergh commented 2 years ago

My client was complaining about this. He's on 1.7.20 and I haven't upgraded them yet. Maybe on 1.7.25 its fixed.