• Resolved swissspaceboy

    (@swissspaceboy)


    Hello,

    I have moved to this plugin to handle my sitemaps.

    I get 404 errors when opening sub-sitemaps (using indexes). I checked all the recommendations and even added some Apache .htaccess rewrite rules. I can open the main sitemap, but not the sub-sitemaps.

    When submitting to Google, he gets a 404 too ??

    BUT when disabling the sitemap index (so having one map with all 103 links), then the 404 is gone for me and for Google ! I use this now as a workaround.

    I have this problem on an alias domain and using Polylang. I refreshed my pretty links but it didn’t work.

    Is this a problem with Polylang? I only have one language for now so the URLS are not changed by Polylang.

    I spend 1-2h yesterday reading a lot of stuff, but I cannot get it working using sitemap indexes.

    Thanks for any advice.

    Didier.

Viewing 15 replies - 1 through 15 (of 19 total)
  • Naveen Kharwar

    (@naveenkharwar)

    Hi @swissspaceboy,

    I hope you had a great weekend!

    Can you please share the URL of your site so I can assist you?

    Thanks!

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hi Naveen,

    Thanks for replying.

    My URL of the indexed sitemap: https://www.e-graphics.ch/sitemap.xml

    I hope that you can access, as I have some country redirect in place. Let me know and I open for your country.

    So I have 4 sites with AIOSEO installed, using 3 different themes. On 2 sites I have no 404 errors, but on 2 sites I get this logged error.

    Also, it works one time in two. I go to the sitemap -> 404. I refresh my page with F5, and I get the sitemap. I refresh again, and I get 404. This is systematic on both websites. What the hell is this?

    I have no page caching and no CDN. I’ll do some troubleshooting.

    Any idea? You have seen this before?

    Same problem with the sitemap.rss…

    Thanks.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hello,

    Some more news.

    * I disabled some plugins that could re-write: not better
    * disabled .htaccess: not better
    * added this special code fix for Avada theme (not my theme but tried it anyway): not better
    * I installed plugin “Rewrite Rules Inspector” and I see these rewrites:

    sitemap.xml	index.php?aiosp_sitemap_path=root	other
    (.+)-sitemap.xml	index.php?aiosp_sitemap_path=$matches[1]	other
    (.+)-sitemap(\d+).xml	index.php?aiosp_sitemap_path=$matches[1]&aiosp_sitemap_page=$matches[2]	other
    sitemap.rss	index.php?aiosp_sitemap_path=rss	other
    sitemap.latest.rss	index.php?aiosp_sitemap_path=rss	other

    No other ideas for now ??

    Didier.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Gentle *bump*…my sitemaps are still giving Google fetch problems.

    Didier.

    Naveen Kharwar

    (@naveenkharwar)

    Hi @swissspaceboy,

    Please accept my sincere apologies for not getting back to you sooner.

    I’m facing a 403 Forbidden error on your sitemap. Please take a look at this screenshot – https://a.supportally.com/PjxuaT.

    Can you please whitelist India so I can investigate your sitemap?

    I’m looking forward to helping you.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hi Naveen,

    Thanks for helping out. I whitelisted India, so please check now if you can see the sitemap.

    Today, I can still reproduce the bug. Sitemap..refresh page..404..refresh..sitemap..refresh..404 !! How is this possible?

    Thanks,

    Didier.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    I did some more debugging by dumping all the rewrite rules via some PHP code.

    1. when it works, I see these rules in the array

    
    rewrite rules
    array (
      'sitemap.xml' => 'index.php?aiosp_sitemap_path=root',
      '(.+)-sitemap.xml' => 'index.php?aiosp_sitemap_path=$matches[1]',
      '(.+)-sitemap(\\d+).xml' => 'index.php?aiosp_sitemap_path=$matches[1]&aiosp_sitemap_page=$matches[2]',
      'sitemap.rss' => 'index.php?aiosp_sitemap_path=rss',
      'sitemap.latest.rss' => 'index.php?aiosp_sitemap_path=rss',
      '^wc-auth/v([1]{1})/(.*)?' => 'index.php?wc-auth-version=$matches[1]&wc-auth-route=$matches[2]',
    ...
    permalink structure
    '/%postname%/'
    
    page permastruct
    '%pagename%'
    
    matched rule and query
    'sitemap.xml'
    
    matched query
    'aiosp_sitemap_path=root'
    
    request
    'sitemap.xml'
    
    2. when it doesn't work, I miss the AIOSEO rules in the beginning of the array, so it falls to another rule and 404 
    
    

    rewrite rules
    array (
    ‘^wc-auth/v([1]{1})/(.*)?’ => ‘index.php?wc-auth-version=$matches[1]&wc-auth-route=$matches[2]’,

    permalink structure
    ‘/%postname%/’

    page permastruct
    ‘%pagename%’

    matched rule and query
    ‘([^/]+)(?:/([0-9]+))?/?$’

    matched query
    ‘name=sitemap.xml&page=’

    request
    ‘sitemap.xml’`

    These is a problem here.

    Didier.

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @swissspaceboy,

    I just responded to your other comment about the rewrite rules for Apache, but I was a bit confused as to why you needed those since WordPress should handle the rewrite. Now that I read this thread, it makes more sense why you were trying to add those.

    I have a suspicion you’re running into an obscure plugin conflict that affects the sitemap. Can you try installing this beta build and see if it works?
    https://we.tl/t-eQQOYof2I8.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hi Arnaud,

    I tried the beta version on my 4.1.8 version and I got my WP crashed. I had to restore the old version 4.1.8 and my site (front + back) is up again. Oef. I hate those WSOD “fatal errors” on my production sites.

    So I am not able to test the beta version for the sitemap problem. Please have a check on your side. Quite some changes were done around the flush of rewrite rules. I’ll wait for the final version to check again this sitemap problem.

    Many thanks for the beta fix anyway !

    Didier.

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @swissspaceboy,

    Can you check your error log to see what the error was exactly? The beta runs just fine on my site, so the error must be specific to your site.

    Also, do you mind posting a list of all the plugins/theme you’re using on your website? I’d like to check them out and see if any of them are known to cause issues with AIOSEO.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Let me try the beta on my staging area. Here I can do more investigation.

    Here is already the list of everything:

    Active Theme
    Bold Themes Craftportfolio
    1.2.3
    Active Plugins
    Admin Menu Editor
    1.10
    All in One SEO
    4.1.8
    Automatic Copyright Year
    1.1
    Autoptimize
    2.9.5.1
    BackUpWordPress
    3.13
    Bold Builder
    2.7.8 (needs update - 4.2.0)
    BoldThemes WordPress Importer
    1.0.1
    Broken Link Checker
    1.11.16
    CF7 Smart Grid Design Extension
    4.4.3 (needs update - 4.12.12)
    Contact Form 7
    5.3
    Contact Form 7 Polylang extension
    2.4.0
    Content Protector
    1.0.12
    Cookie Notice
    1.3.2 (needs update - 2.2.3)
    Cost Calculator
    2.3.2
    Craftportfolio Plugin
    1.2.3
    Disable Admin Notices Individually
    1.2.8
    Easy Table of Contents
    2.0.11 (needs update - 2.0.17)
    Easy Updates Manager
    9.0.12
    EGR Custom Functions
    1.0
    Favicon by RealFaviconGenerator
    1.3.22
    Forms: 3rd-Party Integration
    1.8
    Hyyan WooCommerce Polylang Integration
    1.4.3 (needs update - 1.5.0)
    Insert Headers and Footers
    1.6.0
    IP2Location Redirection
    1.25.14
    IP2Location Tags
    2.9.0 (needs update - 2.12.0)
    Loco Translate
    2.5.8
    LP Estimated Reading Time
    1.0
    Meta Box
    5.3.4 (needs update - 5.6.0)
    Meta Generator and Version Info Remover
    13.1
    Open Graph and Twitter Card Tags
    3.0.0 (needs update - 3.1.2)
    Paid Memberships Pro
    2.7.3 (needs update - 2.7.5)
    PDF Embedder
    4.6.1 (needs update - 4.6.4)
    Perfect Pullquotes
    1.7.5
    Polylang
    2.8.4 (needs update - 3.1.4)
    Polylang Theme Strings
    4.0
    Popping Content
    1.14
    Redirection
    5.2.3
    Schema & Structured Data for WP & AMP
    1.9.93 (needs update - 1.9.94)
    Self-Hosted Google Fonts
    1.0.1
    SiteOrigin CSS
    1.5.2
    Spacer
    3.0.4 (needs update - 3.0.5)
    Ultimate Author Box Lite
    1.0.3
    WooCommerce
    4.7.0
    WooCommerce PDF Invoices & Packing Slips
    2.7.1 (needs update - 2.13.1)
    WooCommerce Stripe Gateway
    4.5.5
    WooSidebars
    1.4.5
    Wordfence Security
    7.5.8
    WP Crontrol
    1.8.5 (needs update - 1.12.0)
    WP Last Modified Info
    1.7.5 (needs update - 1.7.7)
    WP OPcache
    4.1.2 (needs update - 4.1.3)
    WPS Hide Login
    1.9.3
    Thread Starter swissspaceboy

    (@swissspaceboy)

    ok. I tried the beta on my staging area and no errors here. But I did it differently. Disabled the current plugin, and uploaded the zip file via WP admin. Enabled and all working fine.

    On my prod site, I used FTP to overwrite all the files. When activating the plugin, it crashed. I never know if overwriting files of an active plugin is the same as disabling a plugin, install new files and disabling. I don’t do it often honestly.

    If I have some time, I will try again on the production site. I have to be careful there as you can imagine.

    Have a good weekend ahead,

    Didier from Switzerland (but Dutch speaking from Belgium)

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Always nice to see a fellow Fleming around here! Living the dream in Switzerland I hope, because you must be missing our fries. ??

    Based on your list of active plugins, I can tell you that Hyyan WooCommerce Polylang Integration is the plugin that is conflicting with AIOSEO. We are aware of that one and the beta build is meant to fix that specific conflict, so I’m glad to hear it’s working on your staging site.

    I sometimes overwrite plugin files via FTP myself but I wouldn’t recommend it on a live production site because, if a request comes in while the files are being overwritten, that request will essentially be served by files from two different plugin versions, which could explain the fatal error. It’s better to update the plugin via the WP admin panel since that process will first disable the plugin temporarily, replace all files and then re-enable the plugin again.

    It might take a little bit of time for us to roll this fix out (we’re aiming for 4.2.0) since it touches very critical sitemap code, so we need plenty of time to test things thoroughly.

    I hope you enjoy the rest of the weekend as well!

    Thread Starter swissspaceboy

    (@swissspaceboy)

    hehe..From Gent-Oostakker. Here in Switzerland since 1992, but I still have family in Gent ??

    aha..I didn’t expect that plugin to cause problems. I suspected something to do with Polylang rewrites. I disabled most of the plugin stuff for testing, except…that one.LOL

    Thanks also for the plugin update procedure, and to disable it first before uploading new files ! Good tip.

    No hurry for the fix. I am running with .htaccess rules for Apache, and this works too.

    Once I have the new version, I will roll back my own htaccess rules and test the latest plugin version. I will report back in case of trouble.

    Thanks for your support and Forza Belgica !

    ??

    Didier.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hallo Arnaud. Groetjes uit Zwitserland.

    Is the fix for the rewrite rules done in the latest version 4.2 ? I cannot find a reference to that in the changelog. Please confirm.

    Thanks,

    Didier.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘404 error for sitemap indexes’ is closed to new replies.