Invalid Article Schema


(Neil Lalonde) #22

(Joshua Rosenfeld) #23

(Julien Lépine) #24

Hi Discourse team,

First of all, I am new here, so I hope I am doing well posting here for a bug.

I tried to find an existing topic before to post a new one but I did not find anything, so I am sorry in advance if such topic already exists. Do not hesitate to link it or do whatever is necessary. Thank you.


So here is the issue I would like to report. As mentionned in the title, microdata on discourse do not fulfil with Google tool’s expectations.

On topic lists, Google tools reports more than 60 errors :

list
example of the main topic list

for more details, see this test

There is also errors on posts :

for more details, see this other test


My company is using discourse as forum for 3 of our websites. We greatly consider the SEO aspect and would be thankful for you to correct all possible errors in microdata.

So is it possible for you to fix microdata ?


(Julien Lépine) #25

Hi Discourse team,

I posted my question about two weeks ago. I assume fixing microdata will take a certain amount of time but since I got no answer yet I allow myself to ask you if the fix is on track and when it could be released ?

Thank you in advance for your work and your reply.


(Neil Lalonde) #26

Are all 61 errors saying the same thing? <div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> needs to have a “position” attribute?


(Julien Lépine) #27

The 61 errors count 3 different kind of error :

  • ItemList -> itemListElement -> url and/or ItemList -> itemListElement -> item -> url (30 times): All values provided for url must point to the same page.
  • ItemList -> itemListElement -> position (30 times): A value for the position field is required.
  • global to ItemList (1 time): ListItem with url and ListItem with item are incompatible.

As I mentioned it in my first post, you can follow the links I gave to see all details.


(Julien Loisel) #28

Hi @t_d ,

Any news about this subject ?
When do you think a fix will be released ?

Thx


(Joffrey Jaffeux) #30

I can take it during june.


#31

Invision Boards handle structured data well to see how it could/should be done.


(Joffrey Jaffeux) #32

I just pushed a commit to improve this:

I will keep digging but I think the remaining errors are due to google validation tool:

https://search.google.com/structured-data/testing-tool/u/0/?hl=en#url=https%3A%2F%2Fmeta.discourse.org%2Flatest

https://search.google.com/structured-data/testing-tool/u/0/?hl=en#url=meta.discourse.org

https://search.google.com/structured-data/testing-tool/u/0/?hl=en#url=meta.discourse.org%2Fc%2Fsupport

https://search.google.com/structured-data/testing-tool/u/0/?hl=en#url=meta.discourse.org%2Ftags%2Fdocker

I still have this page to improve, will do it tomorrow:

https://search.google.com/structured-data/testing-tool/u/0/?hl=en#url=https%3A%2F%2Fmeta.discourse.org%2Ft%2Ftopic-stopwatch-theme-component%2F83939

Particularly this page has a warning with “DiscussionForumPosting” which is asking us to provide an image if possible. I think we could just add `itemprop=“image” when we cook the post to images. I will investigate this.


(Julien Loisel) #33

Hi @joffreyjaffeux ,

You fixed the issues regarding the “position” attribute.

But it still remains to resolve the uncompatibility between ListItem with “url” and ListItem with “item” Also, url attribute of each ListItem should point to the same page.

There is progress but still some work to do.


(Joffrey Jaffeux) #34

Yes I’m continuing work on this today or tomorrow. Thanks for recap/update.

I will investigate more, but I do think there’s a bug in google tool here. Can you share me a test where it’s showing this for you please?


(Julien Loisel) #35

For example : https://search.google.com/structured-data/testing-tool/u/0/?hl=en#url=https%3A%2F%2Fmeta.discourse.org%2Flatest


(Joffrey Jaffeux) #36

I see:

    <div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
      <meta itemprop='position' content='0'>
      <meta itemprop='url' content='https://meta.discourse.org/t/color-scheme-contest-with-prizes/89432'>
      <a href='https://meta.discourse.org/t/color-scheme-contest-with-prizes/89432' itemprop='item'>
        <span itemprop='name'>Color Scheme Contest (with Prizes!)</span>
      </a>
      <span class="page-links">( <a href='/t/color-scheme-contest-with-prizes/89432?page=2'>2</a> )</span>
        <span class='category'>[<a href='/c/meta'>meta</a>]</span>
      <span class='posts' title='posts'>(22)</span>
    </div>

It seems weird to me that’s it’s not validated because the two elements with item prop have the same URL:

<meta itemprop='url' content='https://meta.discourse.org/t/color-scheme-contest-with-prizes/89432'>
<a href='https://meta.discourse.org/t/color-scheme-contest-with-prizes/89432' itemprop='item'>
  <span itemprop='name'>Color Scheme Contest (with Prizes!)</span>
</a>

I will look if it’s caused by the page-links or category link at the end of the block.