Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #849658

    TobyElwin
    Participant

    I am using:
    WordPress 4.4.2
    Cornerstone 1.1.3

    My RSS seems broken link in two ways 1) the href has a space within (according to W3 validator) and 2) the link points to https://tobyelwin.com/Toby%20Elwin that should not exist. Where do I fix this. Here is the view source section view-source:https://tobyelwin.com/

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="Toby Elwin"/><link rel="alternate" type="text/xml" title="RSS .92" href="Toby Elwin"/><link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="Toby Elwin"/><link rel="alternate" type="application/rss+xml" title="Toby Elwin RSS Comments Feed" href="Toby Elwin"/

    I have searched without luck for resolution.

    Many thanks – Toby

    #849769

    Rupok
    Member

    Hi Toby,

    Thanks for writing in! Would you clarify where you are actually getting this?

    Cheers!

    #849807

    TobyElwin
    Participant

    When I run https://validator.w3.org on my home page.

    #850124

    Rad
    Moderator

    Hi there,

    Yes, adding space to a link is not a good practice. That code appears before the <div class="x-main">...</div> which is only possible with customization.

    How did you add it? If you manually added them then just replace this code

    href="Toby Elwin"

    with the correct URL, like for example,

    href="https://tobyelwin.com/feed/"

    Hope this helps.

    #850420

    TobyElwin
    Participant

    I did not add anything and not sure where to go to resolve. Suggestion for file or location to overwrite?

    Thank you – Toby

    #850510

    Rue Nel
    Moderator

    Hello Toby,

    You seem you have edited the template file in your child theme and added these lines:

    
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="Toby Elwin">
    <link rel="alternate" type="text/xml" title="RSS .92" href="Toby Elwin">
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="Toby Elwin">
    <link rel="alternate" type="application/rss+xml" title="Toby Elwin RSS Comments Feed" href="Toby Elwin">

    Please login to your ftp and browse to this folder: wp-content/themes/x-child/framework/views/integrity/. You need to edit wp-header.php and remove those lines.

    I would recommend that you add those lines in your child theme’s functions.php file instead which is the correct and proper implementation. Please insert this following code in your child theme’s functions.php file.

    function add_rss_links(){ ?>
      <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="Toby Elwin">
      <link rel="alternate" type="text/xml" title="RSS .92" href="Toby Elwin">
      <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="Toby Elwin">
      <link rel="alternate" type="application/rss+xml" title="Toby Elwin RSS Comments Feed" href="Toby Elwin">
    <?php }
    add_action('wp_head', 'add_rss_links');

    Hope this helps. Kindly let us know.

    #851066

    TobyElwin
    Participant

    Thank you for pointing out where to find this. Perhaps a migration to a new host, plugin, or some addition wrote to that file.

    What if I just deleted the lines, altogether? I am not sure why those feed alternatives are necessary.

    Remove from header has resolved the feed error.

    #851261

    Jade
    Moderator

    Hi Toby,

    I would love to check this better but would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #862591

    TobyElwin
    Participant
    This reply has been marked as private.
    #863287

    Rue Nel
    Moderator

    Hello Toby,

    Upon checking your child theme, I found out that the code was added in the wp-header.php file. It looks like this:

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/WP-HEADER.PHP
    // -----------------------------------------------------------------------------
    // Header output for Integrity.
    // =============================================================================
    
    ?>
    
    <?php x_get_view( 'global', '_header' ); ?>
    
      <?php x_get_view( 'global', '_slider-above' ); ?>
    
      <header class="<?php x_masthead_class(); ?>" role="banner">
        <?php x_get_view( 'global', '_topbar' ); ?>
        <?php x_get_view( 'global', '_navbar' ); ?>
        <?php x_get_view( 'integrity', '_breadcrumbs' ); ?>
      </header>
    
      <?php x_get_view( 'global', '_slider-below' ); ?>
      <?php x_get_view( 'integrity', '_landmark-header' ); ?>
    
      <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo(‘rss2_url’); ?>" />
    
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo(‘rss_url’); ?>" />
    
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo(‘atom_url’); ?>" />
    
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo(‘name’); ?> RSS Comments Feed" href="<?php bloginfo(‘comments_rss2_url’); ?>" />

    I have removed the file so that it will be back to normal and will have the correct implemented added in your child theme’s functions.php file using the code I suggested in my previous reply. After this, since you are using WP Rocket, please clear your plugin cache before testing your site. I also noticed that you are hosting on SiteGround, you also need to clear your Supercacher cache in your hosting panel. The SuperCacher is developed by SiteGround exclusively for their customers. It increases the number of hits a site can handle and boosts the website loading speed. The SuperCacher includes 4 different caching options for maximum optimization of your websites. You can access the tool by clicking on the SuperCacher icon in your cPanel.

    For more information about this, please check it out here: https://www.siteground.com/tutorials/supercacher/supercacher_intro.htm

    Hope this helps.

    #882399

    TobyElwin
    Participant

    BOOM! RSS down again. Any advice?

    #883374

    Lely
    Moderator

    Hi Toby,

    The RSS is working when I checked. See this:http://screencast-o-matic.com/watch/cDfoVg1kou
    Please clarify the issue so we can help you better.

    #913425

    TobyElwin
    Participant

    this feed is not recognized as valid by mailchimp https://tobyelwin.com/feed/

    I run it through feed validator and same settings come back as:

    Sorry

    This feed does not validate.

    line 1, column 38: Undefined root element: head [help]

    <?xml version=”1.0″ encoding=”UTF-8″?><head/><rss version=”2.0″ xmlns:conten …
    ^

    line 1, column 45: XML parsing error: <unknown>:1:45: junk after document element [help]

    <?xml version=”1.0″ encoding=”UTF-8″?><head/><rss version=”2.0″ xmlns:conten …
    ^

    In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendation.

    Feeds should not be served with the “text/html” media type [help]

    I make no changes, clear cache and run it through validator again and

    Congratulations!

    [Valid RSS] This is a valid RSS feed.

    Recommendations

    This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

    line 89, column 0: content:encoded should not contain iframe tag [help]

    <div class=”x-video embed with-container” ><div class=”x-video-inner four-b …

    line 114, column 0: description should not contain srcset attribute (2 occurrences) [help]

    <div><img width=”550″ height=”309″ src=”https://tobyelwin.com/wp-content/upl …

    line 114, column 0: description should not contain sizes attribute (2 occurrences) [help]

    <div><img width=”550″ height=”309″ src=”https://tobyelwin.com/wp-content/upl …

    line 121, column 0: content:encoded should not contain srcset attribute (2 occurrences) [help]

    <div><img width=”550″ height=”309″ src=”https://tobyelwin.com/wp-content/upl …

    line 121, column 0: content:encoded should not contain sizes attribute (2 occurrences) [help]

    <div><img width=”550″ height=”309″ src=”https://tobyelwin.com/wp-content/upl …

    I am stuck with no blog subscriber updates because a wonky rss feed that I can not solve.

    I deactivated all my plugins and checked each one: no issue. Test each, sometimes above fail, just clear cache and all is well.

    #913519

    TobyElwin
    Participant

    When I switch to Twenty Sixteen, without plugins, the feed works. With plugins, as well.

    #913802

    Rue Nel
    Moderator

    Hello There,

    The issue is because of this code. This was your own alternative rss feed link and looking closely it is not correct. There is no valid href value.

    function add_rss_links(){ ?>
      <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="Toby Elwin">
      <link rel="alternate" type="text/xml" title="RSS .92" href="Toby Elwin">
      <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="Toby Elwin">
      <link rel="alternate" type="application/rss+xml" title="Toby Elwin RSS Comments Feed" href="Toby Elwin">
    <?php }
    add_action('wp_head', 'add_rss_links');

    Right now I temporarily disable this code so that the default rss feed link will display in your site. And since you are using WP Rocket plugin, please make sure that the feed cache is cleared or much better be disabled.

    Please test again.