Body html

Topics: Customizing Orchard
Dec 22, 2011 at 4:54 AM

Hi,

 

My body part dont allow me to insert html tags, Is there any other contentpart can i use for insert html data

 

lakmal

Coordinator
Jan 6, 2012 at 1:59 AM

Really? What happens when you try?

Jan 6, 2012 at 3:01 AM

Here is error log

 

This is last error log

 

2011-12-13 12:48:11,437 [4] Orchard.Environment.Extensions.ExtensionLoaderCoordinator - No loader found for extension "NGM.ContentViewCounter2"!2011-12-13 12:48:19,281 [9] Orchard.Environment.Extensions.ExtensionManager - No suitable loader found for extension "NGM.ContentViewCounter2"2011-12-13 12:50:48,453 [9] Orchard.Environment.Extensions.ExtensionLoaderCoordinator - No loader found for extension "NGM.ContentViewCounter2"!2011-12-13 12:50:48,593 [4] Orchard.Environment.Extensions.ExtensionManager - No suitable loader found for extension "NGM.ContentViewCounter2"2011-12-13 12:51:10,109 [4] Orchard.Environment.Extensions.ExtensionLoaderCoordinator - No loader found for extension "NGM.ContentViewCounter2"!2011-12-13 12:51:12,125 [8] Orchard.Environment.Extensions.ExtensionManager - No suitable loader found for extension "NGM.ContentViewCounter2"2011-12-13 12:56:39,968 [4] Orchard.ContentManagement.Drivers.Coordinators.ContentPartDriverCoordinator - HttpRequestValidationException thrown from IContentPartDriver byOrchard.Core.Common.Drivers.BodyPartDriverSystem.Web.HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (Body.Text="<p>fghdfh</p><p>df...").
Server stack trace:    at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)   at Microsoft.Web.Infrastructure.DynamicValidationHelper.ValidationUtility.CollectionReplacer.<>c__DisplayClass12.<ReplaceCollection>b__d(String value, String key)   at Microsoft.Web.Infrastructure.DynamicValidationHelper.LazilyEvaluatedNameObjectEntry.ValidateObject()   at Microsoft.Web.Infrastructure.DynamicValidationHelper.LazilyValidatingHashtable.get_Item(Object key)   at System.Collections.Specialized.NameObjectCollectionBase.FindEntry(String key)   at System.Collections.Specialized.NameValueCollection.GetValues(String name)   at System.Web.Mvc.NameValueCollectionValueProvider.ValueProviderResultPlaceholder.GetResultFromCollection(String key, NameValueCollection collection, CultureInfo culture)   at System.Web.Mvc.NameValueCollectionValueProvider.ValueProviderResultPlaceholder.<>c__DisplayClass4.<.ctor>b__0()   at System.Lazy`1.CreateValue()

Coordinator
Jan 6, 2012 at 5:45 AM

You must have done something that changed request validation, likely in web.config. The whole *point* of the body part is to edit html.

Jan 18, 2012 at 5:14 AM

Here is my web config. Something wrong there?

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="webpages:Enabled" value="false" />
  </appSettings>
  <system.web>
    <httpHandlers>
    </httpHandlers>

    <!--
        Enabling request validation in view pages would cause validation to occur
        after the input has already been processed by the controller. By default
        MVC performs request validation before a controller processes the input.
        To change this behavior apply the ValidateInputAttribute to a
        controller or action.
    -->
    <pages
        validateRequest="false"
        pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
        pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
        userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <controls>
        <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />
      </controls>
    </pages>
  </system.web>

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
    </handlers>
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

Coordinator
Jan 18, 2012 at 6:34 AM

I don't know, but what I do know is that this is not the original config file from Orchard. You seem to be missing this in system.web:     <httpRuntime requestValidationMode="2.0" />