Here's a patch to update the module to 5.0. It also rolls in a couple of unrelated improvements (sorry about that).

Comments

drewish’s picture

Status: Active » Needs review
StatusFileSize
new128 bytes

and here's the .info file.

drewish’s picture

StatusFileSize
new807 bytes

oh here's the install file.

lyricnz’s picture

module_exist() should be module_exists()

"google sitemap" in menu should be "Google Sitemap" (or just Sitemap, if this module changes name)

drewish’s picture

StatusFileSize
new28.34 KB

yeah that was a pretty old patch.

Eric Cosky’s picture

I tried using these patches to update gsitemap for 4.7 to work with drupal 5.0 and was met with error messages upon applying the second patch (gsitemap_for_5.0 from #4). I tried all the permutations I could think of, no luck for me today though. Below is the patch output in case it helps. It looks the same if I apply this on it's own or after the first patch in this thread. Thanks for any advice and my apologies if I've missed something obvious to people more familiar with all this.

patch < gsitemap_for_5.0.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: gsitemap.module
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/gsitemap/gsitemap.module,v
|retrieving revision 1.56
|diff -u -r1.56 gsitemap.module
|--- gsitemap.module    22 Nov 2006 22:53:16 -0000      1.56
|+++ gsitemap.module    14 Dec 2006 19:44:17 -0000
--------------------------
Patching file gsitemap.module using Plan A...
Hunk #1 failed at 1.
Hunk #2 failed at 11.
Hunk #3 failed at 32.
Hunk #4 failed at 67.
Hunk #5 failed at 93.
Hunk #6 failed at 152.
Hunk #7 failed at 191.
Hunk #8 failed at 321.
Hunk #9 failed at 337.
Hunk #10 failed at 362.
Hunk #11 failed at 377.
Hunk #12 failed at 407.
Hunk #13 failed at 418.
Hunk #14 failed at 447.
Hunk #15 failed at 472.
15 out of 15 hunks failed--saving rejects to gsitemap.module.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- D:/drupal/drupal_head/sites/all/modules/gsitemap/gsitemap.info
|+++ D:/drupal/drupal_head/sites/all/modules/gsitemap/gsitemap.info
--------------------------
Patching file gsitemap.info using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|
|--- D:/drupal/drupal_head/sites/all/modules/gsitemap/gsitemap.install
|+++ D:/drupal/drupal_head/sites/all/modules/gsitemap/gsitemap.install
--------------------------
Patching file gsitemap.install using Plan A...
Hunk #1 succeeded at 1.
Hmm...  Ignoring the trailing garbage.
done
drewish’s picture

StatusFileSize
new12.38 KB

okay here's an updated patch. i'll post the .info and .install separately.

drewish’s picture

StatusFileSize
new128 bytes

.info

drewish’s picture

StatusFileSize
new807 bytes

and .install

Eric Cosky’s picture

Getting closer, almost there but not quite now. I applied the patch to the last release and there were no errors. I downloaded the info and install, had to rename them to gsitemap.info and gsitemap.install, respectively (of course) and I was able to see this module in the module settings. Couple minor things, the menu naming conventions have changed for drupal v5 so casing should be fixed. But more importantly, when editing the admin>site configuration>gsitemap, there are error messages that come up, there are three of these when hitting the page the first time and then five when saving settings.

    * warning: htmlspecialchars() expects parameter 1 to be string, object given in /nfsn/content/cosky/htdocs/drupal-5.0-rc1/includes/bootstrap.inc on line 589.
    * warning: htmlspecialchars() expects parameter 1 to be string, object given in /nfsn/content/cosky/htdocs/drupal-5.0-rc1/includes/bootstrap.inc on line 589.
    * warning: htmlspecialchars() expects parameter 1 to be string, object given in /nfsn/content/cosky/htdocs/drupal-5.0-rc1/includes/bootstrap.inc on line 589.
    * warning: htmlspecialchars() expects parameter 1 to be string, object given in /nfsn/content/cosky/htdocs/drupal-5.0-rc1/includes/bootstrap.inc on line 589.
    * warning: htmlspecialchars() expects parameter 1 to be string, object given in /nfsn/content/cosky/htdocs/drupal-5.0-rc1/includes/bootstrap.inc on line 589.

Probably related to this is the fact that my sitemap at ?q=gsitemap doesn't come up, presumably it's failing internally due to settings being invalid or something like that.
Getting close though, thanks for your efforts.

Eric Cosky’s picture

After a little investigation I was able to change line 320 of gsitemap.module to say "module_exists" instead of "module_exist" and the ?q=gsitemap now appears to work, but the errors mentioned before are still occurring in the settings page. Reference: http://drupal.org/node/64279#module-exists
Also, re: naming, perhaps this v5 update would be a good time to rename everything to XML Sitemap? Just a thought - cheers

mcncyo’s picture

Status: Needs review » Postponed (maintainer needs more info)

can someone create a patch to go between 4.7 release to the latest patch version?

drewish’s picture

Status: Postponed (maintainer needs more info) » Needs work

i think this would be a better status.

mcncyo, are you saying that there are changes in the 4.7 branch that aren't in HEAD?

drewish’s picture

StatusFileSize
new14.14 KB

humm, it looks like that last version of the patch was old. this should be a better version.

Eric Cosky’s picture

#13 fixed the errors. Applying to a fresh install of the 4.7 version of this module didn't provide the gsitemap.info though; not sure if that can/should be part of a single patch file or not but the one provided by entry #1 worked for me.

RobRoy’s picture

Status: Needs work » Needs review
StatusFileSize
new27.92 KB

Here's an all-inclusive update for D5 working of drewish's last patch. This fixes some bugs and does some code cleanup, but there is still some cleanup left to do.

greggles’s picture

I tested RobRoy's patch in #15 and functionally it worked fine for me.

artis’s picture

Is there any good reason why this patch isn't built into a full module and added to the new Contrib Release System as sitemap 5.x?

greggles’s picture

@artis, did you test the patch? Did you review the patch? Those are the only helpful things to do with a patch.

Asking nebulous questions and insinuating that the maintainer is derelict is not helpful.

SamAMac’s picture

I have applied the patch from #15 to HEAD. I have not had an chance to test it myself yet (still haven't set up a Drupal 5 site), so please post here if it works for you or if you have issues.

RobRoy’s picture

Status: Needs review » Fixed

If it has been applied to HEAD then this should be marked fixed. I recommend branching to DRUPAL-5 and then we can post any issues against that version as separate issues.

Thanks Sam!

artis’s picture

greggles it was not my intention to be sarcastic...I can see how my text came across that way though. I'm new to drupal but have been testing various modules for 5.x already and really wanted to test this one. I am not confident in my ability to apply the patch correctly though. So the only way for me (and many others like me) to test or review this would be in a full module form that we know how to install. I'm not completely up to speed on the process of how a module turns from a patch to a Release Contrib so I was just asking the an honest question. I should have been more clear in my intentions.

Now that it is a full module I will test and review....Thanks!

P.S. This may not be the right place for this response...if so can someone point me to where I should have responded.

greggles’s picture

@artis - thanks for the explanation and yes, I assumed your comment was sarcastic when in fact you were trying to help so shame on me for that bad assumption.

Patching is not so hard once you get the hang of it. There are even several handbook pages on the subject like http://drupal.org/diffandpatch

Also, thanks, SamAMac for reviewing/applying it and to Drewish, RobRoy and others for your work.

SamAMac’s picture

There is now a development snapshot for 5.0, so I'm going to mark this thread as closed and let people file bugs against the new version as RobRoy suggested.

Thanks again to everyone who contributed!

Anonymous’s picture

Status: Fixed » Closed (fixed)