Index was outside the bounds of the array

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
12/5/2006 12:32:55 AM
Gravatar
Total Posts 6

Index was outside the bounds of the array

Hi Joe,

Attempting to upgrade from 2.1 to 2.1.5

Have run sql scripts upgradefrom2-1-2tonext.sql and 3CreateStoredProcedures.sql but get the above error.

Any ideas?
12/5/2006 1:52:20 AM
Gravatar
Total Posts 18444

Re: Index was outside the bounds of the array

The ...tonext...sql is not for any current release. it is in the source version and is work in progress toward a future release and is subject to change. It created 3 tables which you should delete because they may change before being released.
The tables are:
mp_PrivateMessages
mp_PrivateMessageAttachments
mp_PrivateMessagePriority

Where are you getting the error? Is that the full error message? Are you using a custom skin? If so try changing to a built in skin in the db like centered1 (mp_Sites table) then if that fixes it you may need to review your custom skin and compare it to the current ones.

Joe
12/6/2006 12:51:17 AM
Gravatar
Total Posts 6

Re: Index was outside the bounds of the array

Getting error

Index was outside the bounds of the array.

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.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error:

Line 3856:
Line 3857: arParams[0].Value = siteID;
Line 3858: arParams[1].Value = pageID;
Line 3859:
Line 3860: }

Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin PreInit  
Unhandled Execution Error
Index was outside the bounds of the array.
  at mojoPortal.Data.dbPortal.PageSettings_GetPage(Int32 siteID, Int32 pageID) in C:\Documents and Settings\cm-dawe\My Documents\Visual Studio 2005\Projects\mojo 2 1 5\MSSQLData\dbPortal.cs:line 3858
  at mojoPortal.Business.PageSettings.GetPage(Int32 siteID, Int32 pageID) in C:\Documents and Settings\cm-dawe\My Documents\Visual Studio 2005\Projects\mojo 2 1 5\Business\PageSettings.cs:line 272
  at mojoPortal.Business.PageSettings..ctor(Int32 siteID, Int32 pageID) in C:\Documents and Settings\cm-dawe\My Documents\Visual Studio 2005\Projects\mojo 2 1 5\Business\PageSettings.cs:line 41
  at mojoPortal.Business.SiteUtils.LoadCurrentPage() in C:\Documents and Settings\cm-dawe\My Documents\Visual Studio 2005\Projects\mojo 2 1 5\Business\SiteUtils.cs:line 2724
  at mojoPortal.Business.SiteUtils.GetCurrentPage() in C:\Documents and Settings\cm-dawe\My Documents\Visual Studio 2005\Projects\mojo 2 1 5\Business\SiteUtils.cs:line 2675
  at mojoPortal.Business.SiteUtils.SetMasterPage(Page page, SiteSettings siteSettings) in C:\Documents and Settings\cm-dawe\My Documents\Visual Studio 2005\Projects\mojo 2 1 5\Business\SiteUtils.cs:line 55
  at mojoPortal.Web.mojoBasePage.OnPreInit(EventArgs e) in C:\Documents and Settings\cm-dawe\My Documents\Visual Studio 2005\Projects\mojo 2 1 5\Web\Components\mojoBasePage.cs:line 62
  at mojoPortal.Web.SiteHome.OnPreInit(EventArgs e) in C:\Documents and Settings\cm-dawe\My Documents\Visual Studio 2005\Projects\mojo 2 1 5\Web\Default.aspx.cs:line 48
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 0.051884445609559 0.051884




when pointing a new set of compiled files at a current database (which is working OK).
Error is in browser and skin is one of yours.
12/6/2006 3:30:33 AM
Gravatar
Total Posts 18444

Re: Index was outside the bounds of the array

Hi Colin,

That error would seem to indicate that it looked up the required params for the stored proc "mp_Pages_SelectOne" and the procedure only wants one param instead of the 2 being assigned. All I can guess is you have an old version of that procedure. Although there were no schema change in 2.1.5 there were changes over the last few versions for stored procs so you need to run the script 3CreateStoredProcedures.sql that came with the 2.1.5 release.

Hope it helps,

Joe

ps, when you post errors using the editor you should paste the error in using the "Paste as Plain Text" toolbar (see the clipboard icons in the toolbar and mouse over to see their names). This will prevent the format errors that occur when pasting html fragments that are invalid or missing a closing tag somewhere.
12/6/2006 9:08:55 PM
Gravatar
Total Posts 6

Re: Index was outside the bounds of the array

Hi Joe,

I  ran 3CreateStoredProcedures.sql against a copy of the datbaase and pointed the 2.1.5 files at it and all 'seemed' fine until I try to access the admin pages.
With the exception of 'create new page' all other admin links forward to AccessDenied.aspx.

Any ideas gratefully received

Cheers

Colin
12/7/2006 1:03:23 AM
Gravatar
Total Posts 6

Re: Index was outside the bounds of the array

Bit more info:

I've taken another set of source files and pointed at the updated database I'm having problems with.

The admin links I mentioned above point at the folder containing old set of files, ie they 'seem' to be hardcoded!

I'm guessing that this is to do with the URL manager.
12/7/2006 1:16:42 AM
Gravatar
Total Posts 6

Re: Index was outside the bounds of the array

Joe,

Apologies for wasting your time!!

Turns out a colleague had hard coded all the admin links for some reason!!

*hangs head in shame*
You must sign in to post in the forums. This thread is closed to new posts.