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

New Post: Create and edit website file : NullReferenceException

$
0
0
Hi,

When you create a new website file in the console and then try to edit it, an exception is thrown from texteditor.ascx. It looks like UrlEncode breaks on empty strings - could not find anything about it online (using .net 4.5 - C1 build 35948) but its easy to fix

FIX:
Change the InitializeViewState method to:
_currentStringValue = string.IsNullOrEmpty(this.Text) ? string.Empty : HttpContext.Current.Server.UrlEncode(this.Text).Replace("+", "%20");
JamBo

Viewing all articles
Browse latest Browse all 2540

Trending Articles



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