• Resolved swisspenelope

    (@swisspenelope)


    Hi,
    Am using WordPress 5.6.1 with Elementor Pro, Optimole and Rank Math SEO (all the most recent versions), plus the Hello-Elementor-Child theme (also latest version).

    The link to the sitemap I mention above is to be found in the admin panel, in the Rank Math section. HOWEVER, there is no file of that kind WHATSOEVER in the root of my website. When I asked Rank Math Support for help, they sent me a screenshot of what View Source renders on my home page, and it shows several blank lines above the <!doctype html> statement. I would happily delete those blank lines, but can you tell me which file in my WordPress installation is causing this?

    (I notice that the next line after doctype statement is:
    <html class=”optml_no_js” lang=”en-US” prefix=”og: https://ogp.me/ns#”&gt;
    which probably refers to the Optimole plugin, so I’m wondering if their plugin has caused it somewhere.)

    Many thanks for this rather banal question.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 34 total)
  • Moderator James Huff

    (@macmanx)

    First, there won’t be a sitemap_index.xml file created specifically, it’s a virtual file. What matters are those errors at the top of your sitemap, which reflect those blank lines.

    This may be a plugin or theme conflict. Please attempt to disable all plugins except RankMath, and switch to the default Twenty Twenty-One theme. If the problem goes away, enable them one by one to identify the source of the problem.

    Thread Starter swisspenelope

    (@swisspenelope)

    Hi James

    Thanks for your suggestions. I finally had the time to put my site into Maintenance Mode, deactivate all the plugins except RM, and set the theme to 2021, as you said. The I cleared all browser cache and went into RM again, and clicked on Sitemap Settings, then https://rolanditen.com/sitemap_index.xml once again.

    This time I got this error (in a pink box):
    Error on line 5 at column 6: XML declaration etc etc

    … which my online reading makes clear is the same error – white space.

    So it does this even with all plugins out of the picture, and the default WP theme. Now what?

    Moderator James Huff

    (@macmanx)

    Try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), and delete then replace your copies of everything on the server except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    Thread Starter swisspenelope

    (@swisspenelope)

    Okay, I have SFTP access to the server so no problem. I’ll give that a try and keep you posted! Thanks.

    Thread Starter swisspenelope

    (@swisspenelope)

    @macmanx
    Unfortunately that didn’t change anything. I moved all the folders/files I was going to replace into a new folder in the root called “deleted” and the wp_content folder plus wp-config.php file into another new folder called “to keep”, then I uploaded brand-new WP 5.6.1 wp-includes and wp-admin folders into the root, plus all the usual root files, and finally moved wp-content in as well, and wp-config.php. Cleared all cache and refreshed screen, but everything looks and behaves exactly as before.

    Still getting
    error on line 5 at column 6: XML declaration allowed only at the start of the document

    Running out of ideas, here!
    SP

    Moderator James Huff

    (@macmanx)

    If you view your site’s source does it still have the blank lines?

    Thread Starter swisspenelope

    (@swisspenelope)

    James, on what page am I supposed to View Source? I have NEVER seen those blank lines. I have checked in Elementor and WordPress header and theme files, but no idea where they actually appear!

    Moderator James Huff

    (@macmanx)

    You’ll find it here: https://d.pr/i/e8AgzK

    Right click your site and choose “View source”.

    You’ll find those blank lines on all of your site’s pages, it’s not just the sitemap.

    Thread Starter swisspenelope

    (@swisspenelope)

    James, yes, now I see them. When I viewed source on home page a few weeks ago, I saw nothing like that.

    So I still have no clue what is causing them :(.

    Moderator James Huff

    (@macmanx)

    Ok, don’t use the Health Check plugin this time.

    Try switching again to the default theme, and turn off every plugin except your caching plugin this time.

    Then, clear the cache, and check to see if the problem is gone.

    If it is gone, re-activate each plugin one by one, clearing the cache each time, until the problem re-appears.

    If it still doesn’t, switch back to your preferred theme and clear the cache again.

    Ideally, you’ll find the plugin or theme causing the problem this way.

    Thread Starter swisspenelope

    (@swisspenelope)

    Whoa!

    James, I don’t have the Health Check plugin, and did not use it last time! I also do not have a caching plugin. At all. And my service provider does not use any server caching – according to them.

    Moderator James Huff

    (@macmanx)

    Ah, sorry, got my wires crossed with a different thread.

    So, “Cleared all cache” was just your browser cache?

    Any blank lines at the top of your wp-config.php file?

    Thread Starter swisspenelope

    (@swisspenelope)

    Yes, cleared all cache in the browser. (Am a developer with a compulsive cache-clearing habit anyway.) And no, no blank lines at top of wp-config.

    Moderator James Huff

    (@macmanx)

    Hm, at this point I’m stumped. I’ll ask my colleagues if they have any other ideas.

    Moderator James Huff

    (@macmanx)

    Does your wp-config.php file have ?> at the end of it?

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘White space preventing Sitemap file generation’ is closed to new replies.