Jump to:

3443 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » bugfix: shortcodes not evaluated in RSS feeds

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1071 Views
  • MattB
    Avatar
    Community Member
    7 Posts

    bugfix: shortcodes not evaluated in RSS feeds Link to this post

    Hi team,

    Shortcodes (eg the native [sitetree_link id=123]) don't appear to be evaluated inside RSS feeds, they're served as raw text.

    This can be fixed in Text::AbsoluteLinks() which is called in RSSFeed.ss:
    sapphire/core/model/fieldtypes/Text.php#77

    by changing:
    return HTTP::absoluteURLs($this->value);

    to:
    return HTTP::absoluteURLs($this->forTemplate());

    Cheers, Matt

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: bugfix: shortcodes not evaluated in RSS feeds Link to this post

    Hi,

    Please submit bugfixes, patches as pull requests (http://doc.silverstripe.org/sapphire/en/misc/contributing#sending-pull-requests-for-git) or simply make a ticket on open.silverstripe.org and the core devs can make sure it gets into the release / look into the issue.

    Cheers,

  • MattB
    Avatar
    Community Member
    7 Posts

    Re: bugfix: shortcodes not evaluated in RSS feeds Link to this post

    Willr,

    Unfortunately I'm locked out of TRAC and the "forgot my password" feature doesn't work.

    Thanks

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: bugfix: shortcodes not evaluated in RSS feeds Link to this post

    If you could send me an email (will@silverstripe.com) from the registered account email you signed up with I'll reset your password in the backend (simply a security measure!).

    For patches it's more important to get the pull request submitted than a trac ticket.

    Is this functionality not covered by unit tests? For core patches we're trying to get as much covered as possible (plus it's good practise) so if you could knock up a quick test, check that it fails without your patch and that it passes post patch (without breaking anything else) it will make the process of pulling your changes much quicker.

    Thanks for raising this!

    1071 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.