• Hi,

    I have several plugins that create XML feeds for various purposes, including product feeds for Google Merchant Centre. I’ve had a bunch of customers contact me in the last 24 hours as their feeds are broken. The common factor is that they’re all running the latest version of AIOSEOP.

    It looks like the plugin is buffering the output, and then replacing anything within <title></title> with the site title. This massively breaks Google product feeds, since Google uses <title></title> to store the product feed.

    The current approach here looks really un-robust – can we have a re-think?

    Happy to provide more details – https://www.leewillis.co.uk/contact/

    https://www.ads-software.com/plugins/all-in-one-seo-pack/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Lee,

    This is what All in One SEO Pack has always done; however, there is now an option to change this behavior – under Performance, uncheck Force Rewrites. Also, All in One SEO Pack shouldn’t be rewriting feeds – do you know if these feeds show up as RSS feeds in WordPress via is_feed()?

    Thread Starter Lee Willis

    (@leewillis77)

    Nope – r758737 doesn’t exhibit the same behaviour – it’s new in the latest commits.

    Just trying to work out exactly where.

    Lee,

    Make sure you have the latest version of trunk, then; there were some changes in replace_title() in aioseop_class.php but this wouldn’t change when the <title> tag got rewritten, only how it got rewritten. And again, only when Force Rewrites is enabled, as well.

    Thread Starter Lee Willis

    (@leewillis77)

    Hi Peter,

    Thanks for the quick replies. The behaviour was changed (Even if you didn’t mean it to be) in https://plugins.trac.www.ads-software.com/changeset/762497/all-in-one-seo-pack

    Pre-that – the feed titles weren’t rewritten. Updating to that revision (Or latest trunk), and the titles in the feed get rewritten to the site title.

    The reason is that the old code replaced only the first occurrence of <title>foo</title> in the output. The new version replaces ALL occurrences.

    The change here restores the previous behaviour:
    https://gist.github.com/leewillis77/6500568

    I don’t really want to tell people to disable Force Rewrites if that’s what they need to do for normal use. Any other suggestions welcome.

    Lee,

    Aha! Thank you for the patch, I’ll see that this makes it into the next release. Any ideas on why titles are being rewritten on these feeds in the first place? Even encountering multiple title tags (or output buffering past the head section of a web page) typically shouldn’t be happening with All in One SEO Pack. The reason behind using output buffering / Force Rewrites is that themes often do all sorts of things they aren’t supposed to, such as doing their own custom SEO in title tags instead of just using wp_title() in the title tag and using hooks to make whatever other modifications. So it should be fine to turn off Force Rewrites with a well-coded theme (which is why it’s on by default…).

    Thread Starter Lee Willis

    (@leewillis77)

    Even encountering multiple title tags (or output buffering past the head section of a web page) typically shouldn’t be happening with All in One SEO Pack.

    It’s an XML feed, there is no <head>, so presumably you buffer, and parse the whole output.

    So it should be fine to turn off Force Rewrites with a well-coded theme (which is why it’s on by default…).

    Did you mean “On by default”? Certainly, on my test site it was “on by default”, but checking that was what you expected to be the case?

    Lee,

    Right, so the expected behavior would be that this shouldn’t be running at all on an XML feed. All in One SEO Pack checks for feeds using is_feed() – if this returns true, it shouldn’t run. And yes I did mean on by default, due to the sheer quantity of poorly-coded themes out there.

    Thread Starter Lee Willis

    (@leewillis77)

    OK – so if my plugin can make is_feed return true for its output, you’d skip it altogether – that’s useful to know.

    Thanks

    Lee,

    Yes, that’s how it’s supposed to work, in theory, anyhow. If it doesn’t, please let me know!

    Cheers

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘AIOSEOP trashing content it shouldn't attempting to rewrite titles’ is closed to new replies.