I've just started a new project in Umbraco version 7.5.8. I've created document types and am about to start writing markup in views by I am getting the strangest error.
The code below runs without an error. Just as one might expect:
I did not change anything in Umbraco. The only thing I did was to create document types and documents.
Home2 is an empty document type that I used to test the problem. The problem occurs on all other document types. If I don't use razor in attributes all of the document types work.
YSOD when using razor in html attributes
I've just started a new project in Umbraco version 7.5.8. I've created document types and am about to start writing markup in views by I am getting the strangest error.
The code below runs without an error. Just as one might expect:
The same code but with @sth in href attribute causes an error:
The error happens if razor is in class or href attribute but not when it is in data attribute...
This doesn't seem like an Umbraco error but at the same time this is a pretty simple piece of markup. Any ideas?
Hi Maria
Did you change something in Umbraco? What about "Home2" docTYpe, is it working fine?
Thanks,
Alex
I did not change anything in Umbraco. The only thing I did was to create document types and documents.
Home2 is an empty document type that I used to test the problem. The problem occurs on all other document types. If I don't use razor in attributes all of the document types work.
So strange problem, as you see the error said about "Umbraco.Web.PublishedContentModels.System"
Maria, do you have System doctype?
Can you rebuild ModelsBuilder?
Thanks,
Alex
Yes, I had a documenttype with alias System which was used to collect all settings for the page.
Changing the alias and rebuilding models solved the problem.
Thanks so much for coming up with this idea!
I think this needs to be created as an issue on issue tracker cause that is clearly a nasty bug.
Nice idea - create an issue, I will vote for it, just create please and give me a link. Glad to help! Have a nice day, Maria.
/Alex
It's created here: http://issues.umbraco.org/issue/U4-9510
is working on a reply...