"localLink" from RTE doesn't render as a link in v6.1.6
Hi guys
I have a weird problem regarding the "Insert/Edit link" option in the richtext editor.
The problem occours in Umbraco v6.1.6 on several installations.
This is what happens:
Insert a local link in the RTE from the "Insert/Edit link"-option.
When the content from the Richtext editor is rendered on the frontend, the link isn't converted to a real link, but still appears as a /{localLink:2122}
We are using XSLT to render the content from the RTE, and have tried several ways:
Another weird thing is that we have some other Umbraco v6.1.6 solution where this stuff works, but on some of our other solutions it doesn't work.
We have tried a lot of the usual stuff like, republishing, resetting the IIS, touching the web.config, deleting the umbraco.config and republish and stuff like that. But nothing seems to help.
We have also tried comparing installed packages, but there's no difference in one of the solutions that works and another that doesn't work.
So I'm kind of running out of ideas here. Have any of you seen this issue before, or have an idea to what might cause the problem?
Are you doing anything with http modules also what happens when you put {localLink:2122} in to a template and also when write out the rich text field directly in template or razor macro?
I've seen this a few times. I usually use a custom extension method like the one below to output links correctly. You could adapt it so that the method could be used on your XSLT template.
Thanks, Dan.
public static HtmlString ToHtml(this string str)
{
return string.IsNullOrWhiteSpace(str)
? new HtmlString(string.Empty)
: new HtmlString(Umbraco.Web.Templates.TemplateUtilities.ParseInternalLinks(str)); }
My suggestion about adding in template directly i think that stopped working around v452? Anyhow that fact that it works in razor would suggest something wrong in xslt and not the http modules?
"localLink" from RTE doesn't render as a link in v6.1.6
Hi guys
I have a weird problem regarding the "Insert/Edit link" option in the richtext editor.
The problem occours in Umbraco v6.1.6 on several installations.
This is what happens:
We are using XSLT to render the content from the RTE, and have tried several ways:
Eg.:
Or: through an apply-templates using a basic:
or through an extension like:
Another weird thing is that we have some other Umbraco v6.1.6 solution where this stuff works, but on some of our other solutions it doesn't work.
We have tried a lot of the usual stuff like, republishing, resetting the IIS, touching the web.config, deleting the umbraco.config and republish and stuff like that. But nothing seems to help.
We have also tried comparing installed packages, but there's no difference in one of the solutions that works and another that doesn't work.
So I'm kind of running out of ideas here. Have any of you seen this issue before, or have an idea to what might cause the problem?
Thanks in advance!
/Kim A
Kim,
I am sure I have seen this before let me dig around because I am sure i asked question about it.
Regards
Ismail
Kim,
Are you doing anything with http modules also what happens when you put {localLink:2122} in to a template and also when write out the rich text field directly in template or razor macro?
Regards
Ismail
Hi Kim,
I've seen this a few times. I usually use a custom extension method like the one below to output links correctly. You could adapt it so that the method could be used on your XSLT template.
Thanks,
Dan.
Hi Ismail
If I try rendering the content from the RTE through Razor directly in the View like this:
the link is rendered correctly.
If I try inserting the {localLink:2122} that string is just shown on the frontend. Don't know if that was what you thought about :)
Regarding the HTTP modules you talked about, I don't tink that we're doing anything special, but I will take a look at that tomorrow.
/Kim A
Kim,
My suggestion about adding in template directly i think that stopped working around v452? Anyhow that fact that it works in razor would suggest something wrong in xslt and not the http modules?
Regards
Ismail
is working on a reply...