First let me say that I appreciate all the great work that's going into developing this module... so feel a bit petty for having to pass on a client request that the link to your Drupal project page be removed from the bottom of the sitemap. I'd like to be able to do that in a way that's simple and won't have to be "re-patched" with each new release. So ideally, it would be nice to have an option to include (or not) the link to the project page. I think a lot of people using your module will be gracious enough to be happy to link to your project page (especially if that's the set default), but if a client says that they don't like that, it would be best to have a simple way to remove it without hacking/patching the module... especially while it's in active development and we may be regularly updating it.

Thanks for all you're doing and for considering this request. :-)

Comments

Dave Reid’s picture

Well I knew eventually someone would come along and request this. There are several solutions that do not require any hacking of the module files:

1. You could just disable the XSL output via the modules page.
2. You can use a string override to change Generated by the <a href="@link-xmlsitemap">Drupal XML sitemap module</a>. to an empty string
3. You can override the menu path of 'sitemap.xsl' to output your own custom XSL.

LoMo’s picture

Thanks for the quick response, Dave.

I'm afraid I'm not sure you mean by 1 ... where do I disable the XSL output? And I didn't even know there was a path for sitemap.xsl ... I'm not well-phrased in that.

#2 isn't an option for this site since it's not multilingual. It doesn't have the appropriate modules on (I don't think) to do any kind of string overrides... and unfortunately I don't have the privileges to add modules that aren't already on the project to the server (I'm an intern), and the more senior developers who do have those privileges don't have the time right now. Catch-22.... :-/

Since I need to leave for a trip soon (only a few work hours left), so I likely won't figure out the appropriate workaround before I go since there are plenty of other things to work on now, but do hope the option can be added to just simply turn on/off that "credit line"... and if added, I DO plan to keep it turned on for most sites. I don't see any reason not to provide a link to the project in most cases. :-)

Dave Reid’s picture

The String overrides module doesn't require you to have a multilingual site and doesn't have any dependencies. I'd highly suggest checking it out.

Another alternate solution is to put the following code in your site's settings.php file:

$conf['locale_custom_strings_en']['Generated by the <a href="http://drupal.org/project/xmlsitemap">Drupal XML sitemap module</a>.'] = '';
ataxia’s picture

I was wondering whether there is a fix in the works for this. I have a client with a site that is prone to hacker attacks, and I'd really prefer not to patch the module (which is our current solution.)

(This site is actually a 6.x site, but I didn't want to change the overall settings for this issue.)

Thanks!

Anonymous’s picture

It seems there are many suggestions already given to override the issue, can you not use one of them? I don't see this feature request, if considered viable, to ever be back ported to D6.

Dave Reid’s picture

Status: Active » Fixed

Multiple options have already been provided.

Status: Fixed » Closed (fixed)

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

PlayfulWolf’s picture

Is it in current 7.x-2.0-rc2?

tame4tex’s picture

Your alternate suggestion didn't work for me. I needed to add the following to the settings.php file for it to work:

 $conf['locale_custom_strings_en'][''] = array(
   'Generated by the <a href="@link-xmlsitemap">Drupal XML sitemap module</a>.'      => '',
 );
pwiniacki’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

Hmm my client wish that all drupal cms info won't be visible. I could not persuade him that this is non-revelant and besides meta generator there is MANY different things that will lead advanced developer 'oh it's drupal'. But after panic in media about 'hackers' he is stubborn to hide everything with 'drupal' in it's name.

Anyway... shouldn't this module ->has an option<- to hide "Generated by the Drupal XML sitemap module."? It would be nice and clean solution for all those who think 'hackers' are waiting to put their cooking page offline. Well maybe there are some cases that big sites are afraid crackers... so they can use it to :) What do you think?

Dave Reid’s picture

Status: Active » Closed (fixed)

There are several solutions outlined in https://www.drupal.org/node/962268#comment-3666748.

Dave Reid’s picture

@pwiniacki: I would forward this to your client: https://www.drupal.org/node/475858. Your site likely has several pointers that it runs Drupal already, even the non-obvious ones. No automated bot is going to be scanning for that string in your sitemap's style sheet and it's a very unwarranted fear.

Coyote6GraphX’s picture

For anyone still using this module or trying to figure this out, please note that the translate text for Drupal 7 has changed... Took a bit of detective work to find out why it quit working.

$conf['locale_custom_strings_en'][''] = [
  'Generated by the <a href="@link-xmlsitemap">Drupal XML sitemap</a>.' => ''
];
ahaomar’s picture

Generated by the Drupal XML sitemap module.

Can any one tell me how can i remove this msg in drupal 8 ?

$conf['locale_custom_strings_en'][''] = [
  'Generated by the <a href="@link-xmlsitemap">Drupal XML sitemap</a>.' => ''
];

these solution not working. I added in setting.php file at end right ?

gayathri09’s picture

Any update on this for Drupal 8?

tce’s picture

@gayathri09: Putting the below into my settings.local.php file worked

$settings['locale_custom_strings_en'][''] = [
  'Generated by the <a href="@link-xmlsitemap">Drupal XML Sitemap module</a>.' => '',
];