We keep getting errors like this on our cron runs:

Fatal error: Call to undefined function xmlsitemap_write_link() in /usr/www/users/username/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module on line 37

Comments

dave reid’s picture

I am not sure what to tell you. I tried looking through the the latest 6.x-0.x (HEAD) code of xmlsitemap_node, and there's no mention of 'xmlsitemap_write_link' at all. So I have no idea how it's being called. Maybe make sure you are using the latest 6.x-0.x build?

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)
avpaderno’s picture

May you report the correct version of the XML sitemap copy you are using? 6.x-0.x-dev is not the correct one (I am sure of that), and we need to know the correct version you are using.

avpaderno’s picture

xmlsitemap_write_link() is a function I wrote; that limits the possible versions he is running, but leaves more than one choice. We could simply guess he is using a beta version, or an old development snapshot.
It seems that the problem is a mix of files taken from different module versions, or it's caused by files that have not been replaced by the correct version when copying them on the server.

jsimonis’s picture

XML Sitemap 6.x-0.x-dev (2008-Nov-18)

jsimonis’s picture

I think I figured out their problem - they had also uploaded the inside of the folder to the modules folder, which meant that they ended up with the module there twice.

They have to go into the server and stop the cron (it tried to run earlier and locked up). Once they do that, I can verify whether or not we're still getting errors.

dave reid’s picture

I figured it was something like that. Let us know once everything gets sorted out.

avpaderno’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Active

So, to make a summary, there were two copies of the project files, in two different directories. One of the versions is not 6.x-0.x-dev because the reported function has been added to a successive version, and I have not committed code to 6.x-0.x-dev code from ages.

Having two different versions of the same module installed in two different directories is surely a way to not let the module work correctly; what reported here is not a bug of the code, but it is caused by having copied twice the module files.

avpaderno’s picture

Status: Active » Fixed

As who opened the report found the cause of the problem, this report can be considered fixed.

strikehawkecomm’s picture

Title: Error on cron run » Error on cron run Call to undefined function xmlsitemap_write_link()
Version: 7.x-2.x-dev » 6.x-1.0-beta5
Category: support » bug
Priority: Normal » Critical
Status: Fixed » Needs review

Here is my error in the beta:

Subject: Cron <xxxxx@quark> /usr/bin/wget -O - -q http://xxxxxxxxxxx/cron.php
X-Cron-Env: <MAILTO=xxxxxxxxxxxxx>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/xxxx>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=xxx>
X-Cron-Env: <USER=xxxx>
Message-Id: <xxxxxxxxxxxxxxxxx>
Date: Sat, 20 Jun 2009 13:45:01 -0400

<br /
      xmlns:comment="http://xxxxxxxx/rdf/schema/comment#"
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      xmlns:dcmitype="http://purl.org/dc/dcmitype/"
      xmlns:dcterms="http://purl.org/dc/terms/"
      xmlns:drupal="http://xxxxxxx/rdf/schema/"
      xmlns:foaf="http://xmlns.com/foaf/0.1/"
      xmlns:node="http://xxxxxxxxxxxx/rdf/schema/node#"
      xmlns:owl="http://www.w3.org/2002/07/owl#"
      xmlns:path="http://xxxxxxxxxx/rdf/schema/path#"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
      xmlns:rss="http://purl.org/rss/1.0/"
      xmlns:term="http://xxxxxxxxxx/rdf/schema/term#"
      xmlns:user="http://xxxxxxxxxx/rdf/schema/user#"
      xmlns:variable="http://xxxxxxxxx/rdf/schema/variable#"
      xmlns:vocabulary="http://xxxxxxxxxxx/rdf/schema/vocabulary#"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance#">
<b>Fatal error</b>:  Call to undefined function xmlsitemap_write_link() in <b>/home/xxxxx/public_html/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module</b> on line <b>37</b><br />

xxxxxx = omission of actual TLD.SLD

dave reid’s picture

Status: Needs review » Active

@strikehawkecomm: It sounds like you might have more than one version of the base xmlsitemap.module installed. I'd suggest deleting the sites/all/modules/xmlsitemap folder and re-downloading and re-extracting the module.

strikehawkecomm’s picture

Status: Active » Needs review

That was done, already.

XML sitemap 6.x-1.0-beta5
XML sitemap engines 6.x-1.0-beta5
XML sitemap node 6.x-1.0-beta5
XML sitemap taxonomy 6.x-1.0-beta5
XML sitemap user 6.x-1.0-beta5

avpaderno’s picture

The reported long list of XML namespaces confuses me. What is that? Is it supposed to be the output of the module?

Anonymous’s picture

Status: Needs review » Fixed

Since this is reported as beta5 and the -dev code is reset to prior versions and beta6 is near ready I'm marking this as fixed.

Status: Fixed » Closed (fixed)

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