Skip to content
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

Google: Your Sitemap or Sitemap index file doesn't properly declare the namespace. #46

Closed
fillon opened this issue Jul 30, 2017 · 10 comments
Assignees
Labels

Comments

@fillon
Copy link

fillon commented Jul 30, 2017

Hi,

Since the last release, Google Console is complaining about the namespaces using https.

--
Your Sitemap or Sitemap index file doesn't properly declare the namespace. Expected: http://www.w3.org/1999/xhtml Found: https://www.w3.org/1999/xhtml
Parent tag: url
Tag: link

@ThePixelDeveloper
Copy link
Owner

Thanks for the report, will take a look today.

@ThePixelDeveloper ThePixelDeveloper self-assigned this Jul 31, 2017
@terales
Copy link

terales commented Aug 7, 2017

I think it's connected with an implementation of #43

@NeilMasters
Copy link

We are receiving this exact error and I believe the issue is related to my fix : #48

The address is not actually uri but a schema reference in the format of a uri and discussed in official docs as a uri reference which leads to nothing but confusion.

https://www.w3.org/TR/xhtml1-schema/

@hotrush
Copy link

hotrush commented Sep 13, 2017

@ThePixelDeveloper any plans to merge this?

@mikerockett
Copy link

mikerockett commented Sep 14, 2017

Given this error, which I'm also going to land up experiencing in the development of rockettpw/markup-sitemap for ProcessWire, does it actually make a difference in rankings? Can the error be ignored?

@hotrush
Copy link

hotrush commented Sep 14, 2017

@mikerockett google just abandoned my sitemap with this error

@mikerockett
Copy link

@hotrush That sucks. Seems like such a rudimentary thing that doesn't make much of a difference, especially considering the https-everywhere concept that they love oh-so-much.

@ThePixelDeveloper, please can we have #48 merged? Not sure on the TCI failures...

@terales
Copy link

terales commented Sep 14, 2017

Could you fix test suite? It looks like #48 ruins some test

@mikerockett
Copy link

@terales I'll have a look tomorrow. Hoping it's a minor thing...

@mikerockett
Copy link

mikerockett commented Sep 15, 2017

The diff engine is showing the the output is different, but they're identical. Not a phpspec user, so not sure what's going on here.

Example diff:

@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="/path/to/xslt/main-sitemap.xsl"?>
-<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml">
-    <url>
-        <loc>https://www.example.com/english/</loc>
-        <xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/>
-        <xhtml:link rel="alternate" hreflang="de-ch" href="https://www.example.com/schweiz-deutsch/"/>
-        <xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/"/>
-    </url>
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="/path/to/xslt/main-sitemap.xsl"?>
+<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml">
+    <url>
+        <loc>https://www.example.com/english/</loc>
+        <xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/>
+        <xhtml:link rel="alternate" hreflang="de-ch" href="https://www.example.com/schweiz-deutsch/"/>
+        <xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/"/>
+    </url>
 </urlset>

Edit: by the way, I get four failures instead of the two shown on TCI builds. Using Windows if it means anything...

it should format a sitemapindex with n sitemaps
it should generate a sitemap of images
it should generate a sitemap with links
it should write processing instructions

They all appear to do the same thing, failing on identical content. I've checked encoding as well, but not sure if that makes a difference to the engine... @ThePixelDeveloper Please can you investigate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants