WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WordPress SEO by Yoast] RSS breaks format ? Was working on old plugin (6 posts)

  1. Parneix
    Member
    Posted 1 year ago #

    Hi,

    Hi recently switched to Yoast’s WordPress SEO plugin which works perfectly. Except for one thing: the RSS module.

    The strange thing is that I was previously using another plugin by Yoast “RSS Footer options” and it was working perfectly. Upon installing WordPress SEO, I deactivated “RSS Footer options” since I thought it would be redundant if I kept it.

    I used the exact same code that was working well in the old plugin and copied it in the RSS modul of WordPress SEO. However, when I checked my feed, I could see that the format was all wrong.

    I use something like this:

    <p><a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=%%POSTLINK%%" target="_blank"><img border="0" src="http://mysite.net/wp-content/themes/mysite/images/facebook_rss.png" alt="Share on Facebook" /></a>

    But the URL seems to break in the RSS (if I copy the link displayed all I get is javascript:void(0);). All I get is (exactly as is where [IMAGE] is the actual png image correctly displayed):

    Correct title of my post" target="_blank">[IMAGE]

    I use a cache plugin but always have and RSS is NOT minified.

    Also, if I may: I miss the preview option that was included in the old RSS footer plugin. Very useful for debugging!

    Best regards,

    P.

  2. Parneix
    Member
    Posted 1 year ago #

    Ok,

    I have somehow identified the problem, but still need some ehlp (would be greatly appreciated).

    I provide my troubleshooting steps so it can help others. What I wanted to do is examine the html code of my feed, to see the source code. Do do this:

    In Chrome, click on the link to your RSS feed (I do not use FeedBurner). A new page will open and you will be offered to suscribe to the feed. Instead, either open Chrome control>Tools>view source or click of “feed” on the upper right side of the window. You will have acces to the source code of your feed.

    Here’s the problematic output (in bold is the problem):

    <p>“Title of Post”" target="_blank"><img border="0" src="http://mysite.net/wp-content/themes/mysite/images/facebook_rss.png" alt="Share on Facebook" />

    The problem is that for some reason the variable %%POSTLINK%% is not simply returning the correct html permalink of the post, but it returns it as an HTML link, i.e. with added tags

    Just after sharer.php?u there should be NO <a href="

    And before target="_blank"> there should be no ”</a>

    The strange thing is the variable %%POSTLINK%% behave correctly with the old RSS footer plugin (I ran test for it).

  3. Parneix
    Member
    Posted 1 year ago #

    CORRECTION:

    Here’s the problematic output:

    <p><a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=<a href="http://mysite.net/title-of-post/">Title of Post</a>" target="_blank"><img border="0" src="http://mysite.net/wp-content/themes/mysite/images/facebook_rss.png" alt="Share on Facebook" /></a>

    THE PROBLEM IS:

    BEFORE "http://mysite.net/title-of-post/" there should not be <a href="

    AFTER "http://mysite.net/title-of-post/" there should not be </a>

    Thanks!

    P.

  4. Parneix
    Member
    Posted 1 year ago #

    Oh! And I forgot the important part:

    WordPress version: 3.5.1
    WordPress SEO version: 1.3.4.4

    I did this: I input %%POSTLINK%% into Facebook php sharer (or other): http://www.facebook.com/sharer/sharer.php?u=URL which works in the old plugin RSS footer (also by Yoast)

    I expected the plugin to do this: Output a correct sharing link in my RSS

    Instead it did this: it wraps a <a href=""></a> around the post permalink therefor breaking the Facebook php sharer (which only needs the link, without the added tag)

  5. Parneix
    Member
    Posted 1 year ago #

    This is the actual output from RSS footer (the old plugin since integrated in WordPress SEO plugin). This is what I’m looking for: here %%POSTTITLE%% does not wrap the permalink of the post in <a href=""></a> tags:

    <p><a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://mysite.net/title-of-post/" target="_blank"><img border="0" src="http://mysite.net/wp-content/themes/mysite/images/facebook_rss.png" alt="Share on Facebook" />

  6. Parneix
    Member
    Posted 1 year ago #

    Consider this thread CLOSED: a simpler version of my issue is reproduced here.

    Thanks,

    P.

Topic Closed

This topic has been closed to new replies.

About this Topic