0

We have several custom lists which are all deployed using WSPs along with some web parts to a SharePoint 2010 installation. Every time a user clicks on the 'Alert Me' button on a custom list or an item within an error page is displayed. Alerts work on all lists that have been created from within SharePoint. I've checked all other lists deployed using a WSP and the 'Alert Me' functionality displays the same error.

I can't find much information about the errors which I have pasted below. How can I make the alert functionality work? Does it require additional configuration in the schema.xml?

==== ULS Logs ====

w3wp.exe (0x2EE8)   0x28E8  SharePoint Foundation   Logging Correlation Data    xmnv    Medium      Site=/sites/Testing fc1ac8de-a0d4-447d-8bcf-a8ac10b2e935    
w3wp.exe (0x2EE8)   0x28E8  SharePoint Foundation   General                     72nz    Medium      Videntityinfo::isFreshToken reported failure.   fc1ac8de-a0d4-447d-8bcf-a8ac10b2e935    
w3wp.exe (0x2EE8)   0x28E8  SharePoint Foundation   Database                    d0d6    High        System.Data.SqlClient.SqlException: Arithmetic overflow error converting expression to data type int.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlDataReader.HasMoreRows()     at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)     at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)    fc1ac8de-a0d4-447d-8bcf-a8ac10b2e935    
w3wp.exe (0x2EE8)   0x28E8  SharePoint Foundation   Monitoring                  b4ly    High        Leaving Monitored Scope (Load CachedList:fb5ec6d5-3ca7-4a6f-b9bd-910e0cc46971). Execution Time=13.6962465693941 fc1ac8de-a0d4-447d-8bcf-a8ac10b2e935    
w3wp.exe (0x2EE8)   0x28E8  SharePoint Foundation   General                     8sl1    High        DelegateControl: Exception thrown while adding control 'ASP._controltemplates_metadatanavtree_ascx': Object reference not set to an instance of an object.  fc1ac8de-a0d4-447d-8bcf-a8ac10b2e935    
w3wp.exe (0x2EE8)   0x28E8  SharePoint Foundation   Database                    d0d6    High        System.Data.SqlClient.SqlException: Arithmetic overflow error converting expression to data type int.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlDataReader.HasMoreRows()     at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)     at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)    fc1ac8de-a0d4-447d-8bcf-a8ac10b2e935    
w3wp.exe (0x2EE8)   0x28E8  SharePoint Foundation   Runtime                     tkau    Unexpected  System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.SharePoint.ApplicationPages.SubNewEditBasePage.InitForm(Boolean fSubNew, EncodedLiteral LabelPageTitle, Control CtlSendTo1, RadioButton rdo_EmailDC, EncodedLiteral elEmailAddr, RadioButton rdo_SmsDC, TextBox tbMobileAddr, CheckBox cbSendUrlInSms, ListControl LCtlEventType, ListControl LCtlAlertFreq, ListControl LCtlAlertFilter, Control CtlEventTypes, Control CtlFilters, Control CtlFrequency, Control CtlFrequencyTime, Control CtlListViewFilters, TextBox TextTitle, ListControl LCtlView)     at Microsoft.SharePoint.ApplicationPages.SubNewPage.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Bool... fc1ac8de-a0d4-447d-8bcf-a8ac10b2e935    
w3wp.exe (0x2EE8)   0x28E8  SharePoint Foundation   Runtime                     tkau    Unexpected  ...ean includeStagesAfterAsyncPoint)    fc1ac8de-a0d4-447d-8bcf-a8ac10b2e935    
0

Problem solved!

tl;dr: The Type attribute on a ListTemplate must be a fair bit lower than 8388607 (i.e. int.MaxValue / 256).

===

The custom ListTemplate had a Type of 532175468 but changing it to 5321754 allows alerts to be created once again. This is because SubNew.aspx (and other features such as RSS feed subscription) calls various stored procedures within the content database that multiplies the sum of a list's type and base type by 256, causing an integer overflow. The stored procedures examined are proc_GetDocsMetaInfo and proc_GetDocsMetaInfoSingle.

I could not find this behaviour documented anywhere so if we are using bad practices for our list definitions please chime in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.