Related: #803756: No XML sitemaps available - There are currently no XML sitemap contexts available.
When first adding a sitemap after upgrade to 2.x, the UI shows this message at admin/settings/xmlsitemap/add -
"There are currently no XML sitemap contexts available"
[ Save ] Cancel
This is confusing to the user, because as stated in issue linked above, it's not actually an error message, and the correct action is to press "Save" which will generate a new sitemap.
Likewise, once I have a working sitemap visible at admin/settings/xmlsitemap, clicking edit on the sitemap shows the same message.
Either something has not gone right with the upgrade (plausible, and I can test this as I have a backup I can restore to a dev copy if that's helpful Dave), or the UI needs some loving there (clue me in to what's supposed to be happening and I can provide a patch to make it make sense). Or both :)
Comments
Comment #1
xurizaemonTo clarify why I've opened a separate issue: the other has devolved into a fairly lengthy support thread, but I'd like this issue just to get the UI to make sense for upgraders.
It might be as simple as updating the form to replace the "Save" button with "Add" if there are no XML site map contexts available, so people don't go rushing off to install Contexts module instead of clicking the button.
Can someone familiar with the module's workings please explain what the message is supposed to mean, so we can focus on making the UI more meaningful there?
Comment #2
Dave ReidIt might be hard to find in the other issue, so let me try and summarize:
Sitemap context = a property that distinguishes a sitemap from another. For example, if you're using the domain_xmlsitemap module, it provides a 'domain' context. The xmlsitemap_i18n sub-module provides a 'language' context. If you just have the base install, there are no contexts to pick from. And you just get one base XML sitemap with no context. I need to improve this message somehow, because nothing is wrong. If you try and add another sitemap when one already exists and there's no contexts to pick from, it will tell you, "hey, there's already a sitemap with this same context (i.e. no context)" and not allow you to save it.
Comment #3
xurizaemonOk. After a short discussion in IRC, the issue was that on visiting admin/settings/xmlsitemap, no default sitemap was generated.
This meant that I clicked through to add a Sitemap Context, which (somehow) resulted in the generation of a default sitemap, but confused me because I didn't have (or need) any context-providing modules installed.
I will dig into this and see how it can be improved. Thanks Dave for the discussion.
Comment #4
willmoy CreditAttribution: willmoy commentedAssuming a sitemap is created for the default context automatically, as it is on a new install, then surely the right solution to the confusing error message is to hide both the add and the edit links unless there is a context available?
Comment #5
miaoulafrite CreditAttribution: miaoulafrite commentedi'm also very confused
i would like to have 2 different sitemaps: one for the general infos of the site, and another for ONLY one kind of content (videos)
would that be possible?
how?
Comment #6
willmoy CreditAttribution: willmoy commentedNot yet: #451234: Support for extended sitemap formats (e.g. video, news, image, mobile)
Comment #7
miaoulafrite CreditAttribution: miaoulafrite commentedthanks willmoy, so why is there this option "add a sitemap"
what does that mean if we cannot have different sitemaps?
Comment #8
AlexisWilke CreditAttribution: AlexisWilke commentedgrobot,
There is a bug in the upgrade. Just that one... It doesn't create the XML sitemap properly and you end up having to create it.
I also read that very same message as an error the first time and ended up creating all the XML sitemaps by hand (with an INSERT INTO statement).
I talked about it here: #978398: Upgrade from 1.x to 2.x
Today I was successful at getting a new site to work with XML sitemap using the Add + Save.
The Save button is also used when you edit the XML sitemap.
I'm not too sure I understand the context, but my guess is that depending on the context the XML sitemap has a specific name (you do not have a choice on that name if I'm correct, and you cannot create a custom sitemap with just a specific set of nodes.)
Thank you.
Alexis Wilke
Comment #9
willmoy CreditAttribution: willmoy commentedmiaoulafrite: sorry I forgot to respond to this. At the moment the only different sitemaps you can have (as I understand it) are language specific or subdomain specific ones, with the respective modules.
You only ever need one sitemap at a time (or I can't think of a situation where that isn't true). The module will handle splitting into files appropriately for you, so you don't need to think about.
There is no support yet for e.g. news, mobile etc. sitemaps.
Comment #10
AlexisWilke CreditAttribution: AlexisWilke commentedwillmoy,
Speaking of the splitting, the main XML sitemap settings says "Pages" which I find very confusing. It should be "Chunks" as defined in the sitemap documentation. Plus, Pages can easily be interpreted as the node of type page.
Thank you.
Alexis
Comment #11
davycw CreditAttribution: davycw commentedthis same thing just happened to me in the 7 dev version.. can't find any way around it.
edit: i forgot to mention that i upgraded from the 7 beta that was released on april 29th, and ran the update script.
Comment #12
bitshift CreditAttribution: bitshift commentedI am still getting the message "There are currently no XML sitemap contexts available". As of yesterday I was using the 7.x beta version, but have just now started using the 7.x dev build and still getting this message when I try to edit the settings.
Also, tried:
- delete generate folder in sites/default/files/xmlsitemap
- add a new xml sitemap, click the "update" button for updating cached files
However, it looks like an xml file gets created, but there is only 1 page in the sitemap? Also, I still get the message about "no xml sitemap contexts" when trying to edit.
Any suggestions ?
Comment #13
AlexisWilke CreditAttribution: AlexisWilke commentedbitshift,
Check your Content types, it's probably Off by default.
Thank you.
Alexis Wilke
Comment #14
bitshift CreditAttribution: bitshift commentedUnder content types
Home » Administration » Structure
I have only two at the moment - article and page.
Should I be seeing something for xml sitemap here?
Also, what do you mean by "off by default"?
If your referring to the sub-module "XML sitemap node" then ok, and yes, its turned on.
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedNo, not that page. Edit the content type itself, article and/or page, to find the data field for enabling xmlsitemap for the content type.
Comment #16
bitshift CreditAttribution: bitshift commentedThanks a bunch for the assistance.
Ok, I managed to find the xml sitemap settings for the two default content types I currently have, and sure enough the settings for "inclusion" were set to "excluded". However, after setting those, I still get
"here are currently no XML sitemap contexts available." when clicking on the edit link for the sitemap.
Maybe try clearing my cache again?
Also going to try the above steps later this afternoon, after uninstalling the dev version and reinstalling the beta version.
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedOr just waiting on the cron to do its job.
Comment #18
bitshift CreditAttribution: bitshift commentedNope, I ran cron also
Comment #19
AlexisWilke CreditAttribution: AlexisWilke commentedbitshift,
The message you are talking about is the point of this issue. The message is very misleading. The fact is the default XML sitemap does not require a context (it is the default context.)
We, the people, are trying to get the authors to change that message, hence this post.
Thank you.
Alexis Wilke
Comment #20
bitshift CreditAttribution: bitshift commentedI was having more issues than just the message. What is the meaning of the "edit" link listed with the generated sitemap? What are you supposed to be able to do? That is when I get the message about no context. Yesterday I re-installed the beta version and continue to get that message when I click on "edit". Strange though, today I have many more links in the sitemap after running cron a few times.
Also, I see the node paths instead of the url alias is whats getting into the sitemap. Maybe that is a separate issue and Im off to search on that one.
Comment #21
AlexisWilke CreditAttribution: AlexisWilke commentedThat message is hard coded in the module. You cannot get rid of it without editing the PHP code and changing it (if you feel like doing so.) You can safely ignore it. Anything should raise an issue if you don't get the XML sitemap that you would otherwise expect. Yet it sounds like you are good on that already.
Note that I'm not one of the authors of this module.
Thank you.
Alexis Wilke
Comment #22
bitshift CreditAttribution: bitshift commentedThanks for all the help, but I think I found a solution. The real problem wasnt with the sitemap all along, it was with my clean urls settings. Once that was resolved, the xml sitemap started behaving correctly. See this post for more info.
Comment #23
Anonymous (not verified) CreditAttribution: Anonymous commentedFrom the project page.
Please read the included README.txt, the handbook documentation, and the current list of known issues for more information before using the module.
At least a couple of the links state "Please note that using clean URLs is highly recommended."
Comment #24
Coyote CreditAttribution: Coyote commentedActually, this doesn't look too hard to implement. Now that I've said that, I'll probably blow up my dev site.
Comment #25
samdeskin CreditAttribution: samdeskin commentedAfter half an hour of playing with this, I finally figured it out.
Visit this page:
admin/config/search/xmlsitemap/settings
Go to the section that has Frontpage, Menu Link, Content, and Taxonomy Terms.
Include everything that is excluded that you want.
Then visit:
admin/config/search/xmlsitemap
Delete the existing sitemap.
Then visit:
admin/config/search/xmlsitemap/rebuild
Rebuild a new sitemap.
Go back here:
admin/config/search/xmlsitemap
Add a new sitemap. Then update the cached files.
Visit the sitemap:
sitemap.xml
Do a hard refresh:
Control + F5
That was much harder than it needed to be.
Can I suggest an update to this module to include all public facing content pages? That would make this much easier for a new install.
Comment #26
ikeigenwijs CreditAttribution: ikeigenwijs commentedThis worked for me for generating the sitemap. It is pressent at XMLsitemap/(bunch of chars)/1.xml
But still the message:Page not found
Comment #27
eigentor CreditAttribution: eigentor commented@samdeskin: Your method sounds promising. There is only one problem
http://screencast.com/t/mZrD2oHfth
Access denied for the /rebuild page, even though I am logged in as user 1.
I am using 7.2.rc1 and had a hell of a time getting old 6.x tables out of the database (manually deleted all stuff in the end) and re-enabling the 7.x version.
I guess that is the source of the problems, but I still do not know how to fix them.
Comment #28
luthien CreditAttribution: luthien commentedStill getting the same errors, even after rebuilding sitemap. Also visiting the sitemap gives this error:
Comment #29
themic8 CreditAttribution: themic8 commentedI have the same issue as comment 28.
Comment #30
themic8 CreditAttribution: themic8 commentedI searched my custom modules and custom theme extensively. I even reviewed contrib modules with no luck.
I update my core files and the problem went away. From reviewing other XML related issues like this it seems like a space can get in there from moving the code around.
If you are having this issue I would either update your core or redownload core.
Comment #31
ElegantSolutions CreditAttribution: ElegantSolutions as a volunteer and commentedThe steps from samdeskin #25 were exactly what I needed.
The most helpful step was:
Visit the sitemap:
sitemap.xml
Do a hard refresh:
Control + F5
The refresh was what was required to see the updated data.
Comment #32
jaesperanza CreditAttribution: jaesperanza commentedIn my case, the persistent error appears both on clicking edit an existing sitemap or add a new sitemap. There was a cache implemented by hosting provider (SiteGround, Supercacher), disabling and flushing this cache made the edit and add links work again. Then turned the cache on again.
Comment #33
labman CreditAttribution: labman commentedI have over 3000 pages, all of which are excluded. Is there a way of enabling them all at once?
Comment #34
labman CreditAttribution: labman commentedComment #35
headbank CreditAttribution: headbank as a volunteer commentedI have to agree on the language being misleading or at least needing more clarity.
My situation was having migrated a site to HTTPS, the sitemap still contained http: URLs even after rebuilding files (this was eventually solved by changing the Default Base URL property in Settings, though that step had not been necessary in other sites - anyway, besides the point here).
My first approach was to click "Edit" on the default sitemap, but this yielded only that message and a Save/Cancel UI. I guessed (correctly) that this form must only have contents if additional modules were enabled, and tried the next tactic of deleting and re-creating the default sitemap (loftily ignoring the recommendation against doing this, I know - the next tactic would have been reinstalling the module anyway so I threw caution to the wind!).
After deleting, I clicked "Add new sitemap" only to be greeted by that same inscrutable message and Save/Cancel. IMHO it's far from clear that the correct action at this point is to click Save in order to create the default sitemap, and there was a moment of panic at this.
I'd suggest at the very minimum that, when there is no default sitemap, either (a) an additional line should be added pointing out the need to click Save to create the new one, or (b) in that scenario the button label should be Create instead of Save.
Comment #36
delta CreditAttribution: delta commentedwell 8 years later here I come to this issue to understand what this message means :0 at least I didn't have to dig in the source code.
My initial attempt was to have a separate sitemap for nodes and for users. But apparently I need a context :)
Comment #37
kdleon CreditAttribution: kdleon commentedI'm trying to add another XML sitemap by clicking on 'Add new XML sitemap' and clicked on the Save button , however, it returns with this message "A sitemap with the same context already exists." Is it not possible to add multiple XML sitemaps for say different menus/ content type/subsites?
Comment #38
kdleon CreditAttribution: kdleon commentedI'm trying to add another XML sitemap by clicking on 'Add new XML sitemap' and clicked on the Save button , however, it returns with this message "A sitemap with the same context already exists." Is it not possible to add multiple XML sitemaps for say different menus/ content type/subsites?