Support » Plugin: Better WordPress Google XML Sitemaps (support Sitemap Index, Multi-site and Google News) » Filtering out terms causes duplicate taxonomy listings

  • Jpyper

    (@jpyper)


    I’m using the bwp_gxs_term_exclude filter to remove some categories from my sitemap. I copied the documentation function and changed it to just one “case” line for category and then used an array of category slugs that I wanted to filter out.

    Here is what my code is like (category slugs replaced for length:

    switch ($taxonomy)
        {
            case 'category': return array('cat1', 'cat2', 'cat3', 'cat4','cat5', 'cat6'); break;
        }
        return array('');

    One of these categories causes the whole taxonomy_category.xml sitemap to fail to load, timing out. I narrowed it down to cat5. If I try to just filter out cat5, it times out with a 500 error. If I try to filter out all but cat5, I start seeing duplications of sitemap links. (screenshot: http://d.pr/i/Vqi4 )

    I tried deleting cat5 and recreating it. This caused one of my other categories (seemingly randomly) to become the one that breaks.

    I don’t have an idea of what could be going here, do you? Any other information I can give about this to help debug?

    http://wordpress.org/extend/plugins/bwp-google-xml-sitemaps/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Khang Minh

    (@oddoneout)

    Hi Jpyper,

    Does the sitemap show up correctly if you do not use the filter? What if you filter out only cat1?

    Jpyper

    (@jpyper)

    If I’m not using the filter, the sitemap displays correctly.

    If I only filter out one category, the sitemap loads but the “problem category” is listed twice. Screenshots for example;

    This is without the filter: http://d.pr/i/Gvxm
    This is filtering just one category (chiropractic): http://d.pr/i/qUwX
    This is filtering out 5 categories: http://d.pr/i/afht

    In the last screenshot I noticed that it’s duplicated 2 of the categories. The “vortala-authored” category may be another “problem” category but I do not need that one filtered. If I ever try to filter out the “problem” category, the sitemap never loads and times out with a 500 error.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filtering out terms causes duplicate taxonomy listings’ is closed to new replies.