2

SharePoint 2016 throws an error in the ULS log and generates a zero byte aspx page when attempting to convert a design template (.html) to a page layout (.aspx) for a new, uncustomized page layout.

Any ideas for what may be the source of the problem or how to debug are greatly appreciated.

Steps to reproduce:

  1. Create a new instance of Server 2016, joined to a domain.
  2. Use Windows Update to ensure all of the latest updates are applied
  3. Install SharePoint 2016 Enterprise onto Server 2016
  4. Install Nov Feature Pack 1 for SharePoint 2016 followed by patches for December 2016 and January 2017. Run Windows Update again. No updates found to install.
  5. Create a new site based on the Publishing template
  6. Navigate to the Library Settings page for the master page library and disable minor versions by selecting major versions in Versioning settings
  7. Navigate to the Design Manager on the SharePoint publishing site
  8. Select Edit Page Layouts -> Create a page layout
  9. Enter Sample1 as the layout page name and choose Seattle for the master page
  10. Select Article Page for the content type and select OK

Results:

  1. The status for the new page layout is set to "Conversion Successful" and the Approval Status is set to "Approved".
  2. The resulting aspx page (Sample1.aspx) is empty, zero bytes. This can be confirmed by opening the master page library using windows explorer.
  3. The error message below appears in the ULS log.
  4. This occurs for a non-customized page layout. Opening the page layout (.html) and making minor updates, to re-trigger the conversion, results in the same results.

Error message from the ULS Log:

HtmlDesign:[Unexpected exception:ItemUpdated] for key[_catalogs/masterpage/Sample1.html] EventAfterUrl:_catalogs/masterpage/Sample1.html with exception message: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Xml.Linq.XContainer.d__39.MoveNext() at System.Linq.Parallel.PartitionedDataSource1.ContiguousChunkLazyEnumerator.MoveNext(T& currentElement, Int32& currentKey) at System.Linq.Parallel.WhereQueryOperator1.WhereQueryOperatorEnumerator1.MoveNext(TInputOutput& currentElement, TKey& currentKey) at System.Linq.Parallel.ExceptionAggregator.d__12.MoveNext() --- End of inner exception stack trace --- at System.Linq.Paralle... 102ecf9d-d7fe-50a0-7d2e-44ea686a9365 01/27/2017 08:13:47.70* w3wp.exe (0x19F0) 0x0568 Web Content Management Publishing ajw56 Unexpected ...l.ExceptionAggregator.ThrowOCEorAggregateException(Exception ex, CancellationState cancellationState) at System.Linq.Parallel.ExceptionAggregator.d__12.MoveNext() at System.Linq.Parallel.QueryOpeningEnumerator1.MoveNext() at Microsoft.SharePoint.Publishing.Design.DesignFile.SaveContentPlaceHolders(XmlWriter xmlWriter) at Microsoft.SharePoint.Publishing.Design.DesignFile.GenerateStreamAndSaveToNonEditableFile() at Microsoft.SharePoint.Publishing.Design.DesignFile.ConvertEditableFileToNonEditableFile() at Microsoft.SharePoint.Publishing.Design.AssociatedFile.UpdateAssociatedItem(SPItemEventProperties properties) at Microsoft.SharePoint.Publishing.Design.AssociatedFile.b__e(SPItemEventProperties properties) at Microsoft.Sha... 102ecf9d-d7fe-50a0-7d2e-44ea686a9365 01/27/2017 08:13:47.70* w3wp.exe (0x19F0) 0x0568 Web Content Management Publishing ajw56 Unexpected ...rePoint.Publishing.Design.HtmlDesignEventReceiver.b__12(SPItemEventProperties properties, FileWithStatus fileWithStatus) at Microsoft.SharePoint.Publishing.Design.HtmlDesignEventReceiver.RunOnlyIfFirstEvent(SPItemEventProperties properties, Action2 action) ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object. at System.Xml.Linq.XContainer.d__39.MoveNext() at System.Linq.Parallel.PartitionedDataSource1.ContiguousChunkLazyEnumerator.MoveNext(T& currentElement, Int32& currentKey) at System.Linq.Parallel.WhereQueryOperator1.WhereQueryOperatorEnumerator1.MoveNext(TInputOutput& currentElement, TKey& currentKey) at System.Linq.Parallel.ExceptionAggregator.d__1`2.Move... 102ecf9d-d7fe-50a0-7d2e-44ea686a9365 01/27/2017 08:13:47.70* w3wp.exe (0x19F0) 0x0568 Web Content Management Publishing ajw56 Unexpected ...Next()<--- 102ecf9d-d7fe-50a0-7d2e-44ea686a9365

Edit:

This issue was solved by allocating 2 cores to my VirtualBox VM hosting SharePoint.

By default, a new VirtualBox VM is allocated only one core. In the past, I remember either SharePoint 2013 or SQL server (or something else) would produce an error if only one core had been allocated, serving as my reminder to allocate at least 2 cores. With SharePoint 2016 and SQL Server 2014, the installation completed w/o error, with only one core allocated.

It appears that the provisioning process for a publishing site would not complete fully in this configuration, with only one core allocated. One result was an invalid master page, seattle.master. The master page could be repaired in place, after the site had been provisioned, simply by saving the design file, seattle.html, forcing a re-gen of seattle.master. Afterwards, new page layouts can be created and the .aspx file is generated, as expected.

Increasing the CPU cores to 2, repaired the source of the problem which occurred during site provisioning.

  • Sure sounds like a bug. Maybe tweet @sharepoint? – Kirk Liemohn Jan 30 '17 at 22:00

Your Answer

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

Browse other questions tagged or ask your own question.