Per-location view error

Microsoft

Hi,

 

When trying to setup per-location view on a document library I get

07/22/2021 09:41:32.80 w3wp.exe (SP:0x1824) 0x1838 SharePoint Foundation Database 880i High System.Data.SqlClient.SqlException (0x80131904): Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock) ClientConnectionId:c44a52e7-01c9-43b1-bc71-ef8da0f79863 Error Number:8622,State:1,Class:16 66f5dd9f-29e1-405b-c368-99bf027b1e27
07/22/2021 09:41:32.80 w3wp.exe (SP:0x1824) 0x1838 SharePoint Foundation Database 880k High at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock) at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock) at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean canRetryForDeadlock, Boolean bDontBindRequestGuid) at Microsoft.SharePoint.Library.SPRequestInternalClass.GetWebAndChildrenNSInfo(String bstrUrl, Guid gSiteId, Guid gWebId, UInt32 dwOptions, Boolean bGetPath, String bstrExpandPath, UInt32 dwWebUrlPrefixLen, Object& pvarThisWeb, Object& pvarSubwebs, Object& pvarLists, Object& pvarExpandedNodes, UInt32& pdwThisWebCount, UInt32& pdwSubwebCount, UInt32& pdwListCount, UInt32& pdwExpandedNodeCount) at Microsoft.SharePoint.Library.SPRequestInternalClass.GetWebAndChildrenNSInfo(String bstrUrl, Guid gSiteId, Guid gWebId, UInt32 dwOptions, Boolean bGetPath, String bstrExpandPath, UInt32 dwWebUrlPrefixLen, Object& pvarThisWeb, Object& pvarSubwebs, Object& pvarLists, Object& pvarExpandedNodes, UInt32& pdwThisWebCount, UInt32& pdwSubwebCount, UInt32& pdwListCount, UInt32& pdwExpandedNodeCount) at Microsoft.SharePoint.Library.SPRequest.GetWebAndChildrenNSInfo(String bstrUrl, Guid gSiteId, Guid gWebId, UInt32 dwOptions, Boolean bGetPath, String bstrExpandPath, UInt32 dwWebUrlPrefixLen, Object& pvarThisWeb, Object& pvarSubwebs, Object& pvarLists, Object& pvarExpandedNodes, UInt32& pdwThisWebCount, UInt32& pdwSubwebCount, UInt32& pdwListCount, UInt32& pdwExpandedNodeCount) at Microsoft.SharePoint.Navigation.SPHierarchyDataView.GetNamespaceNodesForWebAndChildren(Guid webId, UInt32 filter, String expandFolder, Boolean bGetWeb) at Microsoft.SharePoint.Navigation.SPHierarchyDataView.GetNamespaceNodesForWebChildren(Guid webId, UInt32 filter, String expandFolder) at Microsoft.SharePoint.Navigation.SPHierarchyDataView.Select() at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataHierarchyDataView.GetUnderlyingViewData() at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataHierarchyDataView.GetReorderedWebChildNodes() at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataHierarchyDataView.GetHierarchyNodesForView() at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataHierarchyDataView.Select() at System.Web.UI.WebControls.TreeView.DataBindNode(TreeNode node) at System.Web.UI.WebControls.TreeView.PerformDataBinding() at Microsoft.SharePoint.WebControls.SPTreeView.OnPreRender(EventArgs e) 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.Control.PreRenderRecursiveInternal() 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.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 66f5dd9f-29e1-405b-c368-99bf027b1e27
07/22/2021 09:41:32.80 w3wp.exe (SP:0x1824) 0x1838 SharePoint Foundation Database 880j High SqlError: 'Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN.' Source: '.Net SqlClient Data Provider' Number: 8622 State: 1 Class: 16 Procedure: '' LineNumber: 1 Server: 'SQL' 66f5dd9f-29e1-405b-c368-99bf027b1e27
07/22/2021 09:41:32.80 w3wp.exe (SP:0x1824) 0x1838 SharePoint Foundation Database 5586 Critical Unknown SQL Exception 8622 occurred. Additional error information from SQL Server is included below. Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN. 66f5dd9f-29e1-405b-c368-99bf027b1e27

 

The error comes when try to select a folder on Location to configure.

Anyone has this issue ?

7 Replies

@Sorin Sandu : Please check these settings in SharePoint site where you were trying...

  1. On the SharePoint site, click the Settings button (Gear icon), and then click Site Settings.
  2. Under Site Actions, click Manage Site Features.
  3. Activate the Metadata Navigation and Filtering feature.
  4. Locate the Library Settings of the document library in question.
  5. Click Per-Location View Settings.
  6. Change the folders to have the default views that you want.
  7. Go back to Library Settings for that library, and then click Metadata navigation settings.
  8. Add Folders and Content Type to the Selected Hierarchy Fields box, and then click OK.

Hi @Sorin Sandu, thanks for trying out the new SharePoint Server Subscription Edition Preview build and reporting this issue.  To help us investigate it, can you share the full version number of your SQL Server database engine (or what cumulative update level your SQL Server database is at)?  Also, can you provide the full repro steps to reach this error?

Hi @Troy Starr,

 

I am using Microsoft SQL Server Developer (64-bit) (15.0.4102.2).

Here are repro steps:

1. New team site collection

2. Activate site feature Metadata Navigation and Filtering

3. Create a new OOTB custom list

4. Add a few items and create a new folder

5. Create a new view and use grouping (just to make a change)

6. Use Per-Location View Settings and try to select the new folder created

SorinSandu_0-1627017885909.png

 

@Surya_Pammi Same error when click on Folder2

SorinSandu_0-1627018233665.png

 

Thanks @Sorin Sandu, these details are very helpful.  We're following up to identify the best approach to fix this issue.

@Troy Starr 

Perhaps it's related: We are getting an error when trying to access the "SharePoint structure view" when adding a reference to a document or a picture. In our case, to replicate an issue, we can replicate the exact same error this way:

 

DenisMolodtsov_0-1666296349626.png

 

We recently upgraded from SP 216 to SE. And this is this started occurring. This is not happening if we create an empty site collection from scratch. So, some old data + a database upgrade process breaks this functionality in SE. At least in our farm.

 

Error:

System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80131904 at Microsoft.SharePoint.Library.SPRequestInternalClass.GetWebAndChildrenNSInfo(String bstrUrl, Guid gSiteId, Guid gWebId, UInt32 dwOptions, Boolean bGetPath, String bstrExpandPath, UInt32 dwWebUrlPrefixLen, Object& pvarThisWeb, Object& pvarSubwebs, Object& pvarLists, Object& pvarExpandedNodes, UInt32& pdwThisWebCount, UInt32& pdwSubwebCount, UInt32& pdwListCount, UInt32& pdwExpandedNodeCount) at Microsoft.SharePoint.Library.SPRequest.GetWebAndChildrenNSInfo(String bstrUrl, Guid gSiteId, Guid gWebId, UInt32 dwOptions, Boolean bGetPath, String bstrExpandPath, UInt32 dwWebUrlPrefixLen, Object& pvarThisWeb, Object& pvarSubwebs, Object& pvarLists, Object& pvarExpandedNodes, UInt32& pdwThisWebCount, UInt32& pdwSubwebCount, UInt32& pdwListCount, UInt32& pdwExpandedNodeCount)

 

 

Discovered same error on upgraded site (2013 > 2016 > SE). Occurs on all custom lists for one particular site, but also on Calendar and Tasks lists!! No probs with other lists like Site Pages or Announcements.

What is the status on a fix for this? Site migration from previous version of SP seems like a common use case...