bishop335 / subtext

Automatically exported from code.google.com/p/subtext
0 stars 0 forks source link

Skins with codeblocks don't raise a 404 error when the page is missing #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add to the viewpost.ascx page a codeblock <% = DateTime.Now %>
2. Go to post that does not exist http://example.com/archive/2010/06/08/foo.aspx

What is the expected output? What do you see instead?
I should get the missing post page with the 404, but I get the 500 error page 
with the following error:
The Controls collection cannot be modified because the control contains code 
blocks (i.e. ).

Original issue reported on code.google.com by simone.chiaretta on 9 Jun 2010 at 9:22

GoogleCodeExporter commented 9 years ago
Easy solution: don't add codeblocks in skins :)
But that will not be possible as codeblocks are the only way to write complex 
customizations

Original comment by simone.chiaretta on 9 Jun 2010 at 9:23

GoogleCodeExporter commented 9 years ago
Another approach is to allow skins developers to use the <%# %> block instead 
of the <%= %>.
But required that we add a call to DataBind() to trigger the binding.
Fixed in r4066

Original comment by simone.chiaretta on 9 Jun 2010 at 9:31