Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

Closed Unassigned: Functions inserted via Insert/Function Markup in Razor templates are missing a namespace declaration [1697]

$
0
0
Based on http://compositec1.codeplex.com/discussions/445175

Registered in HQ TFS as #4428

Repro:

1. Create or edit a Razor template
2. Using the menu Insert > Function Markup, insert some function (e.g. Composite.Utils.Guid.NewGuid). Pay attention that it was inserted without the namespace: <f:function name="Composite.Utils.Guid.NewGuid" />
3. View the page that uses this template in the browser

Expected: the page shows OK, the function shows the content
Actual: YSOD: see below

NOTE: Adding the namespace to the function markup fixes the issue
<f:function name="Composite.Utils.Guid.NewGuid" xmlns:f="http://www.composite.net/ns/function/1.0" />

--- ERROR ---
Server Error in '/' Application.
--------------------------------------------------------------------------------
'f' is an undeclared prefix. Line 95, position 4.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: 'f' is an undeclared prefix. Line 95, position 4.
Comments: Fixed in the latest builds, available in the latest check-in

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>