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

Namespace Issue in Sitemap #340

Closed
BriceFab opened this issue Mar 7, 2024 · 7 comments
Closed

Namespace Issue in Sitemap #340

BriceFab opened this issue Mar 7, 2024 · 7 comments
Labels

Comments

@BriceFab
Copy link

BriceFab commented Mar 7, 2024

Problem Description

After updating the PrestaConcept bundle from version 3.3 to 4.1 in our project, we have encountered an issue as reported by Google's Search Console. The error message from Google indicates that there is a problem with namespaces: "The namespace is not correctly indicated in your index file or your sitemap."

Despite reviewing the sitemap output, the issue is not immediately apparent, as everything seems correct at first glance. This problem has arisen post-update, and we were not encountering this issue in the previous version of the bundle.

Steps to Reproduce

  1. Update the PrestaConcept bundle from version 3.3 to 4.1.
  2. Generate the complex sitemap (with news, video, tags).
  3. Submit the sitemap to Google's Search Console.

Expected Behavior

The sitemap should be accepted by Google's Search Console without any namespace-related errors.

Actual Behavior

Google's Search Console reports an error regarding the namespaces, suggesting they are not correctly indicated in the sitemap or index file.

Additional Context

  • This issue was not present in version 3.3 of the bundle.
  • With our review of the sitemap's output we does not reveal any obvious misconfigurations or errors related to namespaces.

I would greatly appreciate any guidance or recommendations on how to resolve this namespace issue.
Is there a known workaround or fix that could be applied to ensure compliance with Google's Search Console requirements?
I can open a PR if someone has more information about what's the problem reported from Google.

The sitemap URL is: https://www.fitmetrics.ch/sitemaps/sitemap.xml and https://www.fitmetrics.ch/sitemaps/sitemap.exercise.xml
image
image

Environment

  • PrestaConcept Bundle Version: 4.1
  • PHP Version: PHP 8.2.16
  • Symfony Version: 6.4.3

Thank you for your time and assistance, and for your continued efforts in developing and maintaining the PrestaConcept bundle. Your work is greatly appreciated by the community.

@BriceFab BriceFab added the bug label Mar 7, 2024
@yann-eugone
Copy link
Member

Hello,
So it was working with the bundle previous version?

I see you did your best at providing details, still it is not easy to understand what happen without the sitemap content.
Can you add to this issue:

  • a sitemap that is valid
  • the same sitemap but invalid

@roderikmutsaers
Copy link

Same error here.

Problem seems to be the 'xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"' line in src/Sitemap/Sitemapindex.php
Google doesn't accept https over here. When changed to http the warning in Google Search Console is gone.

@BriceFab
Copy link
Author

Same error here.

Problem seems to be the 'xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"' line in src/Sitemap/Sitemapindex.php Google doesn't accept https over here. When changed to http the warning in Google Search Console is gone.

It was changed on the last release: v4.0.0...v4.1.0
I'll try to re-generate my sitemap with version v4.0.0 and sent it again to google search console. I keep you inform

@BriceFab
Copy link
Author

Same error here.

Problem seems to be the 'xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"' line in src/Sitemap/Sitemapindex.php Google doesn't accept https over here. When changed to http the warning in Google Search Console is gone.

I confirm the issue of https that is not allowed by Google:
image

By fixing the release to:
"presta/sitemap-bundle": "4.0",
It's work. v4.0.0...v4.1.0

cc @yann-eugone

@yann-eugone
Copy link
Member

So it's all related to this #337

But I don't understand why Google is struggling with https here
It seems that the http page is redirecting to the https page anyway

$ curl -sLD - http://www.sitemaps.org/schemas/sitemap/0.9

HTTP/1.1 301 Moved Permanently
Content-Length: 0
Date: Thu, 14 Mar 2024 13:38:03 GMT
Location: https://www.sitemaps.org/schemas/sitemap/0.9

@nediam
Copy link

nediam commented Mar 18, 2024

Because its namespace identifier, not a URL ;) and namespace is with http://

@yann-eugone
Copy link
Member

Here it is : https://github.com/prestaconcept/PrestaSitemapBundle/releases/tag/v4.1.1
Sorry for not spotting that during the review

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

4 participants