Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

bugfix: shortcodes not evaluated in RSS feeds


Go to End


4 Posts   1814 Views

Avatar
MattB

Community Member, 7 Posts

29 April 2011 at 3:24am

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

Avatar
Willr

Forum Moderator, 5523 Posts

30 April 2011 at 1:44am

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,

Avatar
MattB

Community Member, 7 Posts

30 April 2011 at 2:49am

Willr,

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

Thanks

Avatar
Willr

Forum Moderator, 5523 Posts

30 April 2011 at 3:51pm

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!