• Resolved NOT-IN-USE-DELETE

    (@rogerwheatley)


    Hello,

    https://www.xxxxxxxx.com/sitemap.xml does not work.
    If I try https://www.xxxxxxxx.com/?feed=sitemap I can see the XML Sitemap Feed – Index. If I click any of the presented links to sitemaps, after a very long wait, I see a cannot access page message (The page isn’t redirecting properly – Message in Firefox). Does this plugin need me to create redirects?

    The website is otherwise working without issue.

    The website has over 17500 posts. Is this plugin unable to handle the number of posts? Or, is there a known plugin conflict

    Any help, input, is appreciated.

    Thank you,
    Roger

Viewing 15 replies - 1 through 15 (of 19 total)
  • Hi Roger, in normal cases you should not need to have to set any special redirects but it might be that on your server a request for an URL that ends with a file extension like .xml is never be passed to WordPress. Can you share a link to your site so I can test this? You can use the contact form on https://status301.net/contact-en/ if you wish to keep it private.

    Are you on an Apache server (with an .htaccess file) or on Nginx or other? If you have a .htaccess file in your site root, you might want to to check it for specific rules that target sitemap(.*).xml requests.

    The number of posts may be a problem if your server is not allowing enough memory to process them all at once. You can go to Settings > XML Sitemap and set the option “Split by” to Year or Month so your posts will be delivered in smaller groups. It will help sitemap speed as well as solve out of memory issues.

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    This works:
    https://www.xxxxxxxx.com/?feed=sitemap
    This does NOT:
    https://www.xxxxxxxx.com/sitemap.xml

    This works:
    https://www.xxxxxxxx.com/?feed=sitemap-posttype-page
    This does NOT:
    https://www.xxxxxxxx.com/sitemap-posttype-page.xml

    This does NOT work:
    https://www.xxxxxxxx.com/?feed=sitemap-posttype-post.2019
    This does NOT work:https://www.xxxxxxxx.com/sitemap-posttype-post.2019.xml

    Permalinks (pretty) work for every post and page on the website. WordPress is set to use: /%postname%/

    Is the plugin itself trying to redirect something? I’m wondering if the issue is because “.xml” is used?

    It can indeed be the .xml extension (test if a request like /doesnotexist.xml generates a WordPress 404 page or if you get the same message in Firefox) but it can also be another plugin blocking feeds and/or archives.

    Do you have Yoast SEO installed maybe? Or another plugin that could be doing that? Test if you can access regular RSS feeds like /feed/ or regular archives like /2019/

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    Done! URL sent in that contact form.

    Yes, Apache with .htaccss in public_html

    No .xml is targeted (everything else including permalinks are working).

    Yes, memory was increased to over a gig, and also “split by year” was enabled

    Thanks!
    Roger

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    In .htaccess, should I remove:

    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/plain text/xml text/css application/x-javascript application/javascript text/javascript
    </ifmodule>

    and

    <filesMatch "\\.(xml|txt)$">
        Header set Cache-Control "max-age=216000, public, must-revalidate"
      </filesMatch>

    While it’s not redirecting, would it interfere with this plugin maybe?

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    Update… removing the xlm max-age and compression for .xlm did not change anything.

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    Yes /doesnotexist.xml returns error 404.
    No, Yoast is not installed.
    /feed/ page is working.

    Strange, your main sitemap sometimes sais “This is not a valid feed template” and other times I get too many redirects … there must be something interfering like another plugin or the theme.

    Do you have the Redirection plugin installed maybe?

    I notice the server (or a plugin or theme) insists on adding a / to the end even if there is a file extension. Do you have any idea what is causing that?

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    Thank you. Checking if I can find out about the “/” perhaps that is the cause of all for this plugin? Looking now…

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    I don’t see anything that’s adding the trailing / to urls.
    I decided to try a handful of other WordPress powered websites, they all do the same thing.

    Amazon is used to offload image files only, and does not effect post/page urls (only images). There is no other redirect.

    This might be crazy… But because
    https://www.xxxxxx.com/?feed=sitemap-posttype-page works
    and
    https://www.xxxxxx.com/sitemap-posttype-page.xml does not.

    Is there a fast way to edit the plugin files (find replace) so that no urls use .xml, .2019, etc.? (I know, this probably sound a bit nuts).

    I’ve been trying for a while, to figure out what is happening.

    I’m still digging 😉

    Hmmm… just for testing: could you open the sitemap plugin in the WordPress plugin editor and find the file controller/global.php and then find the lines 26 and 27 that look like this:

    
    // force remove url trailing slash
    add_filter( 'user_trailingslashit', 'xmlsf_untrailingslash' );
    

    now add two slashes in front of that second line so it will be like:

    
    // force remove url trailing slash
    //add_filter( 'user_trailingslashit', 'xmlsf_untrailingslash' );
    

    and save the changes.

    Then see if /sitemap.xml/ generates a sitemap…

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    Wow!!!! Woot, woot!! 😀
    You sir, are a genius! 🙂
    That worked!
    Awesome! Thank you!

    You are welcome but remember not to update the plugin or your change will be overwritten. I see you are using a theme from Themeforest, so I wonder if that is causing this conflict. Do you have another site on the same server that uses a “normal” theme?

    Thread Starter NOT-IN-USE-DELETE

    (@rogerwheatley)

    No other website on this same server, but I’ll put a test website up later.
    Side note: I temporally disabled mod_security just to test in case there was a pattern match (but that didn’t change anything)
    Yes, maybe that has the conflict, I’ll see if I can find that out at my end.
    Also, if I find the specific cause/conflict, I’ll post here for everyone.

    Thank you very much, that will be awesome and very helpful for me so I can try and put in a fix before the next release 🙂

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘The page isn’t redirecting properly’ is closed to new replies.