uBlogsy/uBlogsyRSS.cshtml fails to render RSS in Umbraco 6.0 + solution
Ublogy fails to render the <link> tag inside uBlogsy/uBlogsyRSS.cshtml. Depending of the browser it may look as if the browser can't read it, but the problem is the rendering.
You can read a thorough explaination of this problema and how to solve it here:
btw.... i'm about to release beta 2 which has a big bug fix, but is also quite a big refactor.... in other words, it may be a pain to upgrade...better off packacking what ever content you did.
I am currently still using uBlogsy 2.0.0.1. I made quite a few changes to the razor etc and thus haven't kept up to date. I have been following closely your work and upgraded my site to 6.0. I plan to upgrade my site to the new version of uBlogsy. I was just wondering for existing content will uBlogsy 3.0 be backward compatible? You say in the previous post about packaging content. Excuse my limited knowledge but can you advise on how best to do this.
Well done with all the hard work on the new version of uBlogsy. I was wondering what your thoughts are on a mobile version of uBlogsy. I am currently using the MVC 4 mobile features to create a responsive site. With the changes of 6.0 it is still being developed with some links not working as expected. My site is http://www.monkstowncommunityschool.org and like I said will continue to be developed.
I'm soory, Anthony. For some reason a response I added to stackoverflow question is missing, but you can find it now in the link of my first comment.
Basically, the breaking change in razor 4 is that it checks the HTML you're trying to write is correct, and stops parsing if it finds something illegal.
A <link> tag is required to be a singleton tag, or, in other words, it must be self-closing (), or it cannot have an open and close tag with contents in the middle.Thats's why your original Razor script fails. (This is the link tag for referencing external .css files!).
The solution is to deceive Razor so that it doesn't know it is writing a link tag. The way to do it is opening and closing the tag using @Html.Raw("<link>") and @HtmlRaw("</link>") so you can use your original script making this little change,
Steven I think it should be ok to just replace all the files. There may be some crashes here and there but try the same old solutions like republishing.
Basically I've changed the css, most of the cshtml files, and changed the starter kit content tree. But it's sort of what you'd be using it for anyway.
Regarding mobile... I prefer to stay away from "mobile versions"
I think making things responsive it the best solution. Just need to find the time to write some media queries, and of course test it on a jillion devices. I havent used mvc4 mobile... any good?
That's why I couldn't understand that code, so it wasn't clear at all :)
That "@Html.Raw(string.Format("{0}"... looked too strange :)
There's a problem with Umbraco Forum: when you post a comment for the first time, it accepts the tags starting with <. But if you edit your comment, all tags starting with < get lost! I discovered it right now, editing my new comment. Perhaps you can try editing it and posting the code again, or simply add a reference to another place where the source code can be donwloaded.
uBlogsy/uBlogsyRSS.cshtml fails to render RSS in Umbraco 6.0 + solution
Ublogy fails to render the <link> tag inside uBlogsy/uBlogsyRSS.cshtml. Depending of the browser it may look as if the browser can't read it, but the problem is the rendering.
You can read a thorough explaination of this problema and how to solve it here:
http://stackoverflow.com/questions/12761288/asp-net-rss-feed-error-in-link-tag-in-item-node-issue-with-razor-in-umbraco-rss
Hope this helps!
It's a breaking change in razor in mvc 4
The following should work. Just replace the whole file.
btw.... i'm about to release beta 2 which has a big bug fix, but is also quite a big refactor.... in other words, it may be a pain to upgrade...better off packacking what ever content you did.
Also did changes in the css.
I am currently still using uBlogsy 2.0.0.1. I made quite a few changes to the razor etc and thus haven't kept up to date. I have been following closely your work and upgraded my site to 6.0. I plan to upgrade my site to the new version of uBlogsy. I was just wondering for existing content will uBlogsy 3.0 be backward compatible? You say in the previous post about packaging content. Excuse my limited knowledge but can you advise on how best to do this.
Well done with all the hard work on the new version of uBlogsy. I was wondering what your thoughts are on a mobile version of uBlogsy. I am currently using the MVC 4 mobile features to create a responsive site. With the changes of 6.0 it is still being developed with some links not working as expected. My site is http://www.monkstowncommunityschool.org and like I said will continue to be developed.
I'm soory, Anthony. For some reason a response I added to stackoverflow question is missing, but you can find it now in the link of my first comment.
Basically, the breaking change in razor 4 is that it checks the HTML you're trying to write is correct, and stops parsing if it finds something illegal.
A <link> tag is required to be a singleton tag, or, in other words, it must be self-closing (), or it cannot have an open and close tag with contents in the middle.Thats's why your original Razor script fails. (This is the link tag for referencing external .css files!).
The solution is to deceive Razor so that it doesn't know it is writing a link tag. The way to do it is opening and closing the tag using @Html.Raw("<link>") and @HtmlRaw("</link>") so you can use your original script making this little change,
(I think this is much more clear than the solution posted here!) . Hope this helps!
Curses, it looks like the umbraco forum stripped all the tags out of my pasted code.
Thanks JotaBe. That's basically what I tried to paste here. I put the Html.Raw() around the entire line though. But it's basically the same.
Btw, beta 2 is online.
Steven I think it should be ok to just replace all the files. There may be some crashes here and there but try the same old solutions like republishing.
Basically I've changed the css, most of the cshtml files, and changed the starter kit content tree. But it's sort of what you'd be using it for anyway.
Regarding mobile... I prefer to stay away from "mobile versions"
I think making things responsive it the best solution. Just need to find the time to write some media queries, and of course test it on a jillion devices. I havent used mvc4 mobile... any good?
That's why I couldn't understand that code, so it wasn't clear at all :)
That "@Html.Raw(string.Format("{0}"... looked too strange :)
There's a problem with Umbraco Forum: when you post a comment for the first time, it accepts the tags starting with <. But if you edit your comment, all tags starting with < get lost! I discovered it right now, editing my new comment. Perhaps you can try editing it and posting the code again, or simply add a reference to another place where the source code can be donwloaded.
Editing comments generally ends up with an xslt error for me... oh well.
Thanks for the bug report. Strange that chrome didnt complain about it.
MVC 4 is good from the point of view that it will automatically apply a mobile template if I create a file with .mobile in the file name.
i.e
uBlogsyLanding.cshtml
if I create
uBlogsyLanding.mobile.cshtml
this template will be applied.
I use a combination of this and responsive design to create the mobile element of my site.
is working on a reply...