When I try to enter custom URL's, I get the error message "The custom link xxx-xxx-xxx is either invalid or it cannot be accessed by anonymous users."

The whole reason I need to use custom URL's is that my pages were not created inside Drupal. They are simply template files that are called upon for specific URL's. That's the only 'special' thing about my Drupal setup. Anonymous users can see them!

Any idea of how to fix this?

Comments

jblumenfeld’s picture

I'm having a similar issue. We have some URLs within the same host/path which are pulled from outside of drupal, (via mod_rewrite rules). Should I be able to add those in to the sitemap as custom URLs?

cestmoi’s picture

I have same error but in my case the link is protected using Content Access.

I actually was trying to test the map's behavior for "protected" nodes when I added a custom link for a protected page to see if it will show in the map. Is xmlsitemap designed to ignore protected nodes ? If yes, then how can I enable it ? Although the map seems to read all my map-enabled protected nodes, they are not "visible" yet neither in the map nor in Google !

I would greatly appreciate clarification re the module's behaviour with protected nodes and how to enable them in case they are not by default.

Cheers

Edit: I just found this post here re xmlsitemap and node access but no enough info on the matter. I want to add that I have node access permission enabled for anonymous users BUT access is controlled however using Content Access module. The sitemap does index protected pages but does NOT show them (not Visible) !

Dave Reid’s picture

@cestmoi: Search engines are anonymous usesr on your site so it's pointless to list links/nodes that are inaccessible to them. So it's working as designed.

cestmoi’s picture

Thanks Dave. I got your point but I actually enabled access for Google (FCF) so there is still a valid reason for my question and it would be great of you to consider such case.

Otherwise, I would appreciate it if you could let me know how I can turn off node access check if feasible.

Thanks so much for your work and kind support

cestmoi’s picture

Ok, after almost a month, since there seems no interest in this valid feature, I am trying to figure it out myself before finding another mod/solution.

I appreciate it if Dave or anyone can just direct me in the right direction. I am wondering if it is to do with this code in the .module file:

if ($link['access'] && $link['status']) {

I am hoping that just changing the above would fix it, although it might look too easy to be enough esp. since I have the feeling more work may be involved considering the no-response I got so far.

I am going to test it and report back if it works for anyone who may need the feature.

Cheers

Dave Reid’s picture

I got your point but I actually enabled access for Google (FCF)

If that's the case then node_access('view', $node, drupal_anonymous_user()) shouldn't return FALSE, but it is still in your case.

cestmoi’s picture

@Dave Thanks for your kind response

I am not sure I got you right but to clarify: In my case, only Google users who click on links-to-protected-nodes (already indexed by Google ) can access that protected node without having to login (granted temp role with access ONLY when referred from Google). So anonymous users cannot normally access protected nodes (unless referred by Google).

I'd hoped there's a simple solution to allow sitemap list (make visible) protected nodes for search engines to see. Since it only lists "links" and not content, that should not be much of a problem if enabled anyways. It would be great perhaps to allow such feature (i.e. allow admins choose whether to make protected-nodes links visible or not in the mod settings). In such case, I guess this should be posted as a "feature request" but I'm not sure how hard/long it is to achieve IF to be considered.

... Further, my concern is not with "Custom" urls since I was trying it just to check why the mod was not normally listing protected nodes. That is why I posted in this issue in the first place.

In the meantime, any hints (files/strings to change) on how to make that possible would be greatly appreciated.

Cheers

Jenya’s picture

What settings need to be set in permissions to allow adding of custom links? I went through all of them and can't seem to figure it out for the life of me. The issue seems to be with path aliases...

When you input: node/120 instead of some-page-name everything works, and even in the XML file it shows properly as an alias.

Jlightning’s picture

Issue summary: View changes

This is still an issue 5 Years later. The XML Sitemap module rejects my link as inaccessible by the anonymous user. However, when the anonymous user accesses the rejected link, it is accessible. Clearly, the logic to determine the accessibility of the link in question is incorrect. Furthermore, the error message implies that setting the "View user profiles permission" will resolve the problem. Changing that setting, does not fix the problem. Shouldn't I decide which link should be included in the sitemap?

mattrock1’s picture

Thanks Jenya (#8). "node/120 instead of some-page-name" was the key for me. Cheers!

gobinathm’s picture

Status: Active » Closed (outdated)

I believe there won't be any support / fix for a problem identified in 6x going forward. Given the fact that D6 is already EOL. Hence i guess this issue can be closed.

Changing the status, if incorrect pls revert the status.