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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Star rating is showing as invalid despite being disabled

RCheesley opened this issue · comments

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.

commented

@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?

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

commented

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
commented

@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.

commented

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.