MVC 12 Widget error

Naresh Ede asked on April 3, 2019 15:13

Hi All,

I was trying to add configuration properties for my widget.

I'm able load and place the widget in a section and while opening configuration i'm getting error and it was showing popup(refer screenshots).

Image Text

Image Text

Please look at the above screenshots and here is the error logged in my system.

Event code: 3005 Event message: An unhandled exception has occurred. Event time: 4/3/2019 6:31:14 PM Event time (UTC): 4/3/2019 1:01:14 PM Event ID: 33728ccc97c64a51b297726dbb678587 Event sequence: 63 Event occurrence: 8 Event detail code: 0

Application information: Application domain: /LM/W3SVC/16/ROOT-7-131987685226094598 Trust level: Full Application Virtual Path: / Application Path: E:\Azure\TestCICD\MedioClinic\ Machine name: NARESH

Process information: Process ID: 9408 Process name: w3wp.exe Account name: IIS APPPOOL\MedioClinicLive

Exception information: Exception type: InvalidOperationException Exception message: Sequence contains no matching element at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate) at Kentico.PageBuilder.Web.Mvc.Internal.KenticoWidgetPropertiesFormController.Index(String typeIdentifier) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.

Recent Answers


Naresh Ede answered on April 3, 2019 15:15 (last edited on April 3, 2019 15:23)

Error logged in event log

EventID: 9024

EventType: E

EventTime: 4/3/2019 6:31:14 PM

Source: PageBuilder

EventCode: Index

UserID: 53

UserName: administrator

IPAddress: 127.0.0.1

EventDescription: Message: Sequence contains no matching element

Exception type: System.InvalidOperationException Stack trace: at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate) at Kentico.PageBuilder.Web.Mvc.Internal.KenticoWidgetPropertiesFormController.Index(String typeIdentifier)

EventUrl: /cmsctx/pv/administrator/culture/en-us/wg/386c91cd-39de-46ca-88c8-7b5664afa98a/readonly/0/ea/1/h/18614748ef2f322ea46184a6d0497b57c70b4852ffd76b4debd43c0c596419c6/-/kentico.pagebuilder/forms/kenticowidgetpropertiesform/medioclinic.doctorswidget/index?editmode=1&uh=0483a51a1eec8dc4bb27aa7819161f2f7c4072b07f059e6095bf2da8642e941b&administrationdomain=http%3A%2F%2Fdemo2kentico12.raybiztech.com

EventMachineName: NARESH

EventUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36

EventUrlReferrer: http://live.domain.com/cmsctx/pv/administrator/culture/en-US/wg/386c91cd-39de-46ca-88c8-7b5664afa98a/readonly/0/ea/1/h/18614748ef2f322ea46184a6d0497b57c70b4852ffd76b4debd43c0c596419c6/-/landingpage/privacy?uh=a10a7adbcb836cb0361349631b66cfac6085afde33f53bb1acd16dfae9140154&editmode=1&administrationDomain=http:%2F%2Fadmin.domain.com

0 votesVote for this answer Mark as a Correct answer

Mahander Kelash answered on April 3, 2019 18:00

can you share your control code, it may be possible that your are not getting properties in controller.

And also try setting a value for ButtonTarget===>

public string ButtonTarget {get; set;} = "default";

0 votesVote for this answer Mark as a Correct answer

Joe Collins answered on May 4, 2019 00:48

I was getting the "Sequence contains no matching element" exception also when trying to add a configuration property for my widget. I had added "routes.LowercaseUrls = true" in RouteConfig.cs. Removing that line of code resolved the issue.

2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.