Error when deleting a template based on a master page

Posted by Community Admin on 04-Aug-2018 09:13

Error when deleting a template based on a master page

All Replies

Posted by Community Admin on 30-Aug-2012 00:00

Hi 

I've switched my templates around and have been trying to delete a template that's no longer in use. When doing so I get the following in the Sitefinity error log:

Timestamp: 8/30/2012 9:08:36 AM
Message: HandlingInstanceID: 054ea1c4-6873-4dbf-8559-01784267cec2
An exception of type 'System.NullReferenceException' occurred and was caught.
-----------------------------------------------------------------------------
08/30/2012 10:08:36
Type : System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Object reference not set to an instance of an object.
Source : Telerik.Sitefinity
Help link : 
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Collections.Generic.HashSet`1[Telerik.Sitefinity.Pages.Model.PageNode] GetPagesBasedOnTemplate(Telerik.Sitefinity.Pages.Model.PageTemplate, Boolean)
Stack Trace :    at Telerik.Sitefinity.Modules.Pages.PageManager.GetPagesBasedOnTemplate(PageTemplate template, Boolean excludeNonExistingLanguages)
   at Telerik.Sitefinity.Modules.Pages.PageManager.Delete(PageTemplate item)
   at Telerik.Sitefinity.Fluent.Pages.PageTemplateFacade.Delete(CultureInfo language)
   at Telerik.Sitefinity.Modules.Pages.Web.Services.PageTemplatesService.BatchDeletePageTemplateInternal(String[] Ids, String deletedLanguage)
   at SyncInvokeBatchDeletePageTemplates(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)


Additional Info:


MachineName : 
TimeStamp : 8/30/2012 9:08:36 AM
FullName : Telerik.Sitefinity.Utilities, Version=5.1.3270.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
AppDomainName : /LM/W3SVC/18/ROOT-1-129907900680704473
ThreadIdentity : 
WindowsIdentity : IIS APPPOOL\app pool name
Requested URL : mydomain/.../
Category: ErrorLog
Priority: 0
EventId: 90000
Severity: Error
Title:Enterprise Library Exception Handling
Machine: 
App Domain: /LM/W3SVC/18/ROOT-1-129907900680704473
ProcessId: 5296
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Thread Name: 
Win32 ThreadId:6288
Extended Properties: 

Any thoughts on how I may delete this template?

Thanks

Brin

Posted by Community Admin on 30-Aug-2012 00:00

Dear Ruth

a) Make sure that no pages use this tempalte (from what I read you have done so)
b) Create a new page, select another template (the one you usually use) and make sure that you set that as default template.

If I remember correct there was once a problem that when no default template was set then creating a new one would cause troubles.

This is just a 5% to solve your problem but still worth a try.

What version are you using?

Markus

Posted by Community Admin on 30-Aug-2012 00:00

Hi Markus

I've followed the steps you provided but get the same error I'm afraid.

So I create a new page assigned a template other than the one I want to delete and marked it as default. I then deleted the new page and attempted to delete the template both on the page templates list screen and also once I had clicked through to the template in question.

We are using the latest version of Sitefinity - 5.1

Any other thoughts?

Thanks

Brin

Posted by Community Admin on 30-Aug-2012 00:00

@Brin 

I said it was a long shot - I would open a support ticket. Tomorrow Bulgaria is working with limited forces.

Markus

This thread is closed