Closed (fixed)
Project:
Simple XML sitemap
Version:
4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2023 at 21:19 UTC
Updated:
25 Oct 2024 at 15:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gbyteThat's unlikely a bug. Have you read the documentation/readme? You need to set up a sitemap first and include content that is published. If the sitemap is empty after generation, it will throw a 404.
Comment #3
fvd commentedHello @gbyte,
the steps who I have done:
create a sitemap. Path: admin/config/search/simplesitemap/variants/add
(content is there.)
add content entities. Path: admin/config/search/simplesitemap/entities
save with create all sitemaps new.
now, I can see the links there: admin/config/search/simplesitemap
But, if I want to go to the sitemap, example.com/xxx/sitemap.xml
But none link in the sitemap files, the site is empty. (not
404)also the default. Path example.com/sitemap.xml
Comment #4
gbyteThe sitemap is probably there, press ctrl+u to see it. What does not seem to be working for you is sitemap styling (irrelevant for the functionality). You can disable the sitemap style in the settings. It is strange however that you are the second person to log this: #3371572: Sitemap file doesn't show when any user is logged.
Comment #5
gbyteI created a test project with D10.1 and simple_sitemap 4.1.6. No problem here. Can you please try and make this error reproducible on a fresh Drupal instance?
Comment #6
fvd commentedctrl+u (option+u) doesn't work for me.
The sitemaps are not createt, because in: admin/reports/page-not-found are listet...
thank you for test project, the sitemap is there.
I think about the reproducible for you
Comment #7
fvd commentedComment #8
gbyteWhy 'de-DE'? Is this a sitemap variant set up within the module? Or is it any type of Drupal translation functionality? These sitemaps are not supposed to be divided into language domains but to have all language variants within one sitemap (e.g. /sitemap.xml).
Comment #9
fvd commentedde-DE is the sitemap variant with the modul, yes. I use tmgmt modul for other languages.
hmm,
The sitemap is created.
on the normal path example.com/sitemap.xml?page=5
I think all sites are there!
But, what make the Path de-DE and break the sitemap links?
@gbyte, is the sitemap the right sitemap, with the language path or without?
Comment #10
fvd commentedIf I delete the language path in the global sitemap, there are the sites...
Without the Language Path 😕
Comment #11
fvd commentedReproduce:
Install D10.1.0 (Standard Installation)
Install simple XML Sitemap 4.1.6; tmgmt 1.15
Aktivate all
add a language admin/config/regional/language
configure the language pathes admin/config/regional/language
now press on Standard sitemap at admin/config/search/simplesitemap
The sitemap is't there.
The sitemap module leades to domain: example.com/LANGUAGE/sitemap.xml
But, the sitemap is at example.com/sitemap.xml
I dont know, is that a thing from simple XML Sitemap, or from tmgmt modul...
Comment #12
gbyteIf you don't know, how about disabling that module and checking? ;)
Comment #13
fvd commentedNow it is deactivated, and it is the same.
The sitemap from example.com/de-DE/admin/config/search/simplesitemap
Link to example.com/de-DE/sitemap.xml
But the sitemap is there: example.com/sitemap.xml
Maybe something in core modules, from the image?
Comment #14
gbyteYour screenshot looks fine. Did you remember to regenerate the sitemaps after uninstalling that module?
If I understand you correctly, you created a Sitemap variant 'de-DE' in order to have a language specific variant. This is wrong and may break if 'de-DE' is already a language prefix. Delete the variant and *only* use the default variant located under /sitemap.xml. This module creates hreflang sitemaps which means there is only supposed to be one sitemap irrespective of the number of languages. Variants are a functionality to categorize the site's content not for creating language sitemaps.
Comment #15
fvd commentedIs it, if I install drupal, with a different language than standard, then is something with the sitemap path. The add image have German, with path de, the Installation language.
Behind the installation I change the path to de-DE.
If I understand you right:
Simple XML sitemap modul needs, the "example.com" language as standard. If you need for your site that path or not.
If I change that "path" and Language, to example.com/de-DE/, then came what I have?
Comment #16
gbyteI feel like our conversation would profit from Google Translate. Can you show me a screenshot of /admin/config/search/simplesitemap?
Comment #17
gbyteNo worries, I could reproduce the issue. This is only a cosmetic problem, as the sitemap exists under /sitemap.xml. Will look into it soon.
Comment #18
gbyteComment #19
fvd commentedHere is the image of the page /admin/config/search/simplesitemap
Comment #20
fvd commented#15 Translatet:
If I understand correctly, drupal requires the example.com path for the system.
I can't change it afterwards to example.com/de-DE. Because otherwise there are problems with, among other things. simple xml sitemap.
Simple XML Sitemap claims the example.com path directly.
Comment #21
fvd commentedHello gbyte,
Now it's working.
What I did:
reinstalling drupal example.com/
Then I created the languages.
And left the language of example.com/
in the path: /admin/config/regional/language/detection/url
unoccupied. I do not overwrite the English there! So example.com/
Then I created languages, including de-DE
Now the sitemap is delivered correctly.
example.com/sitemap.xml
Now the German path is in /sitemap.xml
Runs
Comment #22
fvd commentedThank's for your help
Comment #23
yevko commentedHello @gbyte,
I can confirm the issue listed here.
When a language prefix is set to the default language of the site,

links of the paginated sitemap get a prefix included as well:, when they shouldn't

The last screenshot is from the https://xxx.com/sitemap.xml page. When paginated links are assessed they go to 404 pages.
Comment #24
yevko commentedUpdate: This patch fixes the issue of excluding a language prefix from the paginated pages.
Comment #25
gbyte@YevKo thanks for the patch. It should not be necessary however, as we already do it inside SimpleSitemap::toUrl.
Can you double check if in fact your patch works?
Comment #26
gbyteComment #27
walkingdexter commentedJust tested, all bugs reported here have been fixed in #3369919: Unexpected language prefixes on sitemap index