Running update.php after installing the latest XML Sitemap fails with:
An unrecoverable error has occurred. You can find the error message below. It is advised to copy it to the clipboard for reference. Please continue to the error page.
Going to the "error page" shows:
Fatal error: Call to undefined function xmlsitemap_helper_update_sitemap() in /home/prodosh/public_html/drupal/sites/prodosh.com/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module on line 179
The error message is:
An error occurred. http://example.com/update.php?id=22&op=do <br /> <b>Fatal error</b>: Call to undefined function xmlsitemap_helper_update_sitemap() in <b>/home/example/public_html/drupal/sites/example.com/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install</b> on line <b>399</b><br />
| Comment | File | Size | Author |
|---|---|---|---|
| #46 | xmlsitemap_helper_update_sitemap.patch | 5.26 KB | googletorp |
Comments
Comment #1
conniec commentedI can confirm this error. Happened to me, too
Connie
Comment #2
sistegraf commentedConfiming same error.
Fatal error: Call to undefined function xmlsitemap_helper_update_sitemap() in /home/EXAMPLE/public_html/EXAMPLE.COM/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module on line 179
Tino
Comment #3
avpadernoDo you see a directory named xmlsitemap_helper into the directory where the project code is copied?
Comment #4
lmw94002 commentedI can confirm the same error. Note the error now prevents me from opening the Modules admin page so I cannot disable / remove the module.
I do see the directory listed with the others.
Comment #5
avpadernoThe module is automatically enabled by xmlsitemap.module during the update; if you didn't run update.php, or update.php didn't enable the module, you can run update.php, and select one of the last updates available for xmlsitemap.module.
Comment #6
lmw94002 commentedI tried dropping all the tables & deleting all the xmlsitemap* variables & removed the module. Re-ran update.php, restarted the box and tried to start fresh...
I placed a new copy of the module in. Tried to enable it and received the error. I tried to run update.php and received the error. Now I can no longer access the modules admin page and receive the error.
all saying the xmlsitemap_helper_update_sitemap() function is bad.
Comment #7
avpadernoRunning update.php doesn't help, if you don't select the right update number
For the archive generated by Drupal on March 10, the correct update number is 6128; for the archive Drupal will generate at midnight UTC, the correct update number is 6131.
The function is defined in xmlsitemap_helper, as the CVS repository shows.
Comment #8
avpadernoI am changing the category, as I cannot reproduce this issue on two web sites I run.
Comment #9
avpadernoI am changing the category, as I cannot reproduce this issue on two web sites I run.
Comment #10
conniec commentedgot it to keep from failing by deleting module from server, which unlocks drupal site. Then run update.php without it. Then reinstall and run update.php. Doesn't lock up drupal site anymore, but doesn't creat xmlsitemap either. :{
Connie
Comment #11
avpadernoIf you keep to get such error, the only solution is to uninstall all the XML Sitemap modules, delete all the files, re-copy them, and enable the modules (including xmlsitemap_helper.module).
Comment #12
gateone commentedIt is what it says:
There is no xmlsitemap_helper_update_sitemap() function in xmlsitemap_helper.module !
Comment #13
lmw94002 commentedI got it to work... sorta...
I had to drop tables and variabes and move the module out. Ran update.php. Moved the module back in. Then I did the module uninstall. Restarted everything for good measure.
Copied the module back in. Re-enabled them one at a time. No more errors.
However, my sitemap that is generated seems to be empty.
Comment #14
avpadernoSee my previous comment; the function exists, and it's also present in the code committed to CVS.
Comment #15
avpadernoI am changing the category, as I am not having the issue on two web sites I installed XML Sitemap on.
Comment #16
alpinejag commentedI had the same problem.
Comment #17
Robert de Bock commentedSame problem here;
Fatal error: Call to undefined function xmlsitemap_helper_update_sitemap() in /var/www/example/html/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install on line 399
Comment #18
alpinejag commentedI had basically do what Kiam suggested to get my site working again. After I removed all the module files I was able to access the admin/modules menu again and uninstall the module. Uploaded the module again, installed it and all seems well.
Not sure why the problem started in the first place though as I went through all the normal steps to update the module.
Comment #19
Robert de Bock commentedFixed by overwriting the latest release over the existing module files.
Comment #20
druvision commentedIt also happens with the latest Drupal 5 dev. Can you apply the same fix?
Comment #21
avpadernoIf you are having the same problem, uninstall all the XML Sitemap modules, and then re-install them (checking that all the files are overridden); re-enable them, and be sure to also select xmlsitemap_helper.module.
Comment #22
avpadernoComment #23
Anonymous (not verified) commentedWhen I upgraded i had exactly the same issue as originally reported.
Original files were deleted before loading new files
From what I remember, as i was unable to disable the module, I removed the module from the server, refreshed the screen which allowed me to get back to the modules page, then dropped the module back to the server and all worked well. I have a sitemap. If their is any info I can provide...
Comment #24
rootworkThis happened to me as well. Original files were deleted, ran update.php, still got the errors.
I was able to comment out the function in xmlsitemap_menu.module in order to re-load the module page. When I scrolled down to the bottom "XML Sitemap: Helper" was DISABLED and also greyed out. Submitting the page anyway seemed to enable it.
Then I un-commented out that line and everything seems to work. But this seems to clearly be a bug.
Comment #25
avpadernoIf it would be a bug, then I would have had the same problem on the web sites I am running XML Sitemap.
The report was open for an issue about a not defined function being called by the code; as the function (
xmlsitemap_helper_update_sitemap()) is defined in a module, the report doesn't describe a code bug.Comment #26
rootworkKiam: I won't change the status back. But in my experience, bugs are inconsistent all the time; just because they don't show up in every instance doesn't mean they're not bugs. There are rendering bugs, for instance, that show up in IE and not Firefox; PHP bugs that show up in some versions of PHP and not others, etc. That a bug happens unexpectedly is sort of the definition of a bug. But let's dispense with the semantics and try to address the issue.
So far I count 9 people in this thread who have experienced this support request. It may be that we all simply munged the installation in some crucial way to produce this support request, though several people say they followed the instructions (remove old directory, unpack new directory, run update.php) exactly. It could also be that in combination with some other module, Drupal configuration, server setup or other outside parameters, a support request pops up.
Several people have now provided the required steps for reporting a support request (from /node/add/project-issue/drupal):
* What are the steps required to reproduce the [support request]?
* What behavior were you expecting?
* What happened instead?
What additional information can we provide that would help you address this critical support request that several people seem to be having with the most recent update? I for one am happy to test out patches and run tests to see under what conditions this support request arises.
Comment #27
N.Simpson commentedI ran into the same issue when I added this to my multi-site installation.
I did notice in build/modules that the 'helper' module was not enabled on my version yet was listed as a prerequisite for sitemap-node. I hadn't spotted the helper module previously, is this new? If so, is there any possibility that this issue is caused by people upgrading from a version prior to the introduction of this module?
Comment #28
N.Simpson commentedIt may be unrelated but I get the following error after reinstalling and reactivating the module:
user warning: Unknown column 'xsm.changed' in 'where clause' query: SELECT COUNT(xsm.loc) FROM sitename_xmlsitemap xsm INNER JOIN sitename_system s ON s.name = xsm.module WHERE s.type = 'module' AND s.status = 1 AND xsm.changefreq <> 0 AND xsm.changed <> 0 AND (xsm.priority >= 0 AND xsm.priority <= 1) in /home/public_html/drupal-sites/all/modules/xmlsitemap/xmlsitemap/xmlsitemap.module on line 596.
Comment #29
rootworkN.Simpson: I had the same experience as you with the helper being disabled even though it was required, and getting a similar error popping up -- and yes, the helper module is new. Submitting the module page (for me at least) seemed to enable the required module that wasn't enabled in the update.
Comment #30
N.Simpson commentedAs per my initial suspicion, if I edit the database of the site and change the status of the xmlsitemap_helper module from 0 to 1 the error disappears and the site (mostly) functions again.
The SQL I used was something like:
UPDATE `dbname`.`system` SET `status` = '1' WHERE CONVERT( `system`.`filename` USING utf8 ) = 'sites/all/modules/xmlsitemap/xmlsitemap_helper/xmlsitemap_helper.module' LIMIT 1 ;
I still see the warning I added in post #28 but this should at least be a step in the right direction for resolving this problem.
Comment #31
N.Simpson commentedAlso, I get an 'Access Denied' page when I try to view sitemap.xml
Comment #32
avpadernoAre you referring to the 6.x-1 branch, or the 5.x-2 branch?
Comment #33
Anonymous (not verified) commentedFirst I have put the version back to 6.x-1.x-dev which was the version originally reported against but was changed in #20
I wonder if the sequence of upgrades makes a difference.
I came from a drupal 5.x-1.6 version back in December to 6.x-0.x-dev and then onwards, in various steps in January and then my last update which was the 12th march release if i remember correctly where i saw the issue in #23
Comment #34
N.Simpson commentedI'm referring to the 6.x-1 branch. Was there an update when the helper module was created which enabled it by default? If so, was the enabling of this module at install time removed in a future release? This is just one possible cause of the issue that I could think of, apologies if it can't happen that way but I'm not intimately familiar with the whole drupal module development/installation process.
Comment #35
rootworkYes, this was all about the 6 branch (didn't see that it had been changed above). It does seem to be fixed in the most recent (April 1) dev release. I'm pretty sure the cause was that the required helper module wasn't being turned on by running update.php. It seems to be getting turned on now, at least in my tests.
N.Simpson and midkemia if the newest dev version works for you too then we can mark this as fixed. Make sure you remove the old directory before unpacking the new one (though I think we were all doing that already anyway).
Comment #36
avpadernothe last release just introduced the French translation of the modules strings that has not been submitted by me.
I am not working on the module in these days as I am not at home.
Comment #37
N.Simpson commentedLooks like the version gets rid of the error message. I am still stuck with the 'Access Denied' page when I try to view sitemap.xml. Any suggestions? I am using XML Sitemap revision 1.1.2.30
Comment #38
avpadernoSee the project page for the access denied error.
Comment #39
avpadernoSee the project page on how to update to the last development snapshots; if you still have the problem, uninstall the modules, and then reinstall them.
Comment #40
Renee S commentedI can confirm I'm getting this too.
Comment #41
Race.it commentedI removed the module, ran update, then put the module back in and ran update, then I get this
The following queries were executed
xmlsitemap module
Update #6000
DROP TABLE {xmlsitemap_additional}
Failed: CREATE TABLE {xmlsitemap} ( `lid` INT NOT NULL auto_increment, `loc` VARCHAR(255) NOT NULL DEFAULT '', `module` VARCHAR(255) NOT NULL DEFAULT '', `type` VARCHAR(32) NOT NULL DEFAULT '', `id` INT unsigned NOT NULL DEFAULT 0, `sid` INT unsigned NOT NULL DEFAULT 0, `language` VARCHAR(12) NOT NULL DEFAULT '', `changed` INT unsigned NOT NULL DEFAULT 0, `changefreq` INT unsigned NOT NULL DEFAULT 0, `priority` FLOAT NOT NULL DEFAULT 0.5, PRIMARY KEY (lid), INDEX link_module (module(25)), INDEX link_type (Array()), INDEX link_language (language), INDEX link_changed (changed), INDEX link_priority (priority) ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Update #6100
No queries
Update #6101
No queries
Update #6102
No queries
Update #6103
No queries
Update #6104
No queries
Update #6105
No queries
Update #6106
No queries
Update #6107
No queries
Update #6108
No queries
Update #6109
No queries
Update #6110
No queries
Update #6111
No queries
Update #6112
No queries
Update #6113
No queries
Update #6114
No queries
Update #6115
No queries
Update #6116
UPDATE XMLSITEMAP_CHUNK_SIZE
Update #6117
No queries
Update #6118
UPDATE MODULE SETTINGS
UPDATE {system} SET weight = 2 WHERE name = 'xmlsitemap'
Update #6119
No queries
Update #6120
No queries
Update #6121
No queries
Update #6122
No queries
Update #6123
No queries
Update #6124
No queries
Update #6125
No queries
Update #6126
Failed: DELETE FROM {xmlsitemap}
Update #6127
No queries
Update #6128
No queries
Update #6129
No queries
Update #6130
No queries
Update #6131
No queries
Update #6132
Failed: CREATE TABLE {xmlsitemap} ( `lid` INT NOT NULL auto_increment, `loc` VARCHAR(255) NOT NULL DEFAULT '', `module` VARCHAR(255) NOT NULL DEFAULT '', `type` VARCHAR(32) NOT NULL DEFAULT '', `id` INT unsigned NOT NULL DEFAULT 0, `sid` INT unsigned NOT NULL DEFAULT 0, `language` VARCHAR(12) NOT NULL DEFAULT '', `changed` INT unsigned NOT NULL DEFAULT 0, `changefreq` INT unsigned NOT NULL DEFAULT 0, `priority` FLOAT NOT NULL DEFAULT 0.5, PRIMARY KEY (lid), INDEX link_module (module(25)), INDEX link_type (Array()), INDEX link_language (language), INDEX link_changed (changed), INDEX link_priority (priority) ) /*!40100 DEFAULT CHARACTER SET UTF8 */
ENABLE 'xmlsitemap_helper' MODULE
FORCE SITEMAP UPDATE
If i try to uninstall I get this
Fatal error: Call to undefined function xmlsitemap_helper_link_count() in /usr/local/drupal/sites/all/modules/xmlsitemap/xmlsitemap/xmlsitemap.module on line 177
Comment #42
Race.it commentedOk, got it working, what I needed to do was uninstall the xml site map modules in the same order as they are enabled, (i.e. if one depends on another you could not try to uninstall them both at the same time) thus the last one to be uninstalled was xmlsitemap, then I reenabled it and did the update.php, this worked fine.
Comment #43
DanielJohnston commentedSame issue, on latest 6.x-1.x-dev, on a site upgraded from Drupal 5. Am going to try deleting all tables and variables then reinstalling. However, advice on which variables I need to delete from which table would be handy - I can see the xmlsitemap tables but variables in other tables are a tad more tricky to find.
Comment #44
avpadernoThe variable names all start with xmlsitemap.
Comment #45
avpadernoComment #46
googletorp commentedI've run into most of the bugs described here during a D5->D6 site upgrade, and I believe and have found the reason and fix to the upgrade bug from drupal 5 to drupal 6.x-1.x-dev version.
There are two scenarios when upgrading from D5, either disabling the XMLsitemap module before running update.php or after. I received different php fails disabling XMLsitemap or not. Both update attempts fails in a similar way, the call to an undefined function.
#1 with XMLsitemap active it fails over xmlsitemap_helper_link_count
#2 with XMLsite disabled before update.php in run, it fails over xmlsitemap_helper_update_sitemap
As you can see both functions is defined in the xmlsitemap_helper module. My guess is that #1 is not a bug, but just a problem with XMLsitemap not loading the function because it hasn't been upgrade, so you should just disabled the module before upgrade. #2 is a bug. The problem is, that when running the update script while the module is disabled, the helper functions wont be loaded so when they are called, it result in php fail. The solution is simply to load the helper module before calling the function. I've tested this on a single site, and it seems to fix the issue #2. You do, however, need to disabled the module first, to avoid error #1.
I have uploaded a patch with the fix
~Jakob
Comment #47
DanielJohnston commented@Jakob: Thanks for the suggestions and the patch. I ended up deleting all xmlsitemap module and storage files, removing xmlsitemap tables and variables from the database, running update.php a few times to make sure nothing was lurking, then reinstalling from absolute scratch.
Sadly, even then I quickly ran into problems, possibly related to it wanting me to run update.php straight after a clean install. Table errors were logged on every page view and every sitemap entry creation, making site access intermittent for anonymous users (but not for me, strangely). I've now removed xmlsitemap, deleted the details from Google Webmaster Tools, and will only come back to this module when it reaches at least RC status. I suspect I've been rather spoiled by using other dev-status modules on live sites without problem.
Comment #48
Anonymous (not verified) commentedYou might want to keep an eye on all the activity in the issue queue. There is a major rewrite happening and I would suggest not even trying at the moment unless you're actively wanting to help develop the code. There have been many commits today so you can try again tomorrow if you want but I don't think you'll find it working quite right just yet.
Comment #49
oldphotos commentedI've done this twice now - and still have the same error. I get it whenever I try to enable any of the xml sitemap modules.
Comment #50
avpadernoThe original issue should have been resolved in the last commits.
Comment #51
Renee S commented@oldphotos: have you tried deleting the entire directory contents and then uploading the new release? That fixed it for me - seems there was something in there that was making it angry, possibly a corrupt file.