4

I am getting the following error when opening the content editor or loading my site:

Server Error in '/' Application.

Value cannot be null.
Parameter name: fieldNameTranslator

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.ArgumentNullException: Value cannot be null.
Parameter name: fieldNameTranslator

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.

I've referred to Value cannot be null[...]. but have everything mentioned in that already in place. We regenerated the schema.xml for all our cores as well.

Also looked at Getting error on Content Editor after upgrading to Sitecore 8 but that did not help either.

Solr is running fine, but for some reason, I'm not able to rebuild my indexes, it throws the following error:

ERROR One or more exceptions occurred while processing the subscribers to the 'indexing:end' event.
Exception[1]: System.InvalidOperationException 
Message[1]: search index summary 
Source[1]: Sitecore.ContentSearch 
at Sitecore.ContentSearch.Events.IndexingEventHandler.UpdateIndexTimestampDirectHandler(Object sender, EventArgs args) 
at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result) 
3

I had the same issue on my local instance and also when setting up one of our staging environments.

On my local instance, I was using a normal Solr Server. To fix the issue on my local instance, I had to recreate the different solr cores as they were corrupted.

On the staging server, we were using solr cloud. The issue was due to the wrong setup of a solr server within a cluster.

Since you have just upgraded the Sitecore instance to 8.2, note that the global.asax should inherits the Sitecore.Web.Application.

Additionally, if the issue still persists, please see the checklist below.

  1. Make sure that the Sitecore.ContentSearch.SolrProvider.dll has been updated.

  2. Make sure that the Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config has been updated and enabled.

  3. Re-creates the solr cores since it may have been corrupted as there has been some changes in the way the cores get rebuild.

  4. Make sure that the custom indexes that you have are properly updated.

  5. If you are using Solr Cloud, make sure that all the solr instances are up and running and that the load balancer is able to connect to each of them.

Note that if you have Sitecore Patch Sitecore.Support.405677 and z.Sitecore.Support.449298, those needs to be removed.

| improve this answer | |
  • Hi, Thanks for the answer. That helped alot and resolved that error. But now we are getting a casting error in solr. Unable to cast object of type 'System.DateTime' to type 'System.String' when we try to get the data from solr indexes. Any idea about this? – user1345 Aug 24 '17 at 19:29
  • You may need to re-generate your Schema.xml from Sitecore Control Panel – Hishaam Namooya Aug 24 '17 at 19:31
  • We did that, but does not help, and also the regenerated schema and the current schema is exactly the same, just that we have a few extra fields. – user1345 Aug 24 '17 at 19:32
1

After a lot of searching and debugging I finally found that I misnamed a couple of my solr indexes.

The SolrSearchIndex fieldNameTranslator field gets set within the Initialize() method like so:

this.fieldNameTranslator = (AbstractFieldNameTranslator) new SolrFieldNameTranslator(this);

However, should an exception occur during the initialization process, a log entry will be made with the text "Unable to connect to [{0}], Core: [{1}]" and a flag will be set. A couple lines down, a check will be made for the flag. If that flag is set because of an exception, the initialize function will return out never setting the fieldNameTranslator field.

When you open up the experience editor, a Linq to Solr query is made using the sitecore social index (among a few other things. This is where it failed for me). A null check will thus be made at that point for the fieldNameTranslator and throw the following exception should that field not be set.

| improve this answer | |
1

This is an old question but the answer for me was as simple as restarting the solr service - note that it took about 3 or 4 restarts for the content editor to start working again.

| improve this answer | |
0

I got this fixed by -

  1. Recreating the solr indexes as my indexes got corrupted. You should also check if the solr indexes exist. If the indexes dont exist, create your solr indexes before you run the code to look for data in it.

  2. Rebuilding the indexes to make sure data is indexed in the solr

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.