The 'item:moving' event throws errors when publishing SXA website items

  • Publishing might fail with an unhandled exception after some items have been moved in the Master database. The following message can be found in the log:

    ERROR One or more exceptions occurred while processing the subscribers to the 'item:moving' event.
    Exception[1]: System.NullReferenceException 
    Message[1]: Object reference not set to an instance of an object. 
    Source[1]: Sitecore.XA.Foundation.Multisite 
    at Sitecore.XA.Foundation.Multisite.EventHandlers.VirtualMediaFolderValidator.OnItemMoving(Object obj, EventArgs args)
    at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)

Applies to:

SXA 1.7 Initial Release - 1.7 Update-1

SXA 1.8 Initial Release

February 27, 2020
February 27, 2020

Reference number:

242112

Keywords: 

  • Publishing,
  • SXA