An error occurred. http://vindstille.net/update.php?id=35&op=do <br /> <b>Fatal error</b>: Call to undefined function xmlsitemap_add_database_batch_operation() in <b>/home/cl-k/web/base/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install</b> on line <b>367</b><br />
Comments
Comment #1
avpadernoxmlsitemap_add_database_batch_operation()is defined at line 18 of xmlsitemap/xmlsitemap/includes/xmlsitemap.install.inc (the path is relative to the archive root directory).The code in xmlsitemap_node.module is the following:
The code first load the required file, and then it calls the function.
I am changing the category of the report, as I don't have this issue in the test site I use; I don't have it even on my web site.
Comment #2
avpadernoSee also #385104: Division by zero when the database table is empty, which describes an error that should not be possible to have, if Drupal would not be able to find the
xmlsitemap_add_database_batch_operation()function.Comment #3
nickbits commentedHi,
I get the same error on my site:
Nick
Comment #4
avpadernoAre you sure that all files have been copied on the server?
Comment #5
reinis commentedHi!
Same error here:
When I go to the error page, it show differently:
Update:
I cleared my website cache and reinstalled the module - same result.
Is it possible to get previous version of dev module - that one worked fine.
Comment #6
avpadernoxmlsitemap_update_sitemap()is defined at line 454 ofxmlsitemap.module.I cannot tell you why your PHP installation doesn't see a function that is defined. It can be because some cache system used by the web server, or for some any other reason. I installed the project modules on my web site, and they work.
Comment #7
CharlieHipHop commentedSame problem here, and now my sitemap is toast.
Comment #8
nickbits commentedYes, have done it twice and checked. Have cleared Drupals cache, the server cache (well I am told that has been cleared), but no joy.
I have not installed any other modules so I assume it is not a conflict with any other module.
Cheers,
Nick
Comment #9
drfuzetto commentedI am having the same problem and I don't see the xmlsitemap_add_database_batch_operation function defined anywhere.
Comment #10
avpadernoIf you don't see the function, maybe you didn't copy all the files. The function is present, as you can see in the CVS repository.
I downloaded the tarball archive from Drupal, and installed it on my web site; if it would not work, I would have the same problem you have, but I don't have the problem.
Comment #11
mikeytown2 commentedDisable all xmlsitemap modules
Delete the xmlsitemap dir from sites/all/modules
Re-Upload
Re-Enable
That usually fixes strange errors with modules.
Comment #12
stanley78 commenteddoesn't help. the same error.
Comment #13
eagereyes commentedSame problem here. I definitely copied all the files, I simply untarred the archive, as I always do. The function is defined in xmlsitemap/includes/xmlsitemap.install.inc, but perhaps that doesn't get included? It's not clear to me how this works, since I don't see a reference to the file anywhere.
Comment #14
mikeytown2 commented@stanley76 and eagereyes, what version/date shows up when you go to admin/reports/updates ?
Comment #15
avpadernoThe file is loaded with a call to
module_load_include('inc', 'xmlsitemap', 'includes/xmlsitemap.install'). You will see that function call before the call toxmlsitemap_add_database_batch_operation().My guess is that Drupal doesn't update the data about the module it saves, or caches in some database tables. I still have to understand why I don't have this problem in two sites where I am using XML Sitemap.
Comment #16
eagereyes commentedOkay, this is interesting. It was showing 6.x-1.x-dev (2009-Feb-08) before, which had bothered me because I think my last update is from Thursday or Friday. I untarred the new version again and it didn't change. So I deleted the entire directory and now it's showing 2009-Mar-01 and the update worked! I don't understand this.
But in any case, problem solved for me! Hope that also helps others who might still have the problem.
Edit: Actually, it looks like a whole bunch of files have been moved around, so perhaps Drupal was picking up the wrong files.
Comment #17
mikeytown2 commented@eagereyes
http://drupal.org/node/385452#comment-1300738
Comment #18
eagereyes commentedYeah I know, I thought I had done that - but between reverting files and digging around for that function, I guess I screwed something up again.
Comment #19
stanley78 commentedi've already uninstalled module. will try to install from scratch
Comment #20
stanley78 commenteddefinetely interesting. uninstalling and removing directory didn't help. but one day later it has worked...
maybe some magic with cache?
Comment #21
shuklasp commentedI have the same problem on my site. I removed the old code and reinstalled it. But the problem persists.
The error message is:
Please look into the matter.
Regards
Comment #22
josh@pixael.com commentedsame problem here!
Comment #23
josh@pixael.com commenteddeleting directory and uploading new tarball update work correctly
Comment #24
avpadernoComment #25
avpadernoThis error should not appear anymore, as the code has been moved to a different module; the problem of Drupal still using the outdated xmlsitemap.module path should be resolved in this way.
Comment #26
avpadernoComment #27
eule commentedhi
latest dev. on the database update: XML Sitemap revision 1.1.2.27
* warning: array_merge(): Argument #2 is not an array in /srv/www/vhosts/example.com/httpdocs/update.php on line 174.
* warning: Invalid argument supplied for foreach() in /srv/www/vhosts/example.com/httpdocs/update.php on line 339.
Comment #28
gbrussel commentedI can confirm ekn33's error. Digging around, it looks like the
$retvariable was changed in the 6131 update, but there is noreturn $ret;line as in previous updates where that same var was changed. The first error:* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/destinationdiabetes.americandiabeteswholesale.com/html/update.php on line 174.relates to the functionupdate_do_onewherein this line exists:$context['results'][$module][$number] = array_merge($context['results'][$module][$number], $ret);.My guess is that the $ret variable was not defined as an array or was never passed to the update_do_one function, thereby throwing the error.
Comment #29
avpadernoI am changing the category as the last error is clearly caused by a bug.
Comment #30
avpadernoThis has been fixed on CVS.
Thanks for your report, and for your help in tracing the cause of the bug.