Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I deleted the old module, uninstalled it, and then installed beta 6.1 but now my http://exemple.com/sitemap.xml return a 404 error, I also ran cron.php but the result is still the same, as admin or as anonymous user!
I don't know what went wrong..
Comment | File | Size | Author |
---|---|---|---|
#110 | beta3.patch | 799 bytes | alex.k |
#110 | function-xmlsitemap_output.php.txt | 2.47 KB | alex.k |
Comments
Comment #1
apadernoComment #2
apadernoDid you clean the Drupal cache?
Do you see any files being created, in the directory you selected for the sitemap cache files?
I cannot reproduce this error on my site, which is probably caused by the files not being created, yet.
Comment #3
introfini CreditAttribution: introfini commentedI have the same problem. The nodes are getting added to xmlsitemap_node table but the cache directory is empty.
introfini
Comment #4
apadernoTry with the development snapshot that will be generated between 11 hours.
Comment #5
apadernoComment #6
alliax CreditAttribution: alliax commentedYes I clean drupal cache and I also deleted the sitemap created by the previous xmlsitemap I had installed.
The folder is here /files/xmlsitemap but the file is not being created, on cron.
Comment #7
dropchew CreditAttribution: dropchew commentedfor my case after 1 cron run, a file called xsm-bf1996bd.xml is created in /files/xmlsitemap. But example.com/sitemap.xml still return a 404 error.
Edit. My bad, its from a previous dev version. Pls ignore this.
Comment #8
apadernoI traced down the error, and it is caused from this code:
When the Drupal variable checked is not initialized, the IF-statement doesn't execute the block of instructions, which contains the call to
_xmlsitemap_create_cache_files()
; this causes the 404 error being seen when trying to access the sitemap.I would change any occurrence of
variable_get('xmlsitemap_sitemap_needs_update', FALSE)
invariable_get('xmlsitemap_sitemap_needs_update', TRUE)
.Comment #9
apadernoComment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedYou might need to execute cron.php more than once. If the cron.php runs more than 240 seconds (the maximum execution time for cron.php) not all hook_cron implementations will have been executed in that time frame. I've seen this error for this reason alone.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedRe #8: I don't think changing the default from FALSE to TRUE helps any based on #10. I have seen this error right after a fresh install and executing cron.php for the first time. FeedAPI will take most of the 240 seconds pulling aggregate data and creating nodes on my test site. Visiting sitemap.xml will give a 404. However, after (a) subsequent execution(s) of cron.php the error clears and a visit to sitemap.xml produces results.
Comment #12
apadernoI had this error on my test site, and I ran the cron tasks more than once. I resolved it by creating a Drupal page, and adding a line like
module_invoke_all('xmlsitemap_links')
.In a web site where the project modules have been uninstalled, and then the newer version of the files has been installed, it's more probable that the error is caused from the code I reported in #8, which uses
FALSE
as default value for the Drupal variable; this means that the first timexmlsitemap_output()
is executed, that Drupal variable doesn't exist and the IF-statement (which should call the function to create the cache files) doesn't execute its block of instructions.Comment #13
apadernoAs the default value of a Drupal variable is used only when the variable is not found in the database table, making that change doesn't cost too much, and it doesn't have any collateral effects (if I don't need more coffee, indeed :-)).
EDIT: I tested the change I was proposing on my test site, but it doesn't resolve the issue. It is also true that causing the cron tasks to be executed many times doesn't resolve the issue.
The only way to resolve the issue (as I have found until now) is to invoke
hook_xmlsitemap_links()
for all the modules.Comment #14
alliax CreditAttribution: alliax commentedCreating a page with PHPCode input filter with this code:
didn't help create a file in /files/xmlsitemap
I used tools tabs and "flag the sitemap as requiring update" and also ran cron several times, but no file has ever been created.
What did I do wrong? Since you said that invoking hook_xmlsitemap_links() for all modules resolves the issue?
Note that I didn't do the change you suggested in #8 because you then seem to say that it doesn't solve the issue.
Comment #15
apadernothe exact sequence it to first run cron.php at least twice, and then execute
module_invoke_all('xmlsitemap_links')
.Comment #16
alliax CreditAttribution: alliax commentedI just tried one more time: I did execute cron.php several times (but all my nodes and terms are already in the db, because cron runs every 20 minutes and I have only a few hundreds) and then I displayed my page with module_invoke_all('xmlsitemap_links') in php, nothign has been created, i ran again cron, but still nothing.
I wonder how many people have the same error as I do, obviously the main developpers don't have this problem otherwise they wouldn't have released the beta yet.
Comment #17
dhwall CreditAttribution: dhwall commentedI'm having the exact same problem.
Comment #18
jackfoust CreditAttribution: jackfoust commentedAlso experiencing.
Comment #19
giorgio79 CreditAttribution: giorgio79 commentedsame here
Comment #20
green monkey CreditAttribution: green monkey commentedsame here
could it be Global Redirect? ... Pathauto?
could the wrong version of this program been bundled for download?
Comment #21
Rush_iam CreditAttribution: Rush_iam commenteddon't work for me too....
version 6.x-1.0-beta1 that marked as "Recommended"
Comment #22
stroker CreditAttribution: stroker commentedSame for me using recommended version.
Drupal 6.11
PHP 4.3.11
Comment #23
edegro CreditAttribution: edegro commentedI've also run cron a dozen or so times and still nothing is produced.
Comment #24
Giuseppe CreditAttribution: Giuseppe commentedsame problem...
Comment #25
savvypatachonica CreditAttribution: savvypatachonica commentedMe too... not working with 6.x-1.0-beta1. Tried just about everything on this thread, still "page not found" at www.foo.bar/sitemap.xml
Comment #26
apadernoThe referring version is 6.x-1.x-dev because the code is first changed in the development snapshot; that is the way Drupal does it.
Comment #27
green monkey CreditAttribution: green monkey commentedyou want a mysql database and list of modules to use for testing?
Comment #28
apadernoUhmmm... no; it should not depend from the presence of other modules.
Comment #29
green monkey CreditAttribution: green monkey commentedok, just trying to offer support
does this matter?
sites/default/files/xmlsitemap/ (confirmed 775)
sites/default/ (confirmed 555) - no writes
Comment #30
apadernoIt's useless to ask if you see any files in the first directory, because I am sure you don't see any files there.
Just to be sure, does the xmlsitemap table contains any row?
I am changing the title to something that better describe the problem; the module could not return a 404 error message, but the problem could still be present.
Comment #31
Giuseppe CreditAttribution: Giuseppe commentedThe xmlsitemap table of the db doesn't contain any row, whereas xmlsitemap_node and xmlsitemap_term does.
Cache files and sitemap.xml aren't created.
Comment #32
ak_dm CreditAttribution: ak_dm commentedI can confirm that I have the same behaviour as Giuseppe (#31).
First install of xmlsitemap, the directory permissions all appear correct & the various modules are enabled.
The xmlsitemap table is empty, however xmlsitemap_node does contain some entries.
Have run cron a number of times with no errors being reported.
Comment #33
dropchew CreditAttribution: dropchew commentedUsing the latest dev, after running cron 2-3 times, and creating a page after that with
I can confirm example.com/sitemap.xml is generated. For my case I have over 10K+ nodes and it took a while. In sitemap.xml, there are 2 other links sitemap0.xml and sitemap1.xml, which I can also confirm the urls in them are generated.
Edit: After creating the page with the snippet, xmlsitemap table will be populated
Comment #34
giorgio79 CreditAttribution: giorgio79 commentedit works for me as well.
First I tried it without calling cron.php, just executing invoke all on a page, and got this:
Parse error: syntax error, unexpected T_VARIABLE in /includes/common.inc(1654) : eval()'d code on line 14
But then I Called cron, and the next time I Called that page it executed for about 5 minutes for 30 000 nodes and terms, but it worked :)
Comment #35
sl27257Subscribe
Comment #36
ak_dm CreditAttribution: ak_dm commentedCreating a page with the above code to invoke the module manually did populate the xmlsitemap table for me, however the file itself still didn't get created.
Comment #37
giorgio79 CreditAttribution: giorgio79 commentedHmm, I checked as well, mysite/sitemap.xml and got this
Fatal error: Allowed memory size of 103809024 bytes exhausted (tried to allocate 19456 bytes) in /modules/acquia/filefield/filefield_field.inc on line 169
Comment #38
apadernoI find out the problem, and I should be able to release a beta2 in 36 hours.
To make a summary, the issue is that the cache files are not created; this happens because
hook_cron()
of the single modules doesn't flag the sitemap as requiring update; the same flag is used from the code that verify if the cache files must be updated/generated. This explains also because the workaround to execute the cron tasks, and then execute code likemodule_invoke_all('xmlsitemap_links')
really fix the problem.I didn't have this issue because I didn't uninstall the modules from my test site; doing so, the central database table was already populated, and the cache files were regularly created.
Comment #39
apadernoComment #40
green monkey CreditAttribution: green monkey commented@Kiam
Thank you for your time and enegry to find the problem
there were two other things I found a bit odd
on a fresh install, Drupal wanted me to run "update.php" and did many tasks
also I noticed you have a xlmsitemap/xlmsitemap structure .. that might confuse some newbies - but then again I am sure you have a reason
Comment #41
apadernoI noticed that too. Maybe that is caused by the fact there is an update function named
<module>_6000()
; that function is required for updating from Drupal 5.The executed queries don't cause any errors, and there isn't a way for the module to cause that. I don't know why Drupal forces you to execute update.php.
The directory structure is thought to make easier to create the template files used for the modules translation; other than for people helping with the translation, the directory structure should not be of interest for the end user, who should just use the project modules.
Comment #42
apadernoThis should be fixed in CVS.
Take in mind that the sitemap will start to get populated after the cron tasks of the XML Sitemap project are executed. This means that the sitemap could appear empty for some time; it doesn't mean the code is still bugged.
Feel free to reopen it if you have evidences that the code is not correct.
Comment #43
green monkey CreditAttribution: green monkey commentedok .. almost there
I now have data in the below and the counts match thier source
xmlsitemap_node
xmlsitemap_term
but the below is still empty
xmlsitemap
Comment #44
green monkey CreditAttribution: green monkey commentedforgot to reopen
also noticed "update.php" wants to rerun very time
Comment #45
green monkey CreditAttribution: green monkey commentedComment #46
apadernoAfter you noticed that the database tables have been populated, did you try to visualize the sitemap in your browser, and verify if the cache files are effectively created?
Comment #47
green monkey CreditAttribution: green monkey commentedyes I did that
I even FTP'ed in with a refresh and no file
Then with FTP, I looked in site.com/sites/default/files/xmlsitemap/
no files
Comment #48
apadernoDo you see any Drupal reports that refers to that directory, or any other reports made from xmlsitemap?
Comment #49
green monkey CreditAttribution: green monkey commentedcron
2009-05-11 19:00
Cron run completed.
Anonymous
cron
2009-05-11 18:39
Cron run completed.
staff
cron
2009-05-11 18:38
Cron run completed.
staff
cron
2009-05-11 18:05
Cron run completed.
staff
cron
2009-05-11 18:00
Cron run completed.
Anonymous
cron
2009-05-11 18:00
Cron run completed.
staff
xmlsitemap
2009-05-11 18:00
The sitemap has been flagged as needing update.
staff
thats all I have
Comment #50
apadernoThanks for your answers.
Just to be sure, which version are you running?
Comment #51
green monkey CreditAttribution: green monkey commented// $Id: xmlsitemap.module,v 1.1.2.113 2009/05/10 19:49:25 kiam Exp $
Drupal 6.11
Comment #52
apadernoThe version you have is not the one that should fix the problem. The sitemap will not be created in seconds, anyway.
I am changing the status of the report; feel free to reopen it after you updated the project files installed, and you still noticing the problem.
The steps to follow to be able to see a sitemap being populated are:
EDIT: I noticed that the second parameter passed to
fopen()
was wrongly set to wb while it should be set to w+. You need to wait until the new archive gets generated, or change the code yourself.Comment #53
green monkey CreditAttribution: green monkey commentedthank you
I'm confused now, what link should I be using and version should I check for?
Comment #54
apadernoThe version I am referring is 6.x-1.x-dev, which is reported in the project page.
You had the 6.x-1.x-dev version released two days ago; to be sure you have the latest development snapshot, you should check the release date as reported in the project page for each release.
Comment #55
green monkey CreditAttribution: green monkey commentedok, a little better now and thanks for your help
this is what I have now
mysite.com/sitemap.xml
displays
and nothing else
using - xmlsitemap.module/1.1.2.114 xmlsitemap.install/1.1.2.56
// $Id: xmlsitemap.module,v 1.1.2.114 2009/05/12 00:05:26 kiam Exp $
cache and that same table are empty - but other two tables show correct counts
advice?
Comment #56
dropchew CreditAttribution: dropchew commentedSame issue here..
Comment #57
green monkey CreditAttribution: green monkey commentedI fogot to add
using FTP, still no file in the root - so I would assume the text I do see is coming from the module?
Comment #58
apadernoYes. It's the output of the module; the module will never create a sitemap.xml file in the root directory.
Note also my previous comment (#52); what I meant is that you should wait until 12:00 PM GMT, to download the archive containing the code that fix an incorrect parameter passed to
fopen()
; the archive you downloaded doesn't contain the fixed code.Comment #59
green monkey CreditAttribution: green monkey commentedok - thanks
Comment #60
Anonymous (not verified) CreditAttribution: Anonymous commentedActually, wb+ would be the correct version. The b is a windows thingy. It opens the channel in ``binary'' mode versus ``text'' mode. Volumes have been expounded in numerous mail lists about text vs binary mode. You definitely want the b.
Comment #61
apadernoThanks for the suggestion, earnie. I right changed the code, hoping I am not late for the tarball re-generation.
Comment #62
introfini CreditAttribution: introfini commentedNow the tables are getting populated and the cache files are also created. But when I call the sitemap.xml from the browser the request never ends and no file is loaded.
I'm using the latest code from CVS.
Thanks,
introfini
Comment #63
apadernoHow many nodes do you have in your web site?
Comment #64
introfini CreditAttribution: introfini commented80.000 (sorry I have meant to say that but I forgot)
Comment #65
grafik CreditAttribution: grafik commented6.x-1.0-beta0 : /sitemap.xml - error 404
6.x-1.x-dev : returns only:
Site: 300 nodes, 6 node types
Comment #66
apadernoThe topic of the report is the cache files are not being created. From your report, I would guess they are created.
I am going to set this issue as fixed because I have been able to get back a sitemap in a test site with 20000 nodes, and 10000 taxonomy terms. The sitemap is still not complete, but it contains much of the links it should.
Comment #67
brett_miller CreditAttribution: brett_miller commentedHi, I got the new version to work by creating a page that contains the below:
This was mentioned earlier in the thread :)
Comment #68
green monkey CreditAttribution: green monkey commented// $Id: xmlsitemap.module,v 1.1.2.115 2009/05/12 20:35:27 kiam Exp $
with
#67 above .... works :-)
xmlsitemap 1,586
xmlsitemap_node 717
xmlsitemap_term 864
and reminder is users
Comment #69
keereelXML Sitemap: 6.x-1.0-beta3
Drupal: 6.11
Nodes: about 8500
Sitemap:
Any solutions?
Comment #70
apadernoDo you see any file in the directory you set to be used like cache directory?
Comment #71
dropchew CreditAttribution: dropchew commentedHi I have the same situation as keereel after 3-4 cron runs, the dir is there but no files are in it.
Comment #72
grafik CreditAttribution: grafik commentedmy cache file is empty
Comment #73
apadernoComment #74
chrisschaub CreditAttribution: chrisschaub commentedNo cache files being created with Beta3. Latest Drupal 6.11, unix. Cache dir gets created, but no files within. The xmlsitemap_node table has rows, all with a priority of -2. This was a clean install, not an upgrade. Thanks.
Comment #75
chrisschaub CreditAttribution: chrisschaub commentedWill the fix in #67 ...
be good from there on out? Will I have to run each time until this gets fixed? Or is this just a catch up step? Thanks.
Comment #76
apadernoWhat I suggested (the invocation of all
hook_xmlsitemap_links()
implementations) is a workaround that worked for me when I was not differently able to make the module produce a sitemap; it's something that is only temporary, until you are able to get a valid sitemap from the module.The referring version is the development snapshot because it's where the code will be fixed. Please, don't change the referring version if you don't read the full thread.
Comment #77
keereelno, it's empty
Comment #78
popetardo CreditAttribution: popetardo commentedxmlsitemap.module/1.1.2.117 xmlsitemap.install/1.1.2.58
I deinstalled the previous version of the module using admin/build/module/deinstall . Remove module directory, untar new dev version. Enabled the module, configure.
then I created a page in my theme directory page-xmlsitemaplinks.tpl.php whith
enter in mysite.com/xmlsitemaplinks
then run cron.
The module created a sitemap index whith
...
...
There are one thousand of urls in each one.
This site have thousands of nodes, eight thousand nodes, eight thousand users, a lot of terms, etc.
Good work.
Edit: there are 4 sitemaps in the index now. It works!
Comment #79
apadernoIt would be simpler to create a node of type page, and use the PHP filter for its content; then you can insert
There is no need to create something in the theme directory for two reasons:
I would add that you are adding something that is logic tier in the presentation tier (see Multitier architecture). Said in other words, it's bad and it must be avoided.
Comment #80
green monkey CreditAttribution: green monkey commentedis there a way to move
into a cron function? and delete the helper page I've created?
Comment #81
green monkey CreditAttribution: green monkey commentedhead-up
Drupal is currently recommending Beta3 as the module to use.
anyone "not" following this thread is going to download the wrong version and also create more tickets and work for you
Comment #82
bstrange CreditAttribution: bstrange commentedjwells is correct, beta 3 is what I used and have the same problem as listed by jwells in #55 and made a seperate ticket for it. If possible, maybe that ticket could be merged with this one.
as a matter of clarification, is the 6.x-2.x-dev released today the version that we should be using or the 6.x-1.x-dev released yesterday?
Comment #83
apadernoThat is your choice; take in mind that the 6.x-2 branch is still not complete, and it doesn't have xmlsitemap_taxonomy.module, i.e. Read well what reported in the project page about the 6.x-2 branch, and take your choice.
Comment #84
giorgio79 CreditAttribution: giorgio79 commented6.2 worked seamlessly for me for nodes, I kind of gave up on 6.1 :)
Comment #85
grafik CreditAttribution: grafik commentedno change after upgrading to 6.x-2.x
content of sitemap.xml not contains nodes:
Comment #86
dropchew CreditAttribution: dropchew commentedgrafik - There is no upgrade path from 1.x, you have to uninstall 1.x completely and install 2.x (click on rebuild).
Comment #87
apadernoThere is not update path for the 6.x-2, so far.
Comment #88
ad6 CreditAttribution: ad6 commentedThe version 6.x-2.x-dev is the only that worked and is working for me, BUT every time I must click REBUILD to include new created articles.
Comment #89
2xe CreditAttribution: 2xe commentedEDIT: I discovered I had a few old XML Sitemap API functions in my code; disabled them, and now it seems to be generating the site map! Sorry for the inconveniance it may have caused you...
I did however get a memory exhaustion error. Maybe you should add an advanced setting that allows (users who are in control of their servers...) to set the php memory_limit? With my current limit of 60Mb it manages to fill approx 10 000 rows in the xmlsitemap table on each run.
----
I am having the same issue;
- Started with a system with no previous installations of xml sitemap
- Using current snapshot of -dev version (installed beta 3 first, but then i got to this post......)
- drupal 6.12 on linux
- cron'ed tens of times
- executed module_invoke_all('xmlsitemap_links') several times
- tested viewing sitemap.xml
Result:
- xmlsitemap_taxonomy table contains about 800 records
- xmlsitemap_node table contains around 24000 records (and counting....)
- xmlsitemap table isn't populated
- no files created in files/xmlsitemap (but directory exists)
- sitemap is empty like #69
Comment #90
grafik CreditAttribution: grafik commenteddropchew - Thanks, it works
Comment #91
apaderno@#89: The code is being rewritten, and it will not try to populate all the links in one time anymore.
How the code is being changed is shown in #465734: Use sitemap chunks per module to prevent the rebuilt of all the cached files. The actual referring version for that report is 6.x-2, but it describes the changes I am going to make to the 6.x-1 branch.
Comment #92
apadernoI set #467278: Nothing Created as duplicate of this report.
Comment #93
apadernoI set #467534: Sitemap empty and no option to update old nodes as duplicate of this report.
Comment #94
nrackleff CreditAttribution: nrackleff commentedSubscribing. I have the same issue. Nodes are in the table, but nothing in cache directory even with 775 permissions.
Comment #95
apadernoI set #464998: XML Sitemap doesn't work as duplicate of this report.
Comment #96
eazy87 CreditAttribution: eazy87 commentedSame here, I experience this issue with the stable and development versions from Drupal 6.x (xmlsitemap_nodes has data, but xmlsitemap table is empty).
Which is the status of this request? Is it being worked on, or the workaround from 'popetardo' is the only way round this?
Comment #97
apadernoSee #458546-76: Cache files are not created to understand why the referring version is the one I set.
If you don't read all the comments, then please avoid changing the issue metadata. Thank you.
Comment #98
Dave ReidAlmost 100 comments and we still haven't gotten this fixed. This is a critical issue before we can get a beta4 released. Kiam or earnie, do you need help debugging this?
Comment #99
apadernoI am working on that, but I had to completely change the code, to get it work as it should.
In the code I am developing, when the cache files are not present, or are not created for any reasons, the code will ask to the single modules the first 100 links that are part of the chunk being requested. This is because the cache files are not generated when a sitemap chunk is requested, but in a different moment.
The code will assign a specific set of chunks to each modules, and in a sitemap chunk will not shared between two different modules.
Until now, the code I am developing works correctly in the test site I have. I am optimizing a little this code, then I will write the part that should create the cache files.
Comment #100
apadernoThe latest commits done in CVS adds a way to create the cache files using a script that must be invoked in the same way cron.php is invoked.
The next step will be to add an option in the tools page that allows to create the cache files.
The last committed code, in the case the cache files are not present, outputs the first 100 links present in each sitemap chunks.
Comment #106
FiNeX CreditAttribution: FiNeX commentedI hope this will be fixed soon too. Thanks for your efforts!
Comment #107
2createwdrupal CreditAttribution: 2createwdrupal commentedSame.
I tried everything, spent hours updating, deleting, uninstalling, installing, all versions. Nothing worked. Worse - I had saved a version that did work and had been working, up until the betas came out (after which point nothing worked) - I reinstalled that older version and, even after deleting every new xmlsitemap file and uninstalling and updating the database, running cron, it wouldn't work.
On the plus side, after all that, I tried a free online service for a sitemap. I inspected the resulting file and found many errors in taxonomy and a few other areas. I manually corrected many of the errors in the file and I'm using that while hoping for a new xmlsitemap module that works. Thanks to Dave Reid for his blog post about the module; it helped to understand the situation. Meanwhile, I'm fixing some of the odd taxonomy issues on my site which were never the fault of xmlsitemap.
:)
Comment #108
alex.k CreditAttribution: alex.k commentedHope this is not derailing the discussion... My symptoms upon a fresh install of beta3 were similar to reports above: xmlsitemap_* tables were populated on cron, but downloading the sitemap returned just an empty one. No cache files were created. xmlsitemap table was never populated. Looking at function xmlsitemap_output() it goes something like this:
The check for an empty map causes hook_ xmlsitemap_links never to be invoked. Commenting out this check makes everything work. Seems like if the table is truly empty, the function will go on and check for new links anyway, and still return correctly an empty sitemap, so checking the count early on is not a must.
Comment #109
apadernoThanks for your report, alex.k. I think your comment helps who has the beta3 version.
For the benefit of who is using the beta3 version, may you report the complete code of the function as you modified it?
Comment #110
alex.k CreditAttribution: alex.k commentedAttaching a patch against the beta3 release, and the complete function xmlsitemap_output() after the patch has been applied.
Comment #111
apadernoThanks for sharing your code. This could surely help who is using the beta3 version.
That part of the code has been completely changed in the development snapshot, and it will be changed as well in the next beta4 version.
I have only a doubt about the fact the function doesn't check the parameter it gets; what should happen if you pass a string to the menu callback? The condition in the statement
if ($chunk < ... )
would be verified.Comment #112
apadernoWith the development snapshot that Drupal.org will make available in the new tarball archive, the code outputs the sitemap content using the data contained in the XML sitemap database tables, when the cache files are not found, or it's not possible to open them.
The cache files are now created in a different time from when the sitemap content is being viewed.
I am working to the code that allows to update/create the cache files from the tools menu, or from a file that must be invoked in a similar way cron.php is invoked. That code doesn't actually work, and I am changing it.
Comment #113
ReinVelt CreditAttribution: ReinVelt commentedmodule_invoke_all('xmlsitemap_links') solved my problems. The cache and the sitemap are now generated properly.
Comment #114
nocte CreditAttribution: nocte commentedSubscribe - having the same problem :(
Comment #115
fatfish CreditAttribution: fatfish commented+1
Comment #116
apadernoThe sitemap tools menu already allows to update/create the cache files.
Comment #117
apadernoThe sitemap tools menu already allows to update/create the cache files.
Comment #118
apadernoAs the sitemap cache files are not created when the sitemap is being viewed, and the module offers two different ways for generating them, I am setting this issue as fixed.
Take in mind that, in absence of cache files, the code will output the sitemap chunks content directly from the database tables content.
Comment #119
apadernoIn the next 12 hours I will create a beta4 version.
Comment #120
green monkey CreditAttribution: green monkey commentedHi guys,
this thread is getting confusing and a bit long #119
what ya say we take some of #118 and add in what is required to explain output / cache files properly then add it to the module hearder info and prehaps the readme as well.
I'm thinking dev 2 and dev 1 and beta need a line or two of yack yack, as it stands now a new person would download the beta version, is that correct?
I'd be happy to, but I have no access to this area
Comment #121
apadernoThe new beta version has already created; it's available for download from the project page.
Comment #122
Rhino CreditAttribution: Rhino commentedSubscribe (Have an empty sitemap after upgrading to beta3 last night, now switching to beta5)
Comment #123
apadernoI am adding an issue tag.
Comment #124
sandino CreditAttribution: sandino commentedThank you for this great module!
as well as for many other users here 6.x-2.x-dev is the only version that is working for me and working excellent
i have a multilanguage site with path prefix for different languages and sitemap is created only for main site without prefixes
how can i add to sitemap all links with prefixes, e.g. www.example.com/de/ ?
Comment #125
Dave Reid@sandino: Multilingual support is planned, but not yet implemented. See #470602: Support for multilingual sites.
Comment #126
apadernoComment #127
Xallum CreditAttribution: Xallum commentedHi,
I hope, you can help me. The creation of my sitemap.xml takes a lot of time (I have thousands of nodes and users). Unfortunately there is also a timeout of the server. I increased the timeout limit, so it works now. But I think that Google & Co. would not wait for such a long time. That's why I have copied the functions for building the sitemap in a new php-file and start it with a single cronjob every night.
I thought that when I have created the cache otherwise, the call of sitemap.xml would not create files again. For the first minutes I have the effect that I want to, but after a few minutes / hours the cache will be created new when I call the sitemap.xml.
What do I have to change (maybe in xmlsitemap.pages.inc?) to only show the cache files (or print an empty sitemap if there are now ones) when calling sitemap.xml?
Thanks for help!
Comment #128
apadernoYou don't say which version you are using, and it's not possible to answer you without to know that.
The code should not return an empty sitemap (without data for even a link) because Google would report that the sitemap format is not known.
Comment #129
Xallum CreditAttribution: Xallum commentedThanks for your fast answer. I'm using Version 6.x-1.0-beta3. I meant with "or print an empty sitemap if there are now ones" that at least something happens (function print_empty_sitemap) or there is a response. But this is only an option, normally there are cache files, created by the script file executed by the cronjob.
Comment #130
apadernoThe code I developed doesn't create cache files during cron tasks. During cron task the modules simply populate their database tables.
It's not clear if by script file executed by the cronjob you mean xmlsitemap.cron.php; if that is the case, that file works only of beta4, or beta5. That could explain the problems you reported.
Comment #131
Xallum CreditAttribution: Xallum commentedI think you have misunderstood me. I created an own php file, in which I copied the relevant functions of your module to create the cache files. I call this file with an own cronjob (not drupal based). The problem is, that if I call the sitemap.xml hours later, the cache files will be created new. I want that if I call sitemap.xml only the cache files, created by my task, will displayed. There should not be created new ones, because this progress takes several minutes.
Summarizing: What do I have to change to only show the cache files (and not to generate new ones) if I call sitemap.xml.
The generation of the cache files should only be done by the script composed by myself (already works).
Comment #132
apadernoThe module contains a xmlsitemap.cron.php that is thought to be invoked by a cronjob to create the cache files; that is the reason I was not understanding your question.
I cannot reply about your code because I don't know it; I can only answer you about code present in the XML sitemap project.
Comment #133
Xallum CreditAttribution: Xallum commentedYeah, that's what I want to. I want to know, what I have to comment out in your module to stop producing cache files when calling "sitemap.xml" - it should only show the cache files like yet, as though it has produced them by itself. As I sad, I had to outsource the production because of performance.
Thanks for help!
Comment #134
apadernoNow I understand better; thanks for explaining me what you were asking.
In that case, I cannot give you any answers because I don't have anymore the code I have developed. I can answer to any doubt you have about the code I developed, but I don't remember in the specific any single lines of code.
Comment #135
Anonymous (not verified) CreditAttribution: Anonymous commented@Xallum: I understand what you're asking. I will need time to review the code which for the moment isn't happening because of a dire family emergency. I barely have time to be online responding here. Please open a support request with an appropriate title since this one is fixed.