Page could not be loaded - second language

Vote:
 

Hi

This may be an easy one, but i cant get it ...... please help me!

I've installed CMS 6 successfully.

I've also installed Relate+ 2.0 also that successfully.

In the edit mode CMS i created a language page on swedish (sv) fro the US-en original pge tree.

When i saved and publish this new sv pagepreview displayed this error:

 

_____________________________________________________________________________________________

Page could not be loaded

The link you specified does not work. This may either be the result of temporary maintenance or an incorrect link.

 

Detailed error information (authorized by permissions to functions)

Error occured 1/14/2011 1:50:20 AM
User IP ::1
User Agent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; Tablet PC 2.0; .NET4.0C)
Url http://localhost:17001/Templates/RelatePlus/Pages/MyPage.aspx?idkeep=True&id=4_43&epslanguage=sv
Referer http://localhost:17001/episerver/UI/CMS/edit/EditPanel.aspx?id=4

Ett tal som inte är negativt krävs.
Parameter name: count
Server Error in '/' Application.


Ett tal som inte är negativt krävs.
Parameter name: count

 

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.ArgumentOutOfRangeException: Ett tal som inte är negativt krävs.
Parameter name: count

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:

[ArgumentOutOfRangeException: Ett tal som inte är negativt krävs.
Parameter name: count]
   System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +64
   System.Collections.Generic.List`1.RemoveRange(Int32 index, Int32 count) +7459877
   EPiServer.Core.PageDataCollection.RemoveRange(Int32 index, Int32 count) +16
   EPiServer.Templates.RelatePlus.UserControls.MainMenu.LoadChildren(PageReference pageLink) +142
   EPiServer.Web.WebControls.HierarchicalPageLoader.GetFilteredChildren(PageReference pageLink) +45
   EPiServer.Web.WebControls.PageHierarchicalEnumerable.get_Pages() +29
   EPiServer.Web.WebControls.MenuList.CreateChildControls() +83
   EPiServer.Web.WebControls.PageTreeData.DataBind() +269
   EPiServer.Templates.RelatePlus.UserControls.MainMenu.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

_____________________________________________________________________________________________

 

 

 

I've tried to re install and so on - same result

I can only view pages that are in original laguage (en-US)

Why can't i view any other laguage page then the original?

Any solutions someone ?

 

#47094
Jan 14, 2011 2:21
Vote:
 

Hi!

A guess could be that there are pages that are required by the template that does not exist in swedish yet. Try and debug the MainMenu control in the RelatePlus templates to see what it expects. Might even be that it's a bug in that control:

 

EPiServer.Templates.RelatePlus.UserControls.MainMenu.LoadChildren(PageReference pageLink)

Regards
Linus Ekström
#47098
Jan 14, 2011 7:26
Vote:
 

Hi again

When i debug the MainMenu.ascx.cs in VS the page is loding the EN page normally i've got no error there.

This is the only error /debug report i could get fom viewing the MainMenu.ascx.cs directly in the cms editor in the SV tree /page

 

 

Server Error in '/' Application.

Förskjutning och längd låg utanför giltigt intervall för matrisen eller så är antalet större än antalet element från indexet till slutet av källmängden.

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.ArgumentException: Förskjutning och längd låg utanför giltigt intervall för matrisen eller så är antalet större än antalet element från indexet till slutet av källmängden.

Source Error:


Source File: C:\EPiServer\Sites\MyRelateSite\Templates\RelatePlus\UserControls\MainMenu.ascx.cs    Line: 45

Stack Trace:



Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955

Line 43:             // Filter the collection for visitors
Line 44:             Filters.FilterForVisitor.Filter(pages);
Line 45:             pages.RemoveRange(9, pages.Count - 1 - 9);
Line 46: 
Line 47:             foreach (PageData page in pages)
[ArgumentException: Förskjutning och längd låg utanför giltigt intervall för matrisen eller så är antalet större än antalet element från indexet till slutet av källmängden.]
   System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +51
   System.Collections.Generic.List`1.RemoveRange(Int32 index, Int32 count) +7459900
   EPiServer.Core.PageDataCollection.RemoveRange(Int32 index, Int32 count) +16
   EPiServer.Templates.RelatePlus.UserControls.MainMenu.LoadChildren(PageReference pageLink) in C:\EPiServer\Sites\MyRelateSite\Templates\RelatePlus\UserControls\MainMenu.ascx.cs:45
   EPiServer.Web.WebControls.HierarchicalPageLoader.GetFilteredChildren(PageReference pageLink) +45
   EPiServer.Web.WebControls.PageHierarchicalEnumerable.get_Pages() +29
   EPiServer.Web.WebControls.MenuList.CreateChildControls() +83
   EPiServer.Web.WebControls.PageTreeData.DataBind() +269
   EPiServer.Templates.RelatePlus.UserControls.MainMenu.OnLoad(EventArgs e) in C:\EPiServer\Sites\MyRelateSite\Templates\RelatePlus\UserControls\MainMenu.ascx.cs:31
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 

 

WR/
M.Mansson

#47223
Jan 19, 2011 22:10
Vote:
 

The problem is the faulty relate2+ template

pages.RemoveRange(9, pages.Count - 1 - 9);
gives an error since pages.Count in sv dont have 9 elementes

#47232
Jan 20, 2011 9:15
Vote:
 

I have done a bug report to investigate this further. Generally, the relate package is not developed to display multiple languages, but it should probably be handled in a better way.

Linus Ekström
EPiServer Development Team

#47233
Jan 20, 2011 9:44
Vote:
 

I saw that code the other day and it screamed change me..... :)

#47237
Jan 20, 2011 10:11
Vote:
 

Yeah, I just thought it was a typo when I was it so I didn't pay to much attention to it ;)

#47241
Jan 20, 2011 11:09
This thread is locked and should be used for reference only. Please use the Legacy add-ons 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.