1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Microdata tags, Google not recognizing?

Discussion in 'Troubleshooting and Problems' started by Kevin, Apr 18, 2014.

  1. Kevin

    Kevin Well-Known Member

    So I have an afternoon obsession today with the microdata tags. Below is a link of an example thread at one of my sites that I'm trying to get a 'clean' schema test from.

    http://www.google.com/webmasters/to...-book-on-amazon-rocket-babe-dust-storm.17945/

    As you can see in the results I'm getting an error, "Error: If this markup is about a person, at least 2 of the following fields are needed: organization, location, or role. See the people help page for more information.", even though I do have role (title) and location (address) appearing.

    Is the problem that the XF Location field only shows as "address" and does not drill down further, like to "locality", or is there something else I'm not seeing? :confused:
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    I only see role, I'm not sure "address" counts for location.
     
  3. Kevin

    Kevin Well-Known Member

    From the "person" spec page (https://support.google.com/webmasters/answer/146646?hl=en) there is no unique "location" tag, only "address" with optional detail tags.
    From that page they specify there also that for the "person" identifier that at least 2 of the 3 following tags are required.
    • title or role
    • affiliation (org)
    • address
    Right now the "title" tags are coming from the users custom title & group banners while "role" is coming from the "Occupation" value on their profile page and "address" is coming from the "Location" value on their profile page. Experimenting a bit, if I supply all three tags (title/role, affiliation, & address) then I don't get an error.

    Earlier I was doing a bunch of Google searches and people reporting the same error were ultimately resolving their issues by changing their HTML code but I'm not seeing anything wrong with how the default XF tags are being generated.
     
  4. Kevin

    Kevin Well-Known Member

    It looks like this is the issue.

    "Address" is a microdata type (http://www.data-vocabulary.org/Address/) and not a property. The properties of "address" are...
    • street-address
    • locality (city)
    • region (state)
    • postal-code (zip code)
    • country-name
    Changing itemprop="address" to itemprop="region" eliminates the error. Of course it opens up a bunch of other issues since "Location" in the user control panel is free form and could have any value in there.
     
  5. Alfa1

    Alfa1 Well-Known Member

    I think that should be changed into preset values, with the correct item properties attributed to those values. If users can opt to select a country, state and city then the correct microdata tags can be attributed.
     
    Kevin likes this.
  6. Kevin

    Kevin Well-Known Member

    Which is what I'm likely to do longer term. It was bugging the heck out of me that the microdata was not validating so for the short term I wanted to find out 'Why?' first. Now that I understand the problem I can start working on a resolution.
     
    Alfa1 likes this.
  7. Alfa1

    Alfa1 Well-Known Member

  8. Kevin

    Kevin Well-Known Member

  9. Alfa1

    Alfa1 Well-Known Member

    Optimally there would be multiple fields. The user would first need to select the country, then the other drop downs load with the correct state and cities. I don't think a street address is desired for forums.
    Personally I would only need countries & states.
     
  10. Alfa1

    Alfa1 Well-Known Member

    I'm currently talking to a developer to have this created. The approach that is proposed is as follows:
    create an area in the Admin CP where you could pre-define a location. It would have a title (e.g. "Texas, USA") which would be what the user would select/see, and for each title you would be able to define the address properties (e.g., region: "Texas", country-name: "United States").

    Let me know if you want in on this and what requirements you have.
     

Share This Page