It seems that whenever I have a Data view web part and add a Sharepoint List toolbar I am getting an error and cannot load the page. It's even wierder since I have a couple pages where it has worked, and for the past month or so, any toolbar I add causes the same problem. Here are my steps to reproduce the error:
- Create a new page.
- Insert-->Sharepoint Controls-->Webpart zone
- Data View-->Insert Data View
- Select a Document Library or List and go Show Data
- Select some fields and go Insert as Multi-Item view
- Click Smart Menu and select Data View Properties
- Check SharePoint List Toolbar
If I then preview the page I get:
Server Error in '/' Application.
The specified view is invalid.
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. Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434 I'm a bit at a loss here. This seems like a pretty basic functionality to go buggy on me. Any help would be greatly appreciated!
Exception Details: System.ArgumentException: The specified view is invalid.
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:[ArgumentException: The specified view is invalid.]
Microsoft.SharePoint.SPViewCollection.get_Item(Guid guid) +694
Microsoft.SharePoint.SPViewContext.get_View() +241
Microsoft.SharePoint.WebControls.NewMenu.AddMenuItems() +1166
Microsoft.SharePoint.WebControls.ToolBarMenuButton.CreateChildControls() +2368
Microsoft.SharePoint.WebControls.NewMenu.CreateChildControls() +345
System.Web.UI.Control.EnsureChildControls() +149
Microsoft.SharePoint.WebControls.TemplateBasedControl.OnLoad(EventArgs e) +103
Microsoft.SharePoint.WebControls.ToolBarMenuButton.OnLoad(EventArgs e) +86
System.Web.UI.Control.LoadRecursive() +66 System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.AddedControl(Control control, Int32 index) +4697499
Microsoft.SharePoint.WebPartPages.WebPart.AddParsedSubObject(Object obj) +1129
Microsoft.SharePoint.WebPartPages.DataFormWebPart.CreateChildControls() +1143
System.Web.UI.Control.EnsureChildControls() +149
System.Web.UI.Control.PreRenderRecursiveInternal() +71
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3681
Here is the code being generated by SPD for the toolbar:<table class="ms-menutoolbar" cellpadding="2" cellspacing="0" border="0" width="100%"> <tr> <td class="ms-toolbar" nowrap=""> <SharePoint:newmenu runat="server"></SharePoint:newmenu> </td> <td class="ms-toolbar">|</td> <td class="ms-toolbar" nowrap=""> <SharePoint:actionsmenu runat="server"></SharePoint:actionsmenu> </td> <td class="ms-toolbar">|</td> <td class="ms-toolbar" nowrap=""> <SharePoint:settingsmenu runat="server"></SharePoint:settingsmenu> </td> <td width="99%" class="ms-toolbar" nowrap=""></td> <td nowrap="" class="ms-toolbar"> <table border="0" cellpadding="0" cellspacing="0" style="margin-right: 4px"> <tr> <td class="ms-listheaderlabel" nowrap="">View: <xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&nbsp;</xsl:text> </td> <td nowrap="" class="ms-viewselector"> <SharePoint:viewselectormenu runat="server"></SharePoint:viewselectormenu> </td> </tr> </table> </td> </tr> </table>
Thanks!
** Edit i did a little prowling through my event logs and found this:
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 19/08/2008 4:28:56 PM
Event ID: 1309
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: trex.DOMAIN.ca
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 19/08/2008 4:28:56 PM
Event time (UTC): 19/08/2008 8:28:56 PM
Event ID: 582326bfc0fe4a84afec455e2d61123b
Event sequence: 70461
Event occurrence: 401
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/903229103/ROOT-1-128636272763686720
Trust level: WSS_Minimal
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\80\
Machine name: TREX
Process information:
Process ID: 1624
Process name: w3wp.exe
Account name: DOMAIN\WSS_APP_POOL
Exception information:
Exception type: ArgumentException
Exception message: The specified view is invalid.
Request information:
Request URL: http://w3.DOMAIN.ca/test.aspx
Request path: /test.aspx
User host address: 192.168.1.5
User:
Is authenticated: False
Authentication Type:
Thread account name: DOMAIN\WSS_APP_POOL
Thread information:
Thread ID: 8
Thread account name: DOMAIN\WSS_APP_POOL
Is impersonating: False
Stack trace: at Microsoft.SharePoint.SPViewCollection.get_Item(Guid guid)
at Microsoft.SharePoint.SPViewContext.get_View()
at Microsoft.SharePoint.WebControls.NewMenu.AddMenuItems()
at Microsoft.SharePoint.WebControls.ToolBarMenuButton.CreateChildControls()
at Microsoft.SharePoint.WebControls.NewMenu.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at Microsoft.SharePoint.WebControls.TemplateBasedControl.OnLoad(EventArgs e)
at Microsoft.SharePoint.WebControls.ToolBarMenuButton.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at Microsoft.SharePoint.WebPartPages.WebPart.AddParsedSubObject(Object obj)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Perhaps a clue!