• Resolved nicolenanw

    (@nicolenanw)


    Hi

    This morning I found that xml sitemap was showing 404 error.
    I’ve been using your xml sitemap for last 2 years and never had this problem before.
    It was working fine till last week and the error occurred on 25th, according to google search console.

    I haven’t changed any settings so I don’t know why this error have occurred all of sudden.
    I also did troubleshooting following your document, but everything was fine aside NGINX.
    I skipped NGINX thing because I hadn’t changed server.

    Could you please help me out asap?
    Thanks in advance!

    Ena

Viewing 8 replies - 1 through 8 (of 8 total)
  • I have exactly the same problem, and I don’t know how to solve it.
    Can you please help me?

    Thank you.

    Plugin Support Shivam Tyagi

    (@shivamtyagi)

    Hi @nicolenanw,

    Can you please temporarily deactivate all the plugins except AIOSEO and switch your theme to the default “Twenty Twenty”? Then please go to Settings > Permalinks which will flush your permalinks. Please check your sitemap again and let me know if you’re still seeing a 404 error.

    Hi @shivamtyagi,

    I have switch my theme (Avada) to the default theme and the sitemap.xml has worked properly again.

    I have been using your plugin for several years and always with Avada and I have never had this problem
    Any suggestion?

    Thank you very much for your answer.

    Plugin Support Shivam Tyagi

    (@shivamtyagi)

    Hi @cjcgl,

    This is a known issue with some sites using the Avada theme and will be fixed in one of the next releases. In the meantime, we have a code snippet that can be added which will allow the sitemap to work.

    add_action( 'wp_loaded', function() {
    	if ( ! function_exists( 'fusion_library' ) ) {
    		return;
    	}
    	$multilingual = fusion_library()->multilingual;
    	remove_filter( 'option_rewrite_rules', [ $multilingual, 'wpml_portfolio_slug_filter_rewrite_rules' ], 1, 1 );
    }, 5);
    Thread Starter nicolenanw

    (@nicolenanw)

    Hi @shivamtyagi,

    Thank you for your answer!

    I activated the Twenty Twenty theme and the sitemap was working.
    Actually I’m using Avada as well.

    I added the code to functions.php file of child theme, but it showed an error.
    Do I have to add this code to a different file?

    Thanks for your support!
    Ena

    I can confirm this fix worked for us too! Avada is always giving us functionality-related headaches. Anyways, I’ve added that code snippet to the PHP inserter plugin we have, which adds that into the Avada theme’s functions.php file. This way, no child theme is necessary. A good enough solution for now. I’ll keep an eye out for patches or updates for Avada. Thank you!

    Thread Starter nicolenanw

    (@nicolenanw)

    Hi

    I tried it out again and it worked ??

    It seemed like when I tried it at the first time, the code snippet was encoded in a strange way since I copied it from email, but not from this forum.

    Thank you for your help, @shivamtyagi !
    Also thanks to @carlosatfongo for your tips!

    Hi @shivamtyagi,

    I have used code-snippets-plugin to insert the code and it works fine too.
    Thank you very much for all the contributions.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘XML sitemap shows 404 error’ is closed to new replies.