[resolved] Bug in Yoast Google-Analytics causes blank permalinks in RSS on Categories (2 posts)

  1. Vizworld
    Posted 7 years ago #

    Just confirmed & fixed this. If you have Yoast's Google Analytics plugin with their RSS Tracking enabled, and look at a feed specific to a category (website.com/category/science/feed/) then you'll see all the link tags are empty.

    The issue is in line 582. Line 582 determines if you're retrieving a feed by comparing the $wp->request variable. This fails when retrieving the feed of a category (on vizworld, /science/feed).

    Modifying it as follows:

    if (substr($wp->request,-4) == 'feed') {
    Fixes the problem.

    Since there is no else condition on the if, when it doesn't match it accidentally sets the permalink to null, leading to missing links. It should probably have an "else" clause that simply returns $guid.

    I sent an email to Joost (via the contact form on his website), but per his instructions ( and to help others with similar problems ), I post it here as well.

  2. Kevin S
    Posted 6 years ago #

    hi can u make it more clear? Where is this if (substr($wp->request,-4) == 'feed') { code located. and where should we make a change?

Topic Closed

This topic has been closed to new replies.

About this Topic