Fatal error: Call to undefined function _xmlsitemap_update_cache() in /home/yourface/public_html/iranmypersia.com/sites/all/modules/xmlsitemap/xmlsitemap.module on line 757

This happens when:

New users register
Adjusting sitemap priority number in content types
Submitting new content

Comments

topwaya’s picture

I confirm, I got the same error with Drupal 6.6.
I fixed it by downgrading xmlsitemap to 6.0 dev
(xmlsitemap 6.1 dev produces the error)

jantoine’s picture

Subscribe.

I am getting this error when running cron.

marcus0263’s picture

Yep, I'm getting it when cron is run or when I click on the link to the sitemap in the config

Call to undefined function _xmlsitemap_update() in /var/www/drupal-6.6/sites/all/modules/xmlsitemap/xmlsitemap.module on line 360

wdrupal100’s picture

Confirmed I get it also. White screen of death. Errors are..

[18-Nov-2008 11:40:05] PHP Fatal error: Call to undefined function _xmlsitemap_update_cache() in xmlsitemap.module on line 757
[18-Nov-2008 11:40:08] PHP Fatal error: Call to undefined function _xmlsitemap_update() in xmlsitemap.module on line 360

lomz’s picture

Error too

DickSwart’s picture

Same error here

eddiemonge’s picture

Fatal error: Call to undefined function _xmlsitemap_update_cache() in /var/www/html/domain/sites/all/modules/xmlsitemap/xmlsitemap.module on line 757

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Active » Fixed
wdrupal100’s picture

sorry i am now getting

[18-Nov-2008 18:57:14] PHP Fatal error: Call to undefined function _xmlsitemap_update_cache() in xmlsitemap.module on line 758

since tonights update

avpaderno’s picture

The development snapshots are generated by Drupal every 12 hours. If a project's files are updated before the tarball gets re-generated, you must wait for not more than 12 hours, depending on when the files have been updated.

lomz’s picture

Still getting

Fatal error: Call to undefined function _xmlsitemap_update_cache() in /home/cl-k/web/div/modules/xmlsitemap/xmlsitemap.module on line 758
ivrh’s picture

Status: Fixed » Active

Not fixed at all. Changing status to avoid misleading people.

ivrh’s picture

The quick fix for this issue would be wrapping all functions causing "undefined" function error with if(function_exists("_xmlsitemap_update")) close as below:

if(function_exists("_xmlsitemap_update")) {
complete_function_body here
}

tommy_gang’s picture

confirm the same error, drupal 6.5, I had to downgrade to the previous version of XMLSitemap

web.id’s picture

same problem here

avpaderno’s picture

Status: Active » Fixed

That is completely useless, as the function must be present in the module.
This has been already fixed, and it's already in the DRUPAL-6--1 CVS branch; if you don't want to use CVS to take the fixed code, then you must wait Drupal re-creates the tarball.

Please, don't change the status of the issue. This keeps me to check the updated issue, and stops me from working on the issue fixing.

lomz’s picture

THis was not fixed in the new one from today (19.11) and was created by the version from yesterday (18.11) so the error still exists.

gbrussel’s picture

Confirmed.

This is still an active problem.

Grinch2171’s picture

Very much an active problem. I installed the latest update not more than 5 minutes ago and am still getting this error.

eagereyes’s picture

I just got the error when adding a taxonomy term, but the current (November 19) version of 6.x-1.x solved the problem for me. I also just created a user just to try this out, and no error. This is using Drupal 6.6.

avpaderno’s picture

I downloaded the 6.x-1.x-dev from Drupal, just to see what you all are downloading.

In xmlsitemap.module, at line 768, I find:

/**
 * Update the site map if content has changed.
 */
function _xmlsitemap_update() {
  db_query("DELETE FROM {xmlsitemap}");
  $link = array(
    'loc' => xmlsitemap_url(NULL, NULL, NULL, NULL, TRUE),
    'changefreq' => 'always',
    'priority' => variable_get('xmlsitemap_front_page_priority', 1)
  );
  db_query("INSERT INTO {xmlsitemap} (loc, changefreq, priority) VALUES ('%s', %d, %f)", $link);
  module_invoke_all('xmlsitemap_links');
  menu_rebuild();
  cache_clear_all(xmlsitemap_url('sitemap', NULL, NULL, NULL, TRUE), 'cache_page', TRUE);
  variable_set('xmlsitemap_update', FALSE);
}

The other function has been deleted, and it's not called from code in the module.

Jorge Campo’s picture

I was having the same issue too.

I unchecked the module (all the features) WITHOUT UNINSTALLING the module.
and check them back again.

So far, it seems the problem went away.

avpaderno’s picture

That is interesting; it seems like if Drupal didn't notice the code was changed.
Do you have a module that caches the files, like XCache, or eAccelerator?

jerry’s picture

subscribing

Jorge Campo’s picture

In my case I do not have those modules.

I have the Plugin Manager.
When I tried to update the module iwith Plugin Manager, it showed a big list of duplicated values in red as an outcome (for mysql I guess) plus the green stuff saying "succesfully installed".

However, Plugin Manager kept telling me that I need to update the sitemap module (like it didn't know that I did).

That's when I decided to unchecked it and checked back again, solving the problem.
After this procedure, Plugin Manager told me that my modules were up to date...do not ask me what happened. :/

avpaderno’s picture

Title: Call to undefined function Fatal error » Undefined function _xmlsitemap_update_cache()
avpaderno’s picture

Then it must be an issue with that module.
I am not sure of the reason to use such a module, when Drupal 6 checks for new versions of installed modules, and themes (if it is set to do so, of course).

Jorge Campo’s picture

Bad news.
While I was not receiving the "fatal error" I just check the xmlsitemap and it is empty.
I also get a red message in the Search Engine part:
user warning: Table 'autismoa_drpl01.xmlsitemap' doesn't exist query: SELECT * FROM xmlsitemap ORDER BY lastmod DESC, changefreq, priority DESC, loc LIMIT 0, 50000 in /home/autismoa/public_html/sites/all/modules/xmlsitemap/xmlsitemap.module on line 474.

It seems I need to reinstall the module...perhaps this is the reason why I thought the "fatal error" was fixed.

eagereyes’s picture

Same problem here. I just installed the latest version, which required a db update. There were some errors:

xmlsitemap module
Update #6000
DROP TABLE {xmlsitemap_additional}
DELETE TEMPORARY FILES
Failed: CREATE TABLE {Array} ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Update #6100
Failed: CREATE TABLE {Array} ) /*!40100 DEFAULT CHARACTER SET UTF8 */

sitemap is empty, even after running cron.

avpaderno’s picture

The title of the issue report is Undefined function _xmlsitemap_update_cache(). What you describe here is another problem that has been fixed, and it is not related with the one reported here.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.