November Happy Hour will be moved to Thursday December 5th.

Parameter pageLink has no page set

Vote:
 

Good day.

 

I installed a relate site and everything's good.

I created a new pageType called MainPage and I made this my start page. I created a MainPage (pagetype) page

I created a MyPage (pageType) page under it and I receive a Server Error in '/' Application.

 

Parameter has no page set
Parameter name: pageLink

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: Parameter has no page set
Parameter name: pageLink

Source Error: 

Line 471:                if (_mySettingsPage == null)
Line 472:                {
Line 473: _mySettingsPage = DataFactory.Instance.GetPage((PageReference)_startPage["MySettingsPage"]); Line 474:                }
Line 475:

 I understand that this is because I have no MySettingsPage property. So I added it and assigned a page to that property. However I still receive that parameter has no page set error and I'm running out of ideas why.

#51226
May 30, 2011 8:13
Vote:
 

I added the MySettingsPage proprety on the MainPage pagetype which is now my start page based on episerver.config

#51227
May 30, 2011 8:18
Vote:
 

I would guess that the  _startPage object is null. If your property is set on the site's EPiServer StartPage, you first need to get hold of the
PageData object of the StartPage:

PageData startPage = EPiServer.DataFactory.Instance.GetPage(PageReference.StartPage);

if(startPage["MySettingsPage"] != null)
   _mySettingsPage = DataFactory.Instance.GetPage(startPage["MySettingsPage"] as PageReference);

    

#51229
May 30, 2011 8:31
Vote:
 

I debugged it earlier, and the _startPage is not null.

And without doing anything, the error is gone now. I've experienced this kind of delayed response behaviour a lot of times with EPiServer and it looks like there's a caching happening behind the scene (even if I force refresh the page). And it's only after a while that solme changes are applied fully.

Are you familiar with this behaviour of EpiServer?

#51230
May 30, 2011 8:54
Vote:
 

Restarting IIS whenever I add a property fixes this delayed response issue for me.

#51231
May 30, 2011 9:08
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.