none
SharePoint 2007 blog site error - Value cannot be null. Parameter name: g

    Question

  •  

    Hi All

     

    I was hoping someone could help me out with a problem I am having with implementing a blog site within SharePoint 2007.  Our company wishes to use a blog site for internal use (items for sale etc).  I have created a blank site using the blog template, however whenever we use the NewPost.aspx or EditPost.aspx are used an error is thrown.  See below.

     

    The weird thing is, if I create a site using the blog template within WSS3 (or in the personal sites area - mysites) everything works fine.  I have also created another SharePoint 2007 install and it shows the same behaviour. 

     

    Does anyone know what could be wrong?

     

    Cheers

    Aaron

     

    Server Error in '/' Application.

    Value cannot be null.
    Parameter name: g

    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: Value cannot be null.
    Parameter name: g

    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:

    [ArgumentNullException: Value cannot be null.
    Parameter name: g]
       System.Guid..ctor(String g) +5573711
       Microsoft.SharePoint.WebControls.LookupField.get_LookupList() +879
       Microsoft.SharePoint.WebControls.LookupField.get_DataSource() +2383
       Microsoft.SharePoint.WebControls.LookupField.CreateChildControls() +2555
       System.Web.UI.Control.EnsureChildControls() +149
       Microsoft.SharePoint.WebControls.BaseFieldControl.OnLoad(EventArgs e) +216
       System.Web.UI.Control.LoadRecursive() +66
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Control.LoadRecursive() +191
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2604
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

    Monday, March 31, 2008 3:05 AM

All replies

  • It looks like you are possibly missing your Categories list??

     

    --Vince

    http://blog.thekid.me.uk

     

    Monday, March 31, 2008 8:02 AM
  • I wish it was that simple Vince Smile  Everything seems to be working as it should (including Categories) except the "Create a Post" and the option to "Edit" posts.  I can create a post using the "Launch Blog Program to Post" link on the home page of the blog site. 

     

    Monday, March 31, 2008 10:13 PM
  • Aaron,

     

    I would be tempted to delete the Category column & re-create it...its the only LookUp field on the page. At least try editing it and ensure it is pointing to the correct list.

     

    A little plug  but, it might be worth installing the EBE to see what happens...it removes the category column and replaces it with a multi-category column.

     

    --Vince

    Monday, March 31, 2008 10:20 PM
  •  

    I think you are on the money with that Vince, however I can't remove the column.  When I look at the properties for the list and click on the Category column so I can remove it, it comes up with the same error message.  I don't suppose you know of another way I can remove the Category column?
    Tuesday, April 01, 2008 12:06 AM
  • Aaron,

     

    Create a new .aspx page in the LAYOUTS folder ... C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS

     

    Paste the code below into the page and save it.

     

    Navigate to that page from your blog...http://www.domain.com/blog/_layouts/yourpage.aspx

     

    Code Snippet

    <%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

     

    <%@ Page Language="C#" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase"
    MasterPageFile="~/_layouts/simple.master"    %>

     

    <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>

     

    <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
        Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>


    <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities"
        Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

     

    <%@ Import Namespace="Microsoft.SharePoint" %>

     

    <asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
        Delete Column
    </asp:Content>

     

    <asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">

        <script runat="server" language="c#">

            protected override void OnLoad(EventArgs e)
            {
                base.OnLoad(e);
            }
           
            protected void Delete(object sender, EventArgs e)   
            {
                SPList oList = SPContext.Current.Web.Lists[idListName.Text];
                SPField oField = null;
               
                try
                {
                    oField = oList.Fields.GetFieldByInternalName(idName.Text);
                }
                catch
                {
                    oField = oList.Fields[idName.Text];
                }

                oField.Delete();
                oList.Update();
            }

         </script>

        <SharePoint:FormDigest runat=server />

        List Name: <Asp:TextBox id="idListName" runat=server /> <br />
        Column Name: <Asp:TextBox id="idName" runat=server /> <br /> <asp:Button runat=server OnClick="Delete" text="Delete" />
    </asp:Content>

     

     

     

    This page will allow you to delete any column from the list.

     

    HTH, Vince

     

     

     

     

    Wednesday, April 02, 2008 2:09 PM
  • Thanks Vince.  The column is gone now!  The column name was Category, but now I can not add it back in as it hits me with an error "The column name that you entered is already in use or reserved. Choose another name."  I can add other new columns.

     

    I can now add new posts, but I can not view or edit existing posts - error is:

     

    Server Error in '/' Application.

    One or more field types are not installed properly. Go to the list settings page to delete these fields.

    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.Runtime.InteropServices.COMException: One or more field types are not installed properly. Go to the list settings page to delete these fields.

    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:

    [COMException (0x81020014): One or more field types are not toinstalled properly. Go  the list settings page to delete these fields.]
       Microsoft.SharePoint.Library.SPRequestInternalClass.GetListItemDataWithCallback(String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pSchemaCallback) +0
       Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback(String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pSchemaCallback) +265
    
    [SPException: One or more field types are not installed properly. Go to the list settings page to delete these fields.]
       Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback(String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pSchemaCallback) +395
       Microsoft.SharePoint.SPListItemCollection.EnsureListItemsData() +2191
       Microsoft.SharePoint.SPListItemCollection.get_Count() +77
       Microsoft.SharePoint.SPList.GetItemById(Int32 id, String strRootFolder, Boolean cacheRowsetAndId) +744
       Microsoft.SharePoint.SPContext.get_Item() +820
       Microsoft.SharePoint.SPContext.get_ContentType() +1313
       Microsoft.SharePoint.WebPartPages.ListFormWebPart.get_FormPageUrl() +1521
       Microsoft.SharePoint.WebPartPages.ListFormWebPart.OnInit(EventArgs e) +202
       System.Web.UI.Control.InitRecursive(Control namingContainer) +456
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +264
       System.Web.UI.WebControls.WebParts.WebPartManagerControlCollection.AddWebPartHelper(WebPart webPart) +352
       System.Web.UI.WebControls.WebParts.WebPartManagerControlCollection.AddWebPart(WebPart webPart) +6005566
       System.Web.UI.WebControls.WebParts.WebPartManagerInternals.AddWebPart(WebPart webPart) +89
       Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddWebPartWithRetry(WebPart webPart) +147
       Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddDynamicWebPart(WebPart webPart) +129
       Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts) +8034
       Microsoft.SharePoint.WebPartPages.SPWebPartManager.LoadWebParts() +93
       Microsoft.SharePoint.WebPartPages.SPWebPartManager.OnPageInitComplete(Object sender, EventArgs e) +690
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Page.OnInitComplete(EventArgs e) +4471632
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1759
    

    Wednesday, April 02, 2008 9:56 PM
  • Just to continue this post. This is how I solved the situation.

    I useed Fields Explorer (http://www.codeplex.com/tmt/Release/ProjectReleases.aspx?ReleaseId=17330)
    to delete the PostCategory field from the Posts List.

    Then I recreated the PostCategory field using sharepoint UI.

    Worked Ok for me.



    Wednesday, December 17, 2008 8:29 AM
  • SharePoint Manager 2007 is another great tool (available here: http://www.codeplex.com/spm) for deleting fields from lists when encountering issues like this.
    Tuesday, July 07, 2009 7:03 PM