I chekced my site as anonymous user and wen't to sitemap link then got "You are not authorized to access this page." ...

Only when I went to permissions and gave anonymous users the permission to View published sitemap, this problem went away.

I believe with all my heart this permission should be default. I saw this problem quite by chance...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Benia created an issue. See original summary.

mgifford’s picture

Makes sense to me!

azdonald’s picture

azdonald’s picture

Here's a fix

mgifford’s picture

@azdonald this applies well. I'm having trouble replicating the problem though. What are the steps to repliating this problem:

https://simplytest.me/project/site_map/8.x-1.x

vs

https://simplytest.me/project/site_map/8.x-1.x?patch[]=https://www.drupa...

I tried to see the /rss.xml file as an anonymous user to verify this problem.

azdonald’s picture

Hi @mgifford, when installed on a site, you do not see the sitemap option unless you are logged in. This is the project i downloaded. https://www.drupal.org/project/sitemap

thalles’s picture

Project: Site map » Sitemap

switching to the other project

Chris Matthews’s picture

Chris Matthews’s picture

FileSize
1.63 KB

For various reasons the Sitemap maintainers are probably not going to accept this patch. See #3 of the attached README.txt file, also copied below:

Installation:
------------
1. Place this module directory in your modules folder (this will usually be "modules/" for Drupal 8).
2. Go to Manage -> Extend to enable the module.
3. Check the Manage -> People -> Permissions page to enable use and administration of this module for different roles.
4. Make sure the menu item is enabled in Manage -> Structure -> Menus -> Tools. You may move it to another menu if you like.
5. Have a look at the different settings in Administer -> Configuration -> Sitemap
6. Visit http://example.com/sitemap.

akalata’s picture

Status: Needs review » Closed (won't fix)

#9 is correct. We should not change the established conventions of a project, particularly with regards to permissions, without a very strong reason.