Firstly, thanks a lot for this great module, I barely started to play with it but so far it does a fantastic job.

Reasoning behind this feature request:
I get the temptation to advertise the module but some (including me) might think it is not cool at all that to have a module advertisement on their website. I've seen this practice in Joomla! and Wordpress extensions, now it's the first time I see it in the Drupal world.
And AFAIK there isn't a standard way of providing "Generated by" information into the sitemap standard.

So my request is:
Drop the following:
From the generated sitemap.xml:
<!--Generated by the Simple XML Sitemap Drupal module: https://drupal.org/project/simple_sitemap.-->
From the generated sitemap.xsl:
<p>Generated by the <a href="https://www.drupal.org/project/simple_sitemap">Simple XML Sitemap</a> Drupal module.</p>

Or if you disagree with my view at least give the user a choice of whether they want the "Generated by" or not.

To save some of your time I can provide a patch for the dropping of "Generated by" but I guess you will disagree with my view and will not include the patch int the mainstream module. So I don't know how fast I will get familiar enough with the code to provide a patch for the second option.

Just let me know about which path you're leaning towards and I might build the requested feature myself.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dasj19 created an issue. See original summary.

gbyte’s picture

I get the temptation to advertise the module but some (including me) might think it is not cool at all that to have a module advertisement on their website.

I know that advertisement is strictly speaking the correct word, but calling it so seem like I profit from you using the module... it's more the other way around. :)

I've seen this practice in Joomla! and Wordpress extensions, now it's the first time I see it in the Drupal world.

Joomla and Wordpress extensions are often commercial, and it is in the developer's interest to advertise their modules. In contrast, XML sitemap generators (like Drupal's own xmlsitemap), as well as other services/APIs that mainly cater to non-human visitors, often provide meta data about themselves as this does not disrupt the user experience at all. This is the case here.

And AFAIK there isn't a standard way of providing "Generated by" information into the sitemap standard.

There is no need for a standard, comments are not parsed and will be only seen by humans who are checking out the source.

Or if you disagree with my view at least give the user a choice of whether they want the "Generated by" or not.

If at all, I may be OK with making the XSL bit optional/go away, as an argument can be made, that XSL is actually for human visitors. But ATM I don't plan on implementing this without it becoming a popular request, as every feature is added complexity to maintain and we have built ourselves a pretty complex module already with the word 'simple' in its name.

To programmatically remove the string, I see two clean options:

  • Writing a SitemapGenerator plugin by extending DefaultSitemapGenerator and overridng the getXml() method.
  • Altering writeGeneratedBy() in an overridden simple_sitemap.sitemap_writer service.

Does this help?

dasj19’s picture

Yes, it does help... thanks for providing useful suggestions.
For now I guess I'll maintain a patch that takes care of the removing job,
I'll look into a more permanent solution when I get some more time.

gbyte’s picture

Status: Active » Closed (works as designed)

I'll close this request and will consider reopening if it gains more popularity. Until then I invite you to implement my suggestions from #2, this should be much more future proof compared to maintaining a patch.

Jason Brain’s picture

I'd like to have the option as well to remove it. I would also like to have the donation nag removed.

a.milkovsky’s picture

I would like to add my 5 cents here:

1. Donation button:
Imo Drupal.org is a more suitable place for some promotion and getting attention. A donation button might be placed in the module description and/or the personal profile.

I think Drupal.org provides already a good way to recognize personal contributions by the credits system and the commits counter.

If everybody will start showing their donation banners, Drupal CMS will become overloaded with ads. (Look the Wordpress bakend, there are donation buttons and ads everywhere).

2. Generated by text:
I do not think it is necessary. The sitemap.xml page is visible to everybody, not only administrators. This text will be removed anyway by developers. A website looks unprofessional if there are some leftovers like this text. It just adds some extra work. Everybody knows already that "Simple Xmlsitemap" is the best Drupal module for sitemaps :D

Just saying my opinion, ofcourse it is a decision of the maintainer in the end.

FiNeX’s picture

I'm currently manually patching the module for removing the credits. It's unnecessary.

FiNeX’s picture

Update: disabling the XSL the problem is fixed :-)

awm’s picture

I am finding myself needing to do this with the latest version. I want to disable xsl and the generated by linke. I am able to do this by overwritting the service but a patch that allow users to configure this behavior is preferable.

awm’s picture

Title: Drop "Generated by" or make it optional » Drop "Generated by" and XSL or make them optional
Status: Closed (works as designed) » Active

Updating this to active to add a patch. Pls close it if necessary

awm’s picture

awm’s picture

Title: Drop "Generated by" and XSL or make them optional » Drop "Generated by" or make it optional

I realized the xsl has a setting so I added a patch to do the same with generated by

awm’s picture

Status: Active » Needs review
gbyte’s picture

Version: 8.x-3.x-dev » 4.x-dev

3.x is feature complete and on its way to deprecation.

VasiliyRepin’s picture

Thank you for this nice module!
This string generated_by must be appearing by wish of site owner In my opinion. It's bad practice when user can see at sitename.com/sitemap.xml this string for secuirity reasons (maybe). It talks to user that's site works by Drupal.
I need generated_by not showing. There are no applying pathces to latest version.
I want to helpbut I haven't required experience at the moment.

L_VanDamme’s picture

I created a new patch for the 4.x branch based on the same functionality of #11.

L_VanDamme’s picture

Now also including the Generated by line in the xml structure (in stead of simply the xsl)

L_VanDamme’s picture

Once again, including the comment this time

proffstudy’s picture

I read that one of the options to disable the Generated by the Simple XML Sitemap Drupal module form showing up on Node/Entity edit form is by disabling the XSL output via the modules page.
My question is how to disable the XSL output via the modules page? I am using drupal version 9.4.1 and version 4.1.2 of the module.

gbyte’s picture

Status: Needs review » Fixed

It's bad practice when user can see at sitename.com/sitemap.xml this string for secuirity reasons (maybe). It talks to user that's site works by Drupal.

The whole HTML source speaks Drupal - noone will be looking at the sitemap. Good luck anonymizing your site.

Thanks for your input everyone. I've made the XSL branding configurable as it is meant to be used by human visitors.

FYI donation text has been removed permanently in #3294795: Use hook_help() where possible.

  • gbyte committed 2d39f65 on 4.x
    Issue #3067767 by L_VanDamme, dasj19, gbyte: Drop "Generated by" or make...

Status: Fixed » Closed (fixed)

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

awm’s picture

@gdbyte I am not sure what's the credit eticket but shouldn't commit authorship be attributed to the authors namely #11 & #16
https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...

gbyte’s picture

@awm Why would you assume they are the authors of the commit without checking beforehand?

awm’s picture

@gdbyte forgive my ignorance - But I thought it's customary to attribute authorship to all participants even if the utlimate fix/commit is a bit different.
Or maybe I am mixing issue credit and authorship ... Thank you...

AhmedChebil’s picture

@L_VanDamme patch seems to not working on 4.1.3

Also the "Hide branding" dosent work too, the html comment is still there.

My issue is that Google search console considers my sitemap as HTML with a message like :

Sitemap can be read, but has errors
Sitemap is HTML
1 instance
Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.
Examples
Line 1
Tag:
html

Quite unsure about the origin of this issue

If i do a Curl mysite.com/sitemap.xml the output is just standard XML there is no HTML tag, so i'am quite confused is it the credits tag that is considered by the search console as HTML or there is an issue with the search console ?

platinum1’s picture

@AhmedChebil The issue has been closed, so it probably does not make sense to add additional comments.

Your issue should probably have a new issue anyway. I see that someone else has posted an issue on the same topic. See https://www.drupal.org/project/simple_sitemap/issues/3318390

gbyte’s picture

Also the "Hide branding" dosent work too, the html comment is still there.

It's not supposed to remove the comment - it's supposed to remove the XSL content and thus make it invisible to humans. Also it's as much an XML comment as it is a HTML comment.

I have no idea why your search console states the sitemap is HTML. I have several sites using this module with no issues. Feel free to contribute your site's URL to this issue.