2013-08-06 11 views
5

Önizleme sırasında sayfayı yüklerken merhaba şeridi yüklemedim. Nasıl düzeltileceğine dair herhangi bir ipucunuz var mı? Sorun şeridindeki My Items düğmesiyle olduğu gibi yığın izleme bilgilerdenSayfa önizleme sırasında şerit kontrol istisnası

Object reference not set to an instance of an object. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace: 


[NullReferenceException: Object reference not set to an instance of an object.] 
    Sitecore.Data.Database.ApplySecurity(Item[] items) +112 
    Sitecore.Data.Database.SelectItems(String query) +252 
    Sitecore.Shell.Applications.WebEdit.Commands.OpenMyItems.GetHeader(CommandContext context, String header) +188 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderSmallButton(HtmlTextWriter output, Item button, CommandContext commandContext) +307 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderButton(HtmlTextWriter output, Item button, CommandContext commandContext) +732 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext) +330 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext, Boolean isContextual, String id) +204 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext, Boolean isContextual) +242 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunks(HtmlTextWriter output, Item strip, CommandContext commandContext, Boolean isContextual) +442 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderStrips(HtmlTextWriter output, Item ribbon, Boolean isContextual, ListString visibleStripList) +800 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderStrips(HtmlTextWriter output, Item defaultRibbon, Item contextualRibbon, ListString visibleStripList) +215 
    Sitecore.Web.UI.WebControls.Ribbons.Ribbon.Render(HtmlTextWriter output) +610 
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +149 
    Sitecore.Web.HtmlUtil.RenderControl(Control ctl) +74 
    Sitecore.Shell.Applications.WebEdit.WebEditRibbonForm.RenderRibbon(Item item) +603 
    Sitecore.Shell.Applications.WebEdit.WebEditRibbonForm.OnLoad(EventArgs e) +1238 

[TargetInvocationException: Exception has been thrown by the target of an invocation.] 
    System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 
    System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76 
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +193 
    System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35 
    Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +337 
    System.Web.UI.Control.LoadRecursive() +71 
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178 

cevap

8

görünüyor.

enter image description here

Öyle görünüyor ki nedense bu düğmeye yüklenirken boş içeren öğeleri listesini döndürür iken yürütülür hızlı sorgu için. Herhangi bir özel veri sağlayıcınız var mı?

2 çözüm vardır deneyebilirsiniz:

  • net önbellek /sitecore/admin/cache.aspx sayfa
  • üzerinde yönetici
Item[] items = Sitecore.Client.ContentDatabase.SelectItems(
    "fast://*[@__lock='%\"full-username-which-experienced-exception-with-domain-name\"%']"); 
olarak bu sorguyu çalıştırarak sıkıntıları neden olan öğeleri bulmak

Diğer seçenek bu düğmeyi şeritten gizlemektir (core veritabanında menkul kıymeti kaldırma veya değiştirme /sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Page Editor/Edit/My Items numaralı haklar. Benim deneyimime göre, bu düğme Page Editor modunda nadiren kullanılır ve Page Editor'u yavaşlatır, bu mod her yüklendiğinde My items düğmesi geçerli kullanıcı tarafından kilitlenen tüm makaleleri sayar, bu nedenle zaten iyi bir fikir olabilir.

+0

Bu sorguyu nasıl yönetici olarak çalıştırdığımı açıklayabilir misiniz? – Alexandr

+0

Yerel veritabanımda standart MS SQL bağlantısı kullanıyorum. Teşekkürler. – Alexandr

+1

Bu kod sayfalarınızdan herhangi birine eklenebilir - sadece hata ayıklama seçeneği için. Kalıcı bir değişim olarak değil. Bu sorguya uygun kullanıcı adını koymayı unutmayın. Ve site olarak ** Sitecore ** olarak giriş yapın. Ancak, kullanıcılar 'Sayfa Düzenleyicisi'ndeki' Öğelerim 'düğmesini kullanmazlarsa, 'corecore'/sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Page Editor/Edit/Öğelerim 'öğesini kaldırmanızı öneririm veritabanı. –

2

Aynı sorunu Sitecore 7 sayfa düzenleme modunda yaşıyordum. Ayrıca içerik editöründe "Öğelerim" düğmesini tıkladığınızda oluşan hatayı doğruladım.

Alex Shyba tarafından bu yazı bulundu: http://sitecoreblog.alexshyba.com/2011/11/hidden-gem-of-sitecore-page-editor.html

Kendi yayını anlaşılacağı senin dosyasını dahil daha iyisi web.config'de bu ayarı ayarlama veya: Bu sayfa editörü sorunu çözüldü

<setting name="WebEdit.ShowNumberOfLockedItemsOnButton" value="false" /> 

Benim için temiz ve uygulanması kolaydı. Umarım bu, başkalarıyla da mücadele eder.

2

7.1'in kullanılması, bu veritabanını başka bir makinedeki yedeklemelerden geri yüklediğimde başlatıldı. Ben arama endeks yeniden bunu çözmek başardı: Ben de veritabanlarını temizledik ve bağlantı veritabanını yeniden

Arama Dizin>

Masaüstü> Denetim Masası> Veritabanları yeniden, ancak bu değildi düzelt.

+0

Aynı sorunu yaşadım ve Arama Dizini Yardımı bana yardımcı oldu .. Teşekkürler. –

İlgili konular