-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.4] Vote : aggregateRating error in Google Rich Results #42934
Conversation
Replace tabs by spaces
@sandewt PR moved to 4.4 branch. |
I have tested this item ✅ successfully on 2f594e4 AFTER applying this Pull Request I got green light from Google As Fedik mentionned Add the layout with Schema plugin so that no additionnal shema type (such as Product) is involved This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42934. |
I have tested this item ✅ successfully on 2f594e4 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42934. |
Co-authored-by: jsanders <[email protected]>
Schema plugins have been introduced in Joomla 5.0 and this PR is due to work with Joomla 4.4. |
You are right, sorry for the mistake. |
It will be to move aggregatingRating into schema plugins, as each schema type has its own required fields list. |
for your information: Schema.org Product type plugin #42710 |
Thank you for this information. This PR is trying to fix an issue in vote plugin, it's not to create a schemaorg product plugin. As stated in #42933 , I found we could make aggregateRating work by using product type. In J5, I think we'll have to fix it another way, maybe through existing schemaorg plugins. |
Review versus Product ? see #42933 (comment) |
Sorry, the changes still incorrect. We should not force any In the end, this hack replaces one problem to another. For proper fix check the coments in PR for 5.1 (#42933 (comment)) |
remove itemscope redefinition
Review requires a single user, rating count will disappear. |
I'm trying to implement 5.1 version of this hack using schemaorg plugins. I have a doubt on where to implement this. For example, for Recipe, I added some lines into plugins/schema/recipe/src/Extension/Recipe.php so it added Recipe dedicated rating lines to the Recipe information. I created a new class SchemaorgPrepareRecipeAggregateRating in libraries/src/Schemaorg. Does it sound correct or is there a better place to add this, using isPartOf maybe ? |
Sorry, but I think it's better to focus on J4 here and not J5. |
In theory the voting plugin should listen to |
Exactly that |
I have tested this item ✅ successfully on 07d5eed This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42934. |
Hi Emmanuel, |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42934. |
Thank you! |
Sorry but this PR is not correct because the Number of Votes will never be visible. Solution move the closing |
( see discussion #42920) and #42933
Summary of Changes
When vote plugin is enabled, Rich results are created but are rejected by Google Rich Results tool.
Testing Instructions
Enable Vote plugin.
Enable Voting in Articles component configuration.
Vote for one or more articles.
Check your article using https://search.google.com/test/rich-results
Actual result BEFORE applying this Pull Request
Google Rich Results check gives an error
![rich_snippet_error](https://private-user-images.githubusercontent.com/19435246/309238767-facdb827-4df2-4be7-bcc8-f148363fa689.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzM5NTIsIm5iZiI6MTczODk3MzY1MiwicGF0aCI6Ii8xOTQzNTI0Ni8zMDkyMzg3NjctZmFjZGI4MjctNGRmMi00YmU3LWJjYzgtZjE0ODM2M2ZhNjg5LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAwMTQxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUyNWI4NGRiNGJjMThhZGIxODhkNTVhNTYzMTQ4NmJiNjYyOGU3ZGE3N2QwMzY1OTdiOWM0Y2EzYjk0MzQ5YWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.TpECadu5qFW_Nt05vf9Ww9vb1QzVc6kWvNVvWgzWs7c)
Review snippets shows 2 errors :
Expected result AFTER applying this Pull Request
Google Rich Results check is OK
![rich_snippet_ok](https://private-user-images.githubusercontent.com/19435246/309241270-ef3fc2d6-c263-4c8c-a4ec-c46616e1a9c5.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzM5NTIsIm5iZiI6MTczODk3MzY1MiwicGF0aCI6Ii8xOTQzNTI0Ni8zMDkyNDEyNzAtZWYzZmMyZDYtYzI2My00YzhjLWE0ZWMtYzQ2NjE2ZTFhOWM1LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAwMTQxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc3ZTU0NTU4OTUzZmU4NjlmOTU1ZTQ2YzI1YzhhMmNiNThmMjU5YjI4Yjk3YzM4ZDE3ZGFjOThjNWM1MDQwNGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MtikYH7aRdF4QSx-x1xltCFRB3O-oOfXYq7bZvErg7U)
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed