Sitecore WFFM – 401 Unauthorized

Posted on

Issue:

On the form reports, cannot view the forms reports.

Solution:

In IIS,¬†make sure the Authentication of the site for ‘Anonymous Authentication’ is set correct.

  1. Click ‘Edit..’ and see the identity.
  2. If IUSR, make sure that the website root has a permission of the IUSR user.

Advertisements

[Fixed] #Sitecore – The marketing definition repositories have not been configured.

Posted on Updated on

Been fixing lots of issues with the client project lately, and one of those is the error I encountered in the media library wherein when you click a media item an error will pop up, as show below.

The_marketing_definition_repositories_have_not_been_configured_pop_up_more_details

Pasting the full error traces here.

 

Server Error in ‘/’ Application.

The marketing definition repositories have not been configured.

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.InvalidOperationException: The marketing definition repositories have not been configured.

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:
[InvalidOperationException: The marketing definition repositories have not been configured.]
Sitecore.Marketing.Definitions.Repository.NotConfiguredRepository.Sitecore.Marketing.Definitions.Repository.IDefinitionRepository<Sitecore.Marketing.Definitions.MarketingAssets.Data.MarketingAssetDefinitionRecord>.Get(ID definitionId, CultureInfo cultureInfo, Boolean includeInactiveVersion) +122
Sitecore.Marketing.Definitions.MarketingAssets.MarketingAssetDefinitionManager.Get(ID id, CultureInfo cultureInfo, Boolean includeInactiveVersion) +103
Sitecore.Marketing.Definitions.MarketingAssets.MarketingAssetDefinitionManager.Get(ID id, CultureInfo cultureInfo) +71
Sitecore.Marketing.Client.Shell.Framework.Commands.Marketing.Assets.DeployAsset.QueryState(CommandContext context) +139
Sitecore.Shell.Framework.Commands.CommandManager.QueryState(Command command, CommandContext context) +38
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.FillParamsFromCommand(CommandContext commandContext, RibbonCommandParams ribbonCommandParams) +284
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.GetCommandParameters(Item controlItem, CommandContext commandContext) +83
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderLargeButton(HtmlTextWriter output, Item button, CommandContext commandContext) +82
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderButton(HtmlTextWriter output, Item button, CommandContext commandContext) +462
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext) +331
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext, Boolean isContextual, String id) +205
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext, Boolean isContextual) +237
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunks(HtmlTextWriter output, Item strip, CommandContext commandContext, Boolean isContextual) +437
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderStrips(HtmlTextWriter output, Item ribbon, Boolean isContextual, ListString visibleStripList) +801
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderStrips(HtmlTextWriter output, Item defaultRibbon, Item contextualRibbon, ListString visibleStripList) +283
Sitecore.Web.UI.WebControls.Ribbons.Ribbon.Render(HtmlTextWriter output) +626
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
Sitecore.Web.HtmlUtil.RenderControl(Control ctl) +75
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateRibbon(Item folder, Boolean isCurrentItemChanged, Boolean showEditor) +462
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update() +441
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs e) +212

[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) +211
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Object[] parameters) +37
Sitecore.Reflection.ReflectionUtil.CallMethod(Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Object[] parameters) +66
Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +117
System.Web.UI.Control.PreRenderRecursiveInternal() +113
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34274

Solution:

Make sure that these configurations are existing and enabled.

  1. Sitecore.Marketing.Definitions.MarketingAssets.Repositories.config

Other related configurations you might want to check but they are not mandatory to be able to fix the issue, but still worth noting:

  1. Sitecore.Marketing.Solr.IndexConfiguration.config
  2. Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Solr.Index.Web.config
  3. Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Solr.IndexConfiguration.config
  4. Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Solr.Index.Master.config
  5. Sitecore.Marketing.Search.config
  6. Sitecore.Marketing.Solr.Index.Master.config
  7. Sitecore.Marketing.Solr.Index.Web.config

[Fixed] #Sitecore RebuildSearchIndex|System.IO.IOException: Cannot overwrite

Posted on Updated on

Issue: Cannot overwrite index during quick search index rebuild via Sitecore Control panel .

Job started: RebuildSearchIndex|System.IO.IOException: Cannot overwrite: D:\SITECORE\data\indexes\__system\_b.fdt
at Lucene.Net.Store.FSDirectory.InitOutput(String name)
at Lucene.Net.Store.SimpleFSDirectory.CreateOutput(String name)
at Lucene.Net.Index.FieldsWriter..ctor(Directory d, String segment, FieldInfos fn)
at Lucene.Net.Index.StoredFieldsWriter.InitFieldsWriter()
at Lucene.Net.Index.StoredFieldsWriter.FinishDocument(PerDoc perDoc)
at Lucene.Net.Index.DocumentsWriter.WaitQueue.WriteDocument(DocWriter doc)
at Lucene.Net.Index.DocumentsWriter.WaitQueue.Add(DocWriter doc)
at Lucene.Net.Index.DocumentsWriter.FinishDocument(DocumentsWriterThreadState perThread, DocWriter docWriter)
at Lucene.Net.Index.DocumentsWriter.UpdateDocument(Document doc, Analyzer analyzer, Term delTerm)
at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer)
at Sitecore.Search.IndexUpdateContext.AddDocument(Document document)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddItem(Item item, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Index.Rebuild()
at Sitecore.Shell.Applications.Search.RebuildSearchIndex.RebuildSearchIndexForm.Builder.Build()|Job ended: RebuildSearchIndex (units processed: )

 

Rebuild_Quick_Search_Index_cannot_overide

Solution: The file is corrupted, so just delete the file, in my case “_b.fdt”.

Quick_Search_Indexes_file

.. and rebuild again.

Rebuild_Quick_Search_counting.png

 

Enjoy. ūüôā

[Fixed] RebuildSearchIndex|System.ArgumentException: it doesn’t make sense to have a field that is neither indexed nor stored.

Posted on

Whilst rebuilding the quick search indexes in the control panel, I’ve encountered the issue below:

Job started: RebuildSearchIndex|System.ArgumentException: it doesn’t make sense to have a field that is neither indexed nor stored
at Lucene.Net.Documents.Field..ctor(String name, Boolean internName, String value_Renamed, Store store, Index index, TermVector termVector)
at Sitecore.Search.Crawlers.BaseCrawler.CreateDataField(String name, String value)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddSpecialFields(Document document, Item item)
at Sitecore.Search.Crawlers.DatabaseCrawler.IndexVersion(Item item, Item latestVersion, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddItem(Item item, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Index.Rebuild()
at Sitecore.Shell.Applications.Search.RebuildSearchIndex.RebuildSearchIndexForm.Builder.Build()|Job ended: RebuildSearchIndex (units processed: 39449)

it doesnt make sense to have a field that is neither index.png

Solution:

Find the items with the greater length than 120 and rename those items in Sitecore content editor.

SELECT [ID]
,[Name]
,[TemplateID]
,[MasterID]
,[ParentID]
,[Created]
,[Updated]
FROM [dbo].[Items]
WHERE LEN([NAME]) > 120

Note: 100 is the default MAX item length specified in web.config.

Check_item_name_length_greater_than_120.png

Thanks to this post by Chaturanga ranatunga

Alternatively, if the result is too many, then you might want to increase the value of the setting MaxItemNameLength to 200 in the \Website\web.config instead.

<setting name="MaxTreeDepth" value="20" />
<!-- MAX ITEM NAME
Specifies the maximum length of an item name.
Default value: 100
-->
<setting name="MaxItemNameLength" value="1000" />

Remember: Please do not forget to revert back the value if needed.

#Sitecore Tip: Increase the timeout before installing .update file in UpdateInstallationWizard page.

Posted on Updated on

Lately, I’ve encountered a lot¬†of timeouts¬†while¬†installing an .update package in the¬†UpdateInstallationWizard page, and I hope¬†this post might be helpful for those¬†developers who might ran into this¬†kind of problem as well.

Issue: When you reached the timeout, you would see a sitecore login in the center of the page. And when you logged-in, it would repeat the installation from the start.

Increase_the_timeout_before_installating_.update_file_in_UpdateInstallationWizard

Solution:

In web.config, increase the httpRuntime executionTimeout to 18000 (3 hours)

<httpRuntime maxRequestLength="512000" executionTimeout="18000" enableKernelOutputCache="false" 
 

In web.config, increase the .ASXAUTH timeout to 180 minutes (3 hours), just to give more time.

<forms name=".ASPXAUTH" cookieless="UseCookies" timeout="180" />

In web.config, adjust the sessionState timeout to 180 minutes (3 hours), please don’t forget to revert it back to its¬†default value or from its original value.

<sessionState mode="InProc" cookieless="false" timeout="180" ...

In Sitecore.config

<setting name="Authentication.ClientSessionTimeout" value="180" />

Note: Please don’t forget to revert back the original¬†value¬†after the installation.

Reference:

How does a Sitecore session expire?

[Fixed] RebuildSearchIndex|System.Threading.LockRecursionException: Recursive read lock acquisitions not allowed in this mode.

Posted on Updated on

While rebuilding the Search Indexes.

Issue:

Job started: RebuildSearchIndex|System.Threading.LockRecursionException: Recursive read lock acquisitions not allowed in this mode.
at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
at System.Threading.ReaderWriterLockSlim.TryEnterReadLock(TimeoutTracker timeout)
at System.Threading.ReaderWriterLockSlim.TryEnterReadLock(Int32 millisecondsTimeout)
at Sitecore.Search.IndexUpdateContext..ctor(ILuceneIndex index)
at Sitecore.Search.Index.Rebuild()
at Sitecore.Shell.Applications.Search.RebuildSearchIndex.RebuildSearchIndexForm.Builder.Build()|Job ended: RebuildSearchIndex (units processed: )

Screenshot:

Rebuild_Search_Indexes

Solution:

In the Sitecore.Forms.config, there’s a settings:


<!-- CONNECTION STRING
Sets the name of the connection string
-->
<setting name="WFM.ConnectionString" value="reporting" />

Make sure that it is equivalent in the connectionstring.config WFFM connectionstring.


<add name="reporting" connectionString="Data Source=11.2.3.456,1433;Database=sitecore_analytics;Integrated Security=true" /> 

Working rebuild index.JPG