User tests: Successful: Unsuccessful:
This pull request includes the plg_system_microdata
plugin #4118 pull request.
1) Where is saved the com_content microdata information.
Discussion link: https://twitter.com/PAlexcom/status/513414081534263297
First I recommend reading this article http://magazine.joomla.org/issues/issue-aug-2014/item/2233-rich-snippets-structured-data-microdata-rdfa-isnt-so-simple
Also make sure you have the plg_content_vote
and plg_system_microdata
both enabled.
You will also need this tool provided by google to test the markup and the SERP (Search Engine Result Page) preview https://www.google.com/webmasters/tools/richsnippets
Not necessary, but you could also validate the HTML by using this tool http://validator.w3.org
At this point you can change one of the 5 available microdata schema.org types.
For more information on how everything is implemented and the syntax please read here #4118
Labels |
Added:
?
|
I have install your branche on my test envoriement and im going now step by step for testing.
<meta name="microdata_event_location" content="New York2" />
<meta name="microdata_event_startdate" content="2014-09-15 15:04:00" />
<meta name="microdata_event_enddate" content="2014-09-20 15:04:23" />
<meta name="microdata_recipe_preptime" content="1" />
<meta name="microdata_recipe_cooktime" content="1" />
<meta name="microdata_recipe_ingredients" content="2 eggs, 1 cup of rice" />
<meta name="microdata_recipe_calories" content="250" />
If we have a vote button but no vote atm Google send a "Error"
On every site i have test we have a aggregaterating: Item 1/2
Is this expected?
@PAlexcom can we test more or it is only a validate by google?
This comment was created with the J!Tracker Application at http://issues.joomla.org/.
Category | ⇒ | Front End Libraries Plugins SEF |
@zero-24 thanks for helping and testing :)
On every site i have test we have a aggregaterating: Item 1/2 Is this expected?
Every time you see Item 1 or Item 2 and so on Item n... in the extracted structured data with the use of Structured Data Testing Tool, means that the information is another group item, e.g.
So it is not an error.
can we test more or it is only a validate by google?
You could also validate the HTML by using this tool http://validator.w3.org/
If we have a vote button but no vote atm Google send a "Error"
It simply means that there isn't available any vote yet, and that Google will not display rich snippet until a vote will be submited. So it is not an error.
Missin required fields. i can't confirm that my values e.g. for the event is shown on the article as you have it on your scennshots. Or need this only to enabled on a place?
You need to enable the article Details options e.g. Show Hits, Show Author... in order to have a similar frontend output.
If that doesn't work, could you post a screenshot of your frontend?
<meta name="microdata_event_location" content="New York2" />
<meta name="microdata_event_startdate" content="2014-09-15 15:04:00" />
<meta name="microdata_event_enddate" content="2014-09-20 15:04:23" />
<meta name="microdata_recipe_preptime" content="1" />
<meta name="microdata_recipe_cooktime" content="1" />
<meta name="microdata_recipe_ingredients" content="2 eggs, 1 cup of rice" />
<meta name="microdata_recipe_calories" content="250" />
That's why microdata configuration in the backend should not be under 'Publishing' → Metadata options. Because all the metadata information before rendering is inserted in the page header. Do you have any suggestion?
Do you have any suggestion?
hmm add only the selected/expected values. Like check wich type it is e.g. event than add the event microdata if it is a article don't add the event or other microdata or i missing something?
You could also validate the HTML by using this tool http://validator.w3.org/
This was shown 6 errors
Validation Output: 6 Errors
Error Line 8, Column 49: Bad value microdata_types for attribute name on element meta: Keyword microdata_types is not registered.
<meta name="microdata_types" content="Event" />
Syntax of metadata name:
A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself.
Error Line 9, Column 61: Bad value microdata_event_location for attribute name on element meta: Keyword microdata_event_location is not registered.
<meta name="microdata_event_location" content="New York" />
Syntax of metadata name:
A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself.
Error Line 10, Column 73: Bad value microdata_event_startdate for attribute name on element meta: Keyword microdata_event_startdate is not registered.
<meta name="microdata_event_startdate" content="2014-09-18 18:35:11" />
Syntax of metadata name:
A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself.
Error Line 11, Column 71: Bad value microdata_event_enddate for attribute name on element meta: Keyword microdata_event_enddate is not registered.
<meta name="microdata_event_enddate" content="2014-09-26 18:35:13" />
Syntax of metadata name:
A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself.
Error Line 12, Column 55: Bad value microdata_recipe_preptime for attribute name on element meta: Keyword microdata_recipe_preptime is not registered.
<meta name="microdata_recipe_preptime" content="1" />
Syntax of metadata name:
A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself.
Error Line 13, Column 55: Bad value microdata_recipe_cooktime for attribute name on element meta: Keyword microdata_recipe_cooktime is not registered.
<meta name="microdata_recipe_cooktime" content="1" />
Syntax of metadata name:
A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself.
You need to enable the article Details options e.g. Show Hits, Show Author... in order to have a similar frontend output.
hmm yes that work. But should this expected?
E.g. if I want only show the microdata or i don't what it show?
Atm if one of the options is show e.g. the "Modify Date" the microdata values will show and i can't hide there or add it exclusively (without other values)
BTW: Github says: This pull request contains merge conflicts that must be resolved.
This comment was created with the J!Tracker Application at http://issues.joomla.org/.
Thanks @zero-24
Validation Output: 6 Errors
Solved.
BTW: Github says: This pull request contains merge conflicts that must be resolved.
As far I know I can't do anything, there is a merge conflict in /modules/mod_articles_latest/tmpl/default.php
, only the person with merge permissions can fix it.
hmm yes that work. But should this expected?
E.g. if I want only show the microdata or i don't what it show?
Atm if one of the options is show e.g. the "Modify Date" the microdata values will show and i can't hide there or add it exclusively (without other values)
Well ..., that's true. But that means that there will be more on/off option buttons. As discussed long time ago (https://twitter.com/betweenbrain/status/446622447417425920) a lean interface is preferred. This is one of the things that must be discussed here :)
BTW: Github says: This pull request contains merge conflicts that must be resolved.
As far I know I can't do anything, there is a merge conflict in /modules/mod_articles_latest/tmpl/default.php, only the person with merge permissions can fix it.
Actually, if you just do a git merge
of the current staging branch into your branch, that'll let you resolve the conflicts and the GitHub UI will show a clean merge again.
Plus, this is a good way to gauge if any changes to the repo may have affected your code.
Well ..., that's true. But that means that there will be more on/off option buttons. As discussed long time ago (https://twitter.com/betweenbrain/status/446622447417425920) a lean interface is preferred. This is one of the things that must be discussed here :)
Imho: Keep it as simple as possible. Only add options where the customisation can't be easily done in a template override.
Do I understand this correctly?
You are trying to implement content types by using microdata in com_content?
I do not know the future of the J3 UCM ( _ucm_content ), but that would be the place to introduce NEW content types. Mixing microdata for articles with events, books, recipes ... will hurt Joomla for the next generation`s backward compatibility.
I guess that Google and Co accepts any event, book or recipe as an article but will not categorise it as an event, book or recipe.
I suggest to leave non article microdata to other extensions than com_content. New core extensions or not.
You would need overrides for the examples above anyway. e.g. do you think someone adds the recipe directions and ingredients twice. 1. for the microdata 2. for the text.
The JMicrodata is still useful in the right context.
This comment was created with the J!Tracker Application at http://issues.joomla.org/.
I do not know the future of the J3 UCM ( _ucm_content ), but that would be the place to introduce NEW content types.
Please don't use the #__ucm_...
for anything new. The future of those tables is a place 6 feets under.
@schnuti Thanks for your feedback :)
You are trying to implement content types by using microdata in com_content?
Definitely no. Here I'm trying to implement microdata semantics in com_content
and later in the CMS.
Mixing microdata for articles with events, books, recipes ... will hurt Joomla for the next generation`s backward compatibility.
Not true. There isn't any dependency regarding the new configurations in com_content
(any sql query, filter, ...).
I guess that Google and Co accepts any event, book or recipe as an article but will not categorise it as an event, book or recipe.
This is why we use microdata, so that Google could categorise an Article as an Event, Book or Recipe. Please try to test or read the "How to test" instructions and you will see that it does.
You would need overrides for the examples above anyway.
With the use of plg_system_microdata
you don't need any overrides, it uses the fallbacks mechanism, you write one layout that works for all, please take a look here to see how it works #4118
e.g. do you think someone adds the recipe directions and ingredients twice. 1. for the microdata 2. for the text.
I agree with you, but it is not necessary. With the current configuration you insert the recipe and ingredients once (for the microdata), and it will be displayed in the frontend.
Thanks Bakual, nice to know. Has some implications on the use of newly introduced features.
If com_content has to handle different content types, it should be able to handle custom fields in a better way than adding them as json in a common field.
I still find com_content = articles as long as not using third party developers tweaks, with plugins and overrides.
@PAlexcom
We do not disagree about the Microdata semantics only about what com_content is. If not as Ucm - It has to be extended to be able to handle other content types. I do not see a great difference between Content Types and the XXX Microdata Types. And as written by others, it`s not that easy to override the many views and layouts of com_content as is, only containing articles.
@test
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4276.
Hello,
There are a few problems that prevents us from testing this request. First of all the full zip reference mentioned at the top throws a 404 not found. So there is no full working demo available. The PR itself it out of sync and has merge conflicts. Trying to apply it manually generates a list of errors:
error: patch failed: components/com_content/views/article/tmpl/default.php:43
error: components/com_content/views/article/tmpl/default.php: patch does not apply
error: patch failed: language/en-GB/en-GB.ini:200
error: language/en-GB/en-GB.ini: patch does not apply
error: patch failed: layouts/joomla/content/intro_image.php:17
error: layouts/joomla/content/intro_image.php: patch does not apply
error: patch failed: layouts/joomla/content/tags.php:18
error: layouts/joomla/content/tags.php: patch does not apply
Please update your PR, at the moment this PR cannot be tested. Sorry.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4276.
Successful test on Joomla 3.3.6, tested all schemas and am able to reproduce the rich snippets that would be expected.
Simple and easy to use.
If others wish to test you can install the microdata system plugin from this repo: https://github.com/PAlexcom/plg_system_microdata just download the zip and install.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4276.
@roland-d @Kubik-Rubik @RCheesley I've updated the PR to the current staging state. Thanks for testing ;)
I was unable to apply 4276.diff to the current staging. Here are the error messages:
error: patch failed: language/en-GB/en-GB.ini:201
error: language/en-GB/en-GB.ini: patch does not apply
error: patch failed: layouts/joomla/content/intro_image.php:19
error: layouts/joomla/content/intro_image.php: patch does not apply
error: patch failed: layouts/joomla/content/tags.php.20
error: layouts/joomla/content/tags.php: patch does not apply
So I tried it with com_patchtester and eventually the patch was successfully applied. It took me then a while to figure out, that I have to go to the "Extension manager" -> "Discover" to install the plugin. After enabling the plugin I did some testing and everthing went fine so far. I will do some more testing tomorrow.
@waader that is strange, I had no problems applying the patch against the current staging using the command line. Maybe you had some other changed files in there?
Test results
Article/Recipe/Review
All OK
Event/Product
Element meta is missing one or more of the following attributes: itemprop, property.
Attributes for element meta:
Global attributes
name
http-equiv
content
charset
@roland-d @waader Thanks for testing!
@waader it's strange that it's not working, could you try again please, I've fixed some merge issues.
@roland-d Could you please attach a screenshot of the problems? Probably the meta elements are missing because of the template which is not related to this PR. Or more probably you haven't enabled the Content - Vote plugin?
@PAlexcom Thanks! I can now apply the patch and I have done several tests. I have tested all five microdata types and verified them with the googles webmaster tool for microdata. That went fine. I also check the output with the W3C markup validation service (http://validator.w3.org/check).
When I validate the "Menu Item Type" -> "Category Blog" with articles of the different microdata types I get errors like this one, which I don´t get, when I am not applying your patch:
Error Line 137, Column 147: Element meta is missing one or more of the following attributes: itemprop, property.
60;<span >5</span><meta content="0" /><meta content="0" /></p><img src="/joo…
Attributes for element meta:
Global attributes
name
http-equiv
content
charset
I think this is what @roland-d is refering to.
Rel_Number | ⇒ | 4118 | |
Relation Type | ⇒ | Related to |
@PAlexcom @waader Indeed that is what I was talking about, my screenshot below:
Here is the HTML content for that part:
<dl class="article-info">
<dt class="article-info-term">Details</dt>
<dd class="createdby" >
Written by <span itemprop='name'>Super User</span> </dd>
<dd class="category-name">
Category: <a href="/joomla-cms/index.php?option=com_content&view=category&id=64&Itemid=411" >Content Modules</a> </dd>
<dd class="published">
<span class="icon-calendar"></span>
<time datetime="2013-10-31T00:43:46+00:00" >
Published: 31 October 2013 </time>
</dd>
<dd class="hits">
<span class="icon-eye-open"></span>
<meta content="UserPageVisits:16" />
Hits: 16 </dd>
<dd class="location">
Location: <span itemprop='location'>
Hoogvliet </span>
</dd>
<dd class="startDate">
<span class="icon-calendar"></span>
<time datetime="2014-11-11T22:48:27+00:00" itemprop='startDate'>
Start date: Tuesday, 11 November 2014 22:48 </time>
</dd>
<dd class="endDate">
<span class="icon-calendar"></span>
<time datetime="2014-11-27T22:48:00+00:00" itemprop='endDate'>
End date: Thursday, 27 November 2014 22:48 </time>
</dd> </dl>
What I also noticed, despite having the Voting plugin enabled, I don't see any option to vote.
Missing is Local, Person, Audio and Video, which is quite handy for news publishing websites, such as online magazines.
Product does not load fields to fill, such as UPC and ISBN which is quite handy.
As I read about a new validation service for microdata today I came back to your patch and analyzed the problem raised by @roland-d.
Two side notes:
So I installed the tweaked current staging branch including your patch with the testing sample data, activated the plugin and took the first article - popular tags - and selected event as microdata type.
After that I validated the result with the service available at http://www.w3.org/blog/SW/2012/02/08/new-w3c-validation-service-with-rdfa-1-1-and-microdata/. There are two problems indicated:
One that is unrelated to the microdata extension: In the article "popular tags" - also in many others - there is the line
<p>{loadmodule tags_popular,Popular Tags}</p>
which makes the validator scream because after rendering you will have a <p>
tag that encloses a lot of <div>
tags. Changing this <p>
to <div>
and everything is fine.
Then there is the line
<meta content="UserPageVisits:5" />
The first thing I noticed are the two empty space between meta and content. So I looked in the corresponding layout file and found this line:
<meta data-sd="interactionCount" content="UserPageVisits:<?php echo $displayData['item']->hits; ?>" />
So why is data-sd="interactionCount" parsed out?
Last but not least I had a look at a google service at https://developers.google.com/structured-data/testing-tool/ that evaluates structured data markup. There I get to 2 errors and 1 warning. Googles is complaining that the field "address" is missing and the field "location" has to be filled. It also recommends to add the field "offer".
Is this function to be extended in the future? I miss some fields in the microdata function. Like SoftwareApplication, Movie, Book, Person, Organisation, and many more ... ?
I just wonder if it´s suffices to everyones needs.
Status | Pending | ⇒ | Information Required |
Hello @PAlexcom
Thank you for your contribution.
The last comment here was on 14th March. So the question is, Is this issue/pull request still valid?
If no reply is received within 4 weeks we will close this issue.
Thanks for understanding!
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-08-22 19:28:10 |
Closed_By | ⇒ | Bakual |
Labels |
Added:
?
|
Closed as requested
I'm pretty sure that the microdata configuration in the backend should not be under 'Publishing' → Metadata options. Any ideas @betweenbrain @Bakual ?