Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Error when creating a new Block

Vote:
 

Hi,

When I create a new block I get 4 errors in the browser console when i run the site:

GET http://localhost:xxxxx/EPiServer/cms/Stores/contenttype/?dojo.preventCache=1486477841528 500 (Internal Server Error)

GET http://localhost:xxxxx/EPiServer/cms/Stores/contenttype/65?dojo.preventCache=1486477849051 500 (Internal Server Error)

GET http://localhost:xxxxx/EPiServer/cms/Stores/contenttype/65?dojo.preventCache=1486477849869 500 (Internal Server Error)

http://localhost:xxxxx/EPiServer/cms/Stores/contenttype/?query=getavailablecontenttypes&localAsset=true&parentReference=115_6372&requestedTypes=episerver.core.blockdata&dojo.preventCache=1486477860544

The error pages for those errors looks like this:

Server Error in '/' Application.

Value cannot be null.
Parameter name: virtualPath

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.ArgumentNullException: Value cannot be null.
Parameter name: virtualPath

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: virtualPath]
   System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +9936421
   System.Web.VirtualPathUtility.IsAppRelative(String virtualPath) +14
   EPiServer.Cms.Shell.UI.Rest.ContentTypeStore.GetImagePath(ContentType type) +141
   EPiServer.Cms.Shell.UI.Rest.ContentTypeStore.ToContentTypeViewModel(ContentType type) +358
   System.Linq.WhereSelectListIterator`2.MoveNext() +115
   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) +475
   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) +332
   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) +220
   Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) +824
   EPiServer.Framework.Serialization.Json.JsonObjectSerializer.Serialize(TextWriter textWriter, Object value) +51
   EPiServer.Shell.Services.Rest.RestResultBase.ExecuteResult(ControllerContext context) +222
   EPiServer.Shell.Services.Rest.RestResult.ExecuteResult(ControllerContext context) +18
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +15
   System.Web.Mvc.<>c__DisplayClass1a.b__17() +23
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
   System.Web.Mvc.<>c__DisplayClass1c.b__19() +25
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
   System.Web.Mvc.<>c__DisplayClass1c.b__19() +25
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
   System.Web.Mvc.<>c__DisplayClass1c.b__19() +25
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +175
   System.Web.Mvc.Async.<>c__DisplayClass2a.b__20() +89
   System.Web.Mvc.Async.<>c__DisplayClass25.b__22(IAsyncResult asyncResult) +102
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +58
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +44
   EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult) +38
   EPiServer.Shell.Services.Rest.RestHttpHandler.EndProcessRequest(IAsyncResult result) +28
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9765121
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

What should I do? As soon as i delete my newly created block, the errors disappears.

#174910
Edited, Feb 07, 2017 15:46
Vote:
 

What version of epi are you running? Could you have a look in admin and see if you are using site specific assets folder or not? There was a bug a few versions ago where this strange error could occur.

#174975
Feb 08, 2017 21:42
Vote:
 

I seem to be running 9.12.2 and I can't seem to find any site specific assets folder. Hmm, I'm still stuck at this...

#175198
Feb 14, 2017 16:40
Vote:
 

I had a similar error the other day and I had an empty string in [ImageUrl("")] ...Any chance you have it to?

#175201
Feb 14, 2017 17:00
Vote:
 

No, I can have a completely empty block and still get this error.

#175316
Feb 16, 2017 10:16
Vote:
 

Hi,

I had a look at our code and saw that you can end up in this situation if you have added the ImageUrlAttribute to your models but you pass in a null value. e.g.

[ImageUrl(null)]

public class StartPage :  PageData {...}

I'm not sure that is exactly what happens in your case, but it might be worth investigating.

I have reported an issue to make our code a bit more fault tolerant. It should be visible: http://world.episerver.com/support/Bug-list/bug/CMS-6515 when our issue sync job has run

#175470
Edited, Feb 21, 2017 15:58
Vote:
 

The fix is included in CMS.UI 10.6.1 which has been released

#175674
Feb 27, 2017 10:39
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.