Episerver LinkItemCollection not visible to non CMS users

Vote:
 

We are using PageTypeBuilder to define our PageTypes, on one page we have a property which represents a Link item collection as below:

[PageTypeProperty(Type = typeof(PropertyLinkCollection), HelpText = "Test links.", EditCaption = "Test links", SortOrder = 11)] public virtual LinkItemCollection PageLinks { get; set; } 

We can populate this in CMS editor mode with links, save and publish without any errors. We then have a user control that inherits from EPiServer.UserControlBase and grabs the LinkItemCollection property using the below code and binds it to a repeater:

var links = currentPage.Property["PageLinks"].Value as LinkItemCollection; if (links != null) { linkRepeater.DataSource = links; linkRepeater.DataBind(); } 

If I view the page when logged in as a CMS editor this page works fine and the links parameter is populated correctly, however if I view the page as a normal user and not logged in the links variable is always null (although when I'm debugging I can see the currentPage.Property["PageLinks"] is present, and the type is LinkCollection, its just that the Value is null

Is there something I need to configure here, permissions on a specific page type?

#57812
Mar 28, 2012 16:13
Vote:
 

What happends if you just put a <EPiServer:Property runat="server" PropertyName="PageLinks" /> in your user control or template? Does it render a list of links?

#57835
Mar 29, 2012 23:08
Vote:
 

I just tried it and unfortunately I get the same result, nothing is output. I have however noticed something very strange, if I go in as a CMS editor and Save and Publish the page again then it works. However the next time I perform a build in Visual Studio the property is blank again. 

Any ideas on why this could be happening?

#57843
Mar 30, 2012 11:25
Vote:
 

One guess could be something related to languages.

Another wild guess is that "PageLinks" could be a reserved word somehow...

I've compared your PT-definition and it looks the same as the ones I usually use.

#57844
Edited, Mar 30, 2012 11:30
Vote:
 

Changed the definiton from PageLinks and no change, although the Language suggestion is interesting as when I deployed the solution I disabled all languages apart from one and removed the globalization option. I also removed all the files in the /lang folder that we for languages we wern't using

I added globalization back in and put back the lang files back however still have the same issue.

I also checked the Page using this property has Everyone Access rights, however the links just disappear after we make a change to the PageType

#57846
Mar 30, 2012 12:29
Vote:
 

Still no joy with this but using the debugger I can see the SettingContainer for the property is null and the SettingsId = 00000000-0000-0000-0000-000000000000, is this normal?

#57848
Mar 30, 2012 13:18
Vote:
 

Chris,

did you resolve this issue?

#62561
Edited, Oct 29, 2012 17:13
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.