The custom link /exampleis either invalid or it cannot be accessed by anonymous users.

Created on 19 July 2018, over 6 years ago
Updated 13 September 2023, about 1 year ago

Hello

I am trying to add custom links but it always returns the same error: "The custom link /example is either invalid or it can not be accessed by anonymous users."

These URLs exist and are accessible (they are pages created with Page Manager), so I suppose it is an error.

πŸ› Bug report
Status

RTBC

Version

1.0

Component

xmlsitemap_custom.module

Created by

πŸ‡ͺπŸ‡ΈSpain mcfdez87

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine ankondrat4 Lutsk

    Hello.

    I have created a patch to resolve this issue.
    As I saw in simple xml sitemap module, when you want to add custom link, will only check if valid it.
    I didn't find solution how check url-links by visible an anonymous user (httpClientFactory and curl doesn't work correct in this case). As for me, better allow user to add custom links, created on site, by self.

  • πŸ‡ΊπŸ‡¦Ukraine ankondrat4 Lutsk

    Added changes to a patch #comment-14894736 with changes test requirements

  • πŸ‡ΊπŸ‡¦Ukraine ankondrat4 Lutsk

    Again, added changes to a patch #comment-14894736 with changes test requirements

  • πŸ‡ΊπŸ‡¦Ukraine ankondrat4 Lutsk

    Added changes to a patch 13 #comment-14894736 with changes test requirements.
    Added validation if available file on site, if add it as custom link.

  • πŸ‡ΊπŸ‡¦Ukraine ankondrat4 Lutsk

    Added changes to a patch 16 #comment-14894736 with changes test requirements.
    Remove test, that check visible added files.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    45 pass
  • @ankondrat4 opened merge request.
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7 updated deps
    last update over 1 year ago
    45 pass
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine ankondrat4 Lutsk
  • πŸ‡ΊπŸ‡ΈUnited States bygeoffthompson

    The latest patch here (2986810-17-change-validation-custom-links.patch) is working as expected for me.

    I found this issue when trying to added view page paths (/news) and custom HTML file paths (/custom-folder/index.html) to XML Sitemap. Each time I encountered the error "The custom link /example is either invalid or it can not be accessed by anonymous users." despite that fact that the paths I was defining did exist and they could be accessed by anonymous users.

    Applying the patch has now allowed me to save these custom paths, fixing the issue encountered. I believe this work is ready to go.

    Thanks

  • Status changed to RTBC about 1 year ago
Production build 0.71.5 2024