Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I add a content type or a menu to the sitemap, I am able to specify the relative priority for the included nodes. But I can't specify the changefreq. This would be nice, especially since the module seems to assign changefreq relatively randomly, and often applies "yearly" to content that should really be re-indexed more often.
Comment | File | Size | Author |
---|---|---|---|
#34 | xmlsitemap-override-changefreq-854632-34.patch | 2.53 KB | nickonom |
#31 | xmlsitemap-7.x-2.x-854632-31.patch | 2.81 KB | wjackson |
#24 | xmlsitemap-7.x-2.x-854632-24.patch | 2.66 KB | seandunaway |
#19 | xmlsitemap-7.x-2.x-854632-19.patch | 2.34 KB | seandunaway |
#17 | xmlsitemap-7.x-2.x-854632-17.patch | 1.67 KB | seandunaway |
Comments
Comment #1
sndev CreditAttribution: sndev commentedsubscribe!
Comment #2
castelar CreditAttribution: castelar commentedIt would be nice to have the option of leaving changefreq blank (or 'none', like custom links) for content types and menu items also.
Comment #3
Dave ReidIt would be nice, but since changefreq is just a suggestion, this is not a feature that will be implemented before 6.x-2.0.
Comment #4
Dave ReidComment #5
dwightaspinwall CreditAttribution: dwightaspinwall commentedOur SEO "expert" said we needed to specify weekly as our max change frequency.
So... here's a patch that implements a user-settable maximum change frequency globally, across all urls in the sitemap. For consideration for inclusion in 6.x-2.x
Comment #6
Dave ReidThen your SEO "expert" is wrong. This value is only a suggestion to search engines and I would not be likely to ever accept this patch. But it might be useful for others so thank you for sharing.
Comment #7
dwightaspinwall CreditAttribution: dwightaspinwall commentedHey no problem. I don't claim to know anything about SEO. We paid him to do an assessment and this was on the checklist.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedThe perception for the term change frequency is that it should be important regardless of whether or not it is so I understand the feature request. Perhaps the implementation should dwell more toward settings.php and a conf variable element rather than a variable_get settings page item. Such settings items tend to give more credence toward the importance when there is really none that should be given.
Comment #9
seandunaway CreditAttribution: seandunaway commented@dwightaspinwall, thank you for this! #5 applied beautifully and I think this feature is very important as Google *was* penalizing us for having yearly changefreq times on all of our content which was generated with views/panels.
Comment #10
saratsubolg CreditAttribution: saratsubolg commented#5: xmlsitemap_max_changefreq.patch queued for re-testing.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedThe patch in #5 is for 6.x-2.x. We need a patch for D7.
Comment #12
saratsubolg CreditAttribution: saratsubolg commentedsubscribe!
Comment #13
Summit CreditAttribution: Summit commentedHi, Shouldn't this patch (http://drupal.org/node/854632#comment-6632914) not first be committed on D6, and then D7 build from another issue?
I have set the version back to 6.2.dev because of queing for re-testing. If this is wrong please set it back to 7, but not without knowing the testing stuff.
greetings, Martijn
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedNo that is not the way the workflow works. We need a D7 patch, then we consider D6.
Comment #15
seandunaway CreditAttribution: seandunaway commentedBeen using #5 in production for several months now and it considerably helped out incoming traffic despite only being a *suggestion* to search engines. Google loves fresh content, and even if some of the content didn't change, it was nice for Google to at least crawl the page and its links more frequently.
Can we get this in? It's a small patch and optional feature.
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #17
seandunaway CreditAttribution: seandunaway commentedAttached.
Comment #19
seandunaway CreditAttribution: seandunaway commentedComment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedDave Reid what do you think about the patch?
Comment #21
bsztreha CreditAttribution: bsztreha commentedI applied this patch to my 7.x-2.0-rc1 version, and seems work fine!
Thanks for the patch!
Comment #22
castelar CreditAttribution: castelar commented7x and 6x both work. This is a must have for larger sites. Please add this!
Comment #23
Dave ReidI think the patch is missing adding this variable to the xmlsitemap_variables() function so that it can be removed on uninstall.
Is there any possible way for this to not match any condition and still hit the end of the function, which now returns NULL rather than 'never'?
Comment #24
seandunaway CreditAttribution: seandunaway commentedThanks Dave,
I made those changes.
I still have the slight concern what if XMLSITEMAP_FREQUENCY_NEVER which is PHP_MAX_INT changes in the same install when moving servers or php is upgraded in the future.
Perhaps it should be XMLSITEMAP_FREQUENCY_YEARLY + 1 or some arbitrary nasty sequence of 9's.
Attached.
- Sean
Comment #25
micheleannj CreditAttribution: micheleannj commentedI'm not sure if I did the patch wrong or are missing something else here.
I ran patch and then set "Maximum change frequency"* to weekly and rebuilt the sitemap but I'm still seeing yearly and monthly update frequencies.
Little help?
Thanks!
Side note: This was a confusing label as I thought it meant 'no more often than' rather than 'no less often than'... maybe it's just me.
Comment #26
seandunaway CreditAttribution: seandunaway commented@micheleannj, use the rebuild links tab.
Comment #27
Anonymous (not verified) CreditAttribution: Anonymous commentedI understand your concern. PHP_MAX_INT could change with the bitness of a system. Open a new issue for it. I think I prefer -1 as the value for XMLSITEMAP_FREQUENCY_NEVER.
Comment #28
mosiur.rp CreditAttribution: mosiur.rp commented#17: xmlsitemap-7.x-2.x-854632-17.patch queued for re-testing.
Comment #29
DamienMcKennaIs there any reason to not just change the frequency to actually store the protocol's strings rather than an arbitrary value that we're now having to work around because we can't shoehorn the 'never' value into it?
Comment #30
csc4 CreditAttribution: csc4 commentedWould it be possible to tweak this to add the frequency to the XML settings per Content type?
Comment #31
wjackson CreditAttribution: wjackson at Kanopi Studios commentedWe recently worked on a project, where the previous patch was used. Recent releases for this project, include security updates and we were required to reapply the patch with the most recent version.
thought the recent discussion recommends alternative methods for providing the frequency, in interest of time we needed to recreate the patch with the most recent version.
Comment #32
nickonom CreditAttribution: nickonom commentedThe patch in #31 contains the absolute paths, which causes the error when the module in alternative places:
However, even after moving the module to hardcoded directory it fails to apply:
The one previous patch also failed, apparently because it's too old while dev branch has gone ahead since then.
Comment #33
nickonom CreditAttribution: nickonom commentedI see many moved to 8.x, but there are still tons' of 7.x websites, so would be nice if the module maintainers made clear which is the recommended path, especially if the light of new recommendation pointed in #29 and #31: https://www.sitemaps.org/protocol.html
Comment #34
nickonom CreditAttribution: nickonom commentedHere is the patch file that should be applied against the last 7.x-2.x version. Hopefully, this will get in before any other changes in dev, as there are still many Drupal 7 websites which badly needs this feature.