简体   繁体   中英

umbraco forms posting from protected page gives ysod

Using Umbraco version 7.4.3 assembly: 1.0.5948.18141 After creating a form using umbraco 7.4.3 the form works as expected, except when we access the form via a protected page. The form displays, and allows user interaction, however we are unable to submit form from protected page.

There was a question posed on the umbraco forum that suggested a fix was found, but no information for that fix was posted here -> https://our.umbraco.org/forum/umbraco-forms/78933-umbraco-forms-and-protected-pages , I have also posted a question regarding this issue in the umbraco forums - no answer todate.

YSOD when submitting form from a protected page. Stack trace below:

[NullReferenceException: Object reference not set to an instance of an object.] Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func1 getCacheItem, Nullable1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, CacheDependency dependency) +825 Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func1 getCacheItem, Nullable1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, String[] dependentFiles) +200 Umbraco.Core.Cache.DeepCloneRuntimeCacheProvider.GetCacheItem(String cacheKey, Func1 getCacheItem, Nullable1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, String[] dependentFiles) +183 Umbraco.Forms.Core.Cache.CacheProviderExtensions.GetCacheItem(IRuntimeCacheProvider provider, String cacheKey, Func1 getCacheItem, Nullable1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCal lback removedCallback, String[] dependentFiles) +541 Umbraco.Forms.Data.StringHelper.ParseMemberPlaceholders(String value, Object memberKey) +1990 Umbraco.Forms.Data.StringHelper.ParsePlaceHolders(HttpContext context, Record record, String value) +584 Umbraco.Forms.Data.StringHelper.ParsePlaceHolders(Record record, String value) +75 Umbraco.Forms.Core.Services.WorkflowService.ExecuteWorkflows(List1 workflows, RecordEventArgs e) +1158
Umbraco.Forms.Core.Services.WorkflowService.ExecuteWorkflows(Record record, Form form, FormState state, Boolean editMode) +468
Umbraco.Forms.Web.Services.RecordService.Submit(Record record, Form form) +704
Umbraco.Forms.Web.Controllers.UmbracoFormsController.SubmitForm(Form form, FormViewModel model, Dictionary2 state, ControllerContext context) +3103 Umbraco.Forms.Web.Controllers.UmbracoFormsController.GoForward(Form form, FormViewModel model, Dictionary2 state) +339
Umbraco.Forms.Web.Controllers.UmbracoFormsController.HandleForm(FormViewModel model, Boolean captchaIsValid) +1283 lambda_method(Closure , ControllerBase , Object[] ) +167
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +217 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +39
System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +12
System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) +139 System.Web.Mvc.Async.AsyncInvocationWithFilters.b3d() +112 System.Web.Mvc.Async.<>cDisplayClass46.b3f() +452 System.Web.Mvc.Async.<>cDisplayClass46.b3f() +452 System.Web.Mvc.Async.<>cDisplayClass46.b3f() +452 System.Web.Mvc.Async.<>cDisplayClass46.b3f() +452 System.Web.Mvc.Async.<>cDisplayClass46.b3f() +452 System.Web.Mvc.Async.<>cDisplayClass33.b32(IAsyncResult asyncResult) +15 System.Web.Mvc.Async.<>cDisplayClass2b.b1c() +37 System.Web.Mvc.Async.<>cDisplayClass21.b1e(IAsyncResult asyncResult) +241 System.Web.Mvc.Controller.b1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +111
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +19 System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

There is a reply in the thread you've mentioned: https://our.umbraco.org/forum/umbraco-forms/78933-umbraco-forms-and-protected-pages#comment-256103 . Hope it'll help you :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM