Getting an Error while using a Link collection Property

Vote:
 

I have use a linkcollection Property in my page...When i am setting a External link and email its not a problem.But if I use a page link what i am create in my project it throws an error and also using local media link throws an error.Why i cant access the Internal links in my page?

#141778
Nov 20, 2015 8:04
Vote:
 

What is the error message you receice?

#141783
Nov 20, 2015 9:49
Vote:
 

Hi Henrik,

Im not very familier with EPiServer 7.5 but I have done a few sites using v5 and 6.. anyway

For some reason the LinkItemCollection property-type keeps crashing the "internal" javascripts within the EpiServer page editor.

_317: Unable to load /EPiServer/cms/Stores/contentdata/10_10 status: 500 {message: "Unable to load /EPiServer/cms/Stores/contentdata/10_10 status: 500", response: Object, status: 500, responseText: "<!DOCTYPE html>
<html>   <head>
 <titl…nStep step, Boolean& completedSynchronously)
-->", xhr: XMLHttpRequest…}message: "Unable to load /EPiServer/cms/Stores/contentdata/10_10 status: 500"

If I expand the responseText it gives me the following exception:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Server Error in '/' Application.
 
Object reference not set to an instance of an object.
 
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.NullReferenceException: Object reference not set to an instance of an object.
 
 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:
 
[NullReferenceException: Object reference not set to an instance of an object.]
  EPiServer.UriSupport.AbsoluteUrlBySettings(String path) +53
  EPiServer.Cms.Shell.UI.ObjectEditing.InternalMetadata.LinkModel.ModifyIContentProperties(LinkItem serverModel, LinkModel clientModel) +371
↵   EPiServer.Cms.Shell.UI.ObjectEditing.InternalMetadata.LinkModel.ToClientModel(Object serverModel) +509
↵   EPiServer.Cms.Shell.Json.LinkItemCollectionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer) +77
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty) +399
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) +364
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) +634
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) +573
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeDictionary(JsonWriter writer, IDictionary values, JsonDictionaryContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) +1306
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) +960
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) +492
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) +466
↵   Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) +216
↵   Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) +2078
↵   Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value) +44
↵   Newtonsoft.Json.JsonSerializer.Serialize(TextWriter textWriter, Object value) +70
↵   EPiServer.Framework.Serialization.Json.JsonObjectSerializer.Serialize(TextWriter textWriter, Object value) +56
↵   EPiServer.Shell.Services.Rest.RestResultBase.ExecuteResult(ControllerContext context) +471
↵   EPiServer.Shell.Services.Rest.RestResult.ExecuteResult(ControllerContext context) +55
↵   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
↵   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23
↵   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
↵   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +21
↵   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
↵   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +21
↵   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +175
↵   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +324
↵   EPiServer.Shell.Services.Rest.RestControllerBase.ExecuteCore() +252
↵   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +90
↵   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
↵   EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContextBase httpContext) +450
↵   EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContext context) +68
↵   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
↵   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

This javascript error is ONLY thrown when using and populating a ListItemCollection property with a link, if I leave the property blank(Dont add any links) then all works fine.. but as soon as I add a link the editor stops working.

#141784
Edited, Nov 20, 2015 10:03
Vote:
 

This "/EPiServer/cms/Stores/contentdata/10_10 status: 500"" means that it can not load the content with id 10 (and workid 10)

If you go to that page in edit mode, does it work?

#141785
Nov 20, 2015 10:12
Vote:
 

I have created the emty site then I am added the one page type with the linkcollection property then associate with this to one page template.then run the project,then in the CMS login I have set the page link of other sample page. After I set the page/media  link it just be show like a blank page.it doesn,t show anything in all properties view as well as in template.And also i cant publish the page.it doesnt show the publish option in the publish window.

#141787
Edited, Nov 20, 2015 10:23
Vote:
 

For this you need to add your HostName in the editor.

In the Editor select Admin --> Config --> Manage Websites --> click Add Site

In that,

Name : SolutionName

URL  :  http://localhost:50385/

Add host also to that,

Host: localhost:50385

and save it

#141865
Nov 23, 2015 12:02
Vote:
 

Wowwwwwwwwwwwwwwwwwww....Its workingggggggggggggggggggggggggggggggggg

Thanks Genious Brother 

#141867
Nov 23, 2015 12:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.