Dieses Blog durchsuchen

Sonntag, 8. Dezember 2013

Sitecore 6: Problem rebuiling Crawler Index

Problem:

Job started: RebuildSearchIndex|System.Threading.LockRecursionException:
   Recursive read lock acquisitions not allowed in this mode.
   at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(Int32 millisecondsTimeout)
   at System.Threading.ReaderWriterLockSlim.TryEnterReadLock(Int32 millisecondsTimeout)
   at Sitecore.Search.IndexDeleteContext..ctor(ILuceneIndex index)
   at Sitecore.Search.Crawlers.DatabaseCrawler.DeleteVersion(Item version)
   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.Index.Rebuild()
   at Sitecore.Shell.Applications.Search.RebuildSearchIndex.RebuildSearchIndexForm.Builder.Build()|Job ended: RebuildSearchIndex (units processed: 214)
 

Solution:

Well in my case I just did a stupid mistake. We were trying to delete a Version of an Item that does not exist. So check you Code / Config where you are running custom Code for the Search / Crawling adn Indexing. May you doing stuff with Items that you may not should do.

How to delete more than one item in Sitecore Content tree?


Learning from mistakes

Last time I did an Import of 113 Items in the wrong location below the Home item. Quite bad.
Hmm what should I do now. Clicking more 200 time delete and confim with ok?
No never there must be a better solution. When TYPO3 can do bulk delete an creating pages than Sitecore CMS must have this function somewhere. But no way. There is no function in Content Editor or Page editor for that.

Ask Google

So I googled for bulk and multi delete keywords with the "Sitecore" prefix, but no really usefull result I found. This sound after the most promissing:

http://www.sitecore.net/Community/Technical-Blogs/Trevor-Campbell/Posts/2013/02/28-Days-of-Sitecore-Rocks-Intro.aspx

  • Sitecore Explorer: View the content tree for multiple websites and multiple databases; delete, edit, or drag and drop multiple items simultaneously. 

That sound exatly what I was looking for. Sadly I need to install Sitecore rocks for a thing whitch should be there for evey editor. Dear Sitecore please implement a bulk delete, edit and create function for various Items. And yes they did. In Sitecore 7 you can bulk delete Item Buckets. But only in bucket Items.

Solution:

  1. Install Sitecore Rocks for Visual Studio 2012/2012/2013. 
  2. Connect to you Site. http://vsplugins.sitecore.net/default.aspx
  3. Go to Sitecore Explorer and do the prefered location.
  4. Multi select the Items with Shift of CTL key. Choose delete control in Context Menu with right mouseclick.
Sitecore Explorer in Sitecore Rocks. Choose the right DB an go to your preferred location.

Mittwoch, 13. November 2013

sitecore one or more files could not be uploaded

Problem:


Recently I struggeled uploading files into sitecore media libary.



Possible Solutions:


  1. Try different Browsers. I switched to IE9, it works.
  2. Update Sitecore. Put the latest version on the server.
  3. Check Permission on the Media folder. Check the at leas "Sitecore Client Users" shoud have full access. Also file permission of the "Upload" folder in website root could be a problem.
  4. Change setting in web.config or settings.config 
<setting name="Upload.Classic" value="true" />
5. Check max file size in web.config
<setting name="Media.MaxSizeInDatabase" value="15MB" />

6. Check time out in web.config
<httpRuntime maxRequestLength=”16384″ executionTimeout=”600″ />


Mittwoch, 23. Oktober 2013

Sitecore 7 Troubleshooting: Index was not found

Solution:

1. Delete Solr Config File in App_Config/Include
2. In my Case in Settings.config this was missing
<setting name="IC.IndexName" value="sitecore_master_index" />


Server Error in '/' Application.

Index  was not found

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.ArgumentException: Index  was not found

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:


[ArgumentException: Index  was not found]
   Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name) +473
   Website.Logic.Search.ItemSelector.get_Index() +83
   Website.Logic.Search.ItemSelector.GetResults(Expression`1 predicate, String sort, Boolean reverse, Int32 start, Int32 count, Boolean neglectPermissions) +6460
   Website.Logic.Search.ItemSelector.GetItems(BaseSearchParameter param, String sort, Boolean reverse, Int32 start, Int32 count) +4373
   Portlets.SearchListPortlet.Page_Load(Object sender, EventArgs e) +4671
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178



Donnerstag, 10. Oktober 2013

Sitecore 7: Troubleshooting: Sitecore has no necessary permissions for reading/creating counters.

Problem:

Sitecore is running very slow and log file showing up this error. Sitecore has no necessary permissions for reading/creating counters.

Solution:

Check installation guide and add IIS AppPool User enough rights.

4.2.1  File System Permissions for Anonymous Requests

Certain types of browser requests (generally for directory lookups and static resources) are executed
with the permissions of the anonymous Internet user account. This account requires Read
permissions to all files, folders, and subfolders under the /Website folder.
The following table contains the default name for this account in different versions of IIS:
IIS version  Default anonymous Internet user account name
7 and 7.5  IUSR
If IIS is configured not to use the default IUSR account for processing anonymous requests or
Anonymous authentication is not enabled for the web site, the aforementioned permissions should be
granted to the corresponding account(s).

4.2.2  File System Permissions for ASP.NET Requests

Requests for ASP.NET resources and all the .NET code running within the application is executed
with the permissions of the account configured as an identity for the web site’s application pool. This
account requires Modify permissions to all files, folders, and subfolders under the /Website and
/Data folders.
The following table contains the default account used for processing ASP.NET requests in different
versions of IIS:
IIS version  Default ASP.NET account name
7  NETWORK SERVICE
7.5  AppPoolIdentity
IIS 6 and later versions allow changing the user account used for processing ASP.NET requests.
If you choose a different user account for processing ASP.NET requests, you must grant this account
the aforementioned permissions.
Note
For more information about application pool identities and specifically about assigning rights to the
AppPoolIdentity account, refer to the following article: http://learn.iis.net/page.aspx/624/applicationpool-identities/

4.2.3  File System Permissions for System Folders

To be able to load .NET runtime and ASP.NET resources used for processing the ASP.NET requests,
the worker process hosting the Sitecore CMS application requires access to multiple system files and
folders that are not distributed as a part of the Sitecore CMS but installed as a part of Windows OS
and .NET framework.
Most of these permissions are granted by IIS to all ASP.NET applications automatically making the
application pool identity account a member of the IIS_IUSRS security group.

Happy fixing.

Sitecore 7: Troubleshooting: LDAP/AD: non-existing provider referenced by the “providername”

Problem:
I have installed the official LDAP / AD sitecore package. Now you need to make some changes in the web.config to make it running.
Well this error appears in my case with a non proper LDAP/AD configuration in the Web.config file.

Solution:


In my case the provider tag “ad” was missing in the role Manager section.
   1: <switchingProviders>

   2:      <membership>

   3:        <provider providerName="sql" storeFullNames="true" wildcard="%" domains="*"/>

   4:        <!-- LDAP1 -->

   5:        <provider providerName="ad" storeFullNames="false" wildcard="*" domains="ad" />

   6:      </membership>

   7:      <roleManager>

   8:        <provider providerName="sql" storeFullNames="true" wildcard="%" domains="*"/>

   9:        <!-- LDAP1 -->

  10:        <provider providerName="ad" storeFullNames="false" wildcard="*" domains="ad" />

  11:      </roleManager>

  12:      <profile>

  13:        <provider providerName="ad" storeFullNames="false" wildcard="*" domains="ad" />

  14:        <provider providerName="sql" storeFullNames="true" wildcard="%" domains="*"/>

  15:      </profile>

  16:    </switchingProviders>



Also add tis here after the closing membership tag.


   1: <roleManager defaultProvider="sitecore" enabled="true">

   2:       <providers>

   3:         <clear/>

   4:         <add name="sitecore" type="Sitecore.Security.SitecoreRoleProvider, Sitecore.Kernel" realProviderName="switcher" raiseEvents="true"/>

   5:         <add name="sql" type="System.Web.Security.SqlRoleProvider" connectionStringName="core" applicationName="sitecore"/>        

   6:         <!-- LDAP -->

   7:         <add name="switcher" type="Sitecore.Security.SwitchingRoleProvider, Sitecore.Kernel" applicationName="sitecore" mappings="switchingProviders/roleManager" />

   8:  

   9:         <add name="ad"

  10:             type="LightLDAP.SitecoreADRoleProvider"

  11:             connectionStringName="ldapConn"

  12:             applicationName="sitecore"

  13:             username="<username>"

  14:             password="<password>"

  15:             attributeMapUsername="sAMAccountName" />

  16:         <!-- LDAP -->

  17:         

  18:       </providers>

  19:     </roleManager>

Dienstag, 1. Oktober 2013

Sitecore Training: Official Questions from the Certification for Sitecore 6 in London

Here are 3 official questions. I will not provide answers. It a training for you. ;-)

1. How is it possible to include a Sublayout on a Layout?
  Statically bind the Sublayout control directly on the Layout.
  Both of the other answers are correct.
  Dynamically bind the Sublayout control with a Placeholder on the Layout.



2. Sitecore supports which model for developing in Visual Studio 2010 in the .NET 4.0 Framework?
  ASP.NET Web Application
  ASP.NET Web Site (Razor)
  ASP.NET Web Site

3. The Service Description data template contains a Sales Territories field of type Droptree. What is the best way of displaying the Title field of the items selected in the Sales Territories field?
   1: DroptreeField droptreeField = currentItem.Fields["Sales Territory"];

   2: em salesTerritoryItem = droptreeField.InnerField.Item;

   3: Text = salesTerritoryItem["Title"]; 

   4:  

   5:  

   6: ValueLookupField valueLookupField = currentItem.Fields["Sales Territory"];

   7: em salesTerritoryItem = valueLookupField.InnerField.Item;

   8: Text = salesTerritoryItem["Title"]; 

   9:  

  10:  

  11: ReferenceField referenceField = currentItem.Fields["Sales Territory"];

  12: Text = referenceField.TargetItem["Title"]; 

Donnerstag, 26. September 2013

Sitecore 7: Troubleshooting: startIndex cannot be larger than length of string.

Problem:

I stepped i to this error while creating a Package in sitecore. I selected only a big subtree of Database items and no files.

Server Error in '/' Application.

startIndex cannot be larger than length of string.
Parameter name: startIndex

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.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex

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:


[ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex]
   System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   System.String.Substring(Int32 startIndex) +19
   Sitecore.Install.Items.ItemFieldsProperties.GetFieldsProperties(Item item) +432
   Sitecore.Install.Items.ItemToEntryConverter.InternalConvert(Item item, IProcessingContext context)
   Sitecore.Install.Framework.BaseConverter`1.Convert(T entry, IProcessingContext context) +69
   Sitecore.Install.Framework.InternalSink.Put(T entry) +97
   Sitecore.Install.Items.ItemSource.RecursivePopulate(Item item, ISink`1 sink) +104
   Sitecore.Install.Items.ItemSource.RecursivePopulate(Item item, ISink`1 sink) +499
   Sitecore.Install.Items.ItemSource.RecursivePopulate(Item item, ISink`1 sink) +499
   Sitecore.Install.Items.ItemSource.RecursivePopulate(Item item, ISink`1 sink) +499
   Sitecore.Install.Framework.BaseSource`1.Populate(ISink`1 sink) +705
   Sitecore.Install.Framework.SourceCollection`1.Populate(ISink`1 sink) +166
   Sitecore.Install.Utils.EntrySorter.Populate(ISink`1 sink) +87
   Sitecore.Shell.Applications.Install.Dialogs.AddStaticItemSourceDialog.EndWizard() +770




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

WORK AROUND:

If I choose a tree with many subitems so may the start index gets too large.  My solution was to choose smaller tree parts. Anyway a nicer message should appear in Sitecore 6.6 update 6 version.

Feedback Sitecore Support:

Hello,
I’m still unable to reproduce the issue at my side even with large database.
So it looks like something specific to your solution.
I suggest you to divide your data into several packages.
If you require deeper investigation, please upload your entire master database at our pubic FTP.

Note:

Always use firefox browser while installing or creating items from "package" or "serialization" because Internet Explorer gets time-out issue while installing a big package. 



Sitecore Training: Round-Robin Questions and Review for Module 2

Here are the very basic Sitecore questions with answers:

1. What is an item?
An item is an addressable unit of content.


2. How are an item’s fields defined? In other words, what defines an item?
Data templates define items with fields and field types.


3. What are the advantages of template inheritance?
The advantages of template inheritance are numerous: developers create complex content types by
inheriting from base data templates; standardized fields across data templates lets developers easily
create presentation components; and allows business users see normalized field names and field
types for content they create and edit. In addition, if not overridden, template standard values are
inherited, allowing developers to easily describe default values for fields as well as define default
settings such as insert options and layout details.


4. What is the name of the data template that ALL data templates inherit from?
Standard Template


5. Where are default values set?
Template Standard Values known also as the __Standard Values item.


6. Give an example of when you would use a default value?
There are two type of default values: Dynamic and Static. Dynamic values are tokens, like $name,
$date, and $id. This values are defined when an item is created (when the object has been
instantiated). Static values are hard coded, such as a default value for database field. A good
example for when to use a dynamic default value (like $name) is when you want to capture the item
name into a given field such as a Menu Title field. For a checkbox field named Required, a good
default value might be 1, which means checked.


7. What are Insert Options?
Insert options allow business users to create child items. There are three types of insert options:
data templates, branch templates or command templates. It is possible to override the behaviour
defined insert options using Insert Rules and/or the modifying the <uiGetMasters  pipeline.


8. What’s a best practice for defining insert options?
As a best practice, developers should define insert options on the __Standard Values item of the
given data template.

Montag, 15. Juli 2013

Sitecore Licence file and how to avoid unpleasant screens.

 
I recently surfed on the sitecore.net website in the area of the Sitecore partners.
Then stepped over a official Sitecore Partner named deenacx.  I went on their website and found this:
http://www.deenax.com



 

Solution

Their licence expired. To find the expiration date go the Sitecore data folder. Open the licence.xml and search for "expiration".
 
   1: <expiration>20140610T120000</expiration>

Mittwoch, 3. Juli 2013

Sitecore 7: Troubleshooting "Duplicate site definition: autohaus"

Intro:

After installing Sitecore 7 with the demo autohaus I started to separate the CS project in single folders.
Now I have the 3 Autohaus.* projects, a solution folder with the .sln file. A html folder for the clickdummy. Deployment targetfolder. Misc for miscellaneous, and 2 standard framework I need for my work.


Problem:

Now i was heading to this error. Well my local domain is autohaus/


Duplicate site definition: autohaus.
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: Duplicate site definition: autohaus.

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: 




Solution:

I commented to following out from WWW.Autohaus.config file.


<!-- commented out
           <site name="autohaus" patch:before="*[@name='website']" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/autohaus" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
          -->

OK backend is up and running but not autohaus in the frontend. To get autohaus as default I copy the string above, removed  patch:before="*[@name='website']" and renamed name="autohaus" to name="website"

e.g.

<site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/Autohaus" database="master" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />


Now it works. Happy

This solution is mit the best. Better is to Check the App_config/include Folder for right config and Check for the duplicate entry. See
WWW.Autohaus.debug.config
Or
WWW.Autohaus.local.config

Donnerstag, 20. Juni 2013

What does it need to build a successful implementation on Sitecore?

I will just make a short list after my experience.

From a managing point of view:

- a good PM who have budget and time under control
- i recomend a tracking tool like jiira, mantis,....
- good communication skills to customer
- a change request process
- if possible an agile PM like SCRUM or PRINCE2
- ask the customer about KPI and try to meet them if they are usefull
....

From a more technical point of view


- CI for sitecore with teamcity or jenkins (who else know good software for that?)
- code quality ckecks like sonar or fx cop (who else know good software for that?)
- coding guileline and some checks for it
- unit testing you code part with a complexity of > 4
- a proper dev environment
- SVN or some version control system shoulb be obvious
- do not use XSLT
- i proper system archtecture.
- knowledge about sitecore security. (do not put the sitecore folder on PROD publisher)
- knowledge of workflows, states and action if customer needing it
- check HTML click dummy for SEO (only one H1 element, meta tags,...)
- sitecore wants ONLY ONE form element.
- tell the designer that ID attribut in html tags are tabu for him!
- prepare customer that content editor is not running in EVERY browser
- think about performance. It not usefull to store more that 200 items under a item
- use inheritance an Helper classes to generate media URL, Urls, get pathes of Items,...
- think about proper authorization concept with roles and publishing right
- a must in every project is the taxonomy and the fallback module inj case you run a multilingal page!!
- a good Information architecute (IA). We use a as we call it a portlet system, like CQ5 uses container for a big variety of different content types. E.g. a text,image,video, form portlet where authors can easily create small content parts and build up their page. For me a very simple and nice IA. IA is a serious and important part! And you can provide more portlets if needed to fight again stagnation.

There is much much more to say, but there are the basics.

Discussion


  1. Deployment is a bit a pain. Haven't found a nice solution yet. And no TDS is not nice.
  2. Interesting discussion about XSLT. Many try to avoid it... http://stackoverflow.com/questions/6905228/sitecore-presentation-not-using-xslt-renderings-at-all

Mittwoch, 22. Mai 2013

The Quick-Start Guide to Sitecore DMS Success

Sitecore’s Digital Marketing System (DMS) is a highly-sophisticated, feature rich marketing tool that can be a bit daunting to get up and running. This 44 page ebook was created to help marketing personnel get the mission-critical marketing features of DMS set up quickly without having to be a developer or Sitecore super-user.

The ebook includes how to set up the primary marketing features in DMS with lots of visuals, helpful tips and links to online video tutorials. Each implementation step can be done in bite-sized pieces that should take 30 minutes or less. All you’ll need is basic familiarity with the Sitecore editing interfaces.

http://www.awareweb.com/WebServices/TechnologyDevelopment/Sitecore/DMS-eBook.aspx?goback=%2Egde_74507_member_42582222%2Eamf_74507_17020601%2Egmp_71381%2Egde_71381_member_240831844