Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I upgraded from 4.11 to 6.2.2. Everything works on my site but I am unable to run the indexer. The Developer section of the backoffice is really slow because it attempts to index every time I go to that section. Whenever I run the Rebuild tool from the Examine dashboard it fails with the error below. I have checked in my database in tables like cmsContent and cmsContentType but see nowhere where this value could be null.
error: The index could not be rebuilt at this time, most likely there is another thread currently writing to the index. Error: System.ArgumentNullException: Value cannot be null.
Parameter name: contentType
at Umbraco.Core.Mandate.That[TException](Boolean condition, Func`1 defer)
at Umbraco.Core.Models.ContentBase..ctor(String name, Int32 parentId, IContentTypeComposition contentType, PropertyCollection properties)
at Umbraco.Core.Models.Content..ctor(String name, Int32 parentId, IContentType contentType, PropertyCollection properties)
at Umbraco.Core.Models.Content..ctor(String name, Int32 parentId, IContentType contentType)
at Umbraco.Core.Persistence.Factories.ContentFactory.BuildEntity(DocumentDto dto)
at Umbraco.Core.Persistence.Repositories.ContentRepository.CreateContentFromDto(DocumentDto dto, Guid versionId)
at Umbraco.Core.Persistence.Repositories.ContentRepository.PerformGet(Int32 id)
at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.Get(TId id)
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Umbraco.Core.Services.EntityXmlSerializer.Serialize(IContentService contentService, IDataTypeService dataTypeService, IContent content, Boolean deep)
at UmbracoExamine.DataServices.UmbracoContentService.GetLatestContentByXPath(String xpath)
at UmbracoExamine.BaseUmbracoIndexer.AddNodesToIndex(String xPath, String type)
at UmbracoExamine.BaseUmbracoIndexer.PerformIndexAll(String type)
at Umbraco.Web.WebServices.ExamineManagementApiController.PostRebuildIndex(String indexerName)
In the examine settings I tried to set supportUnpublished="false" which allowed my InternalIndexer to complete. However, my InternalMemberIndexer still does not index correctly even though it runs to completion
<add name="InternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
Hmmm do you have any media that is null in the content tree?
Thanks for the hint, Charles. In my case, I had almost the exact same error as Jim, except my stack trace referenced the mediaRepository instead of the contentRepository. Sure enough, I found some media in the root of my media tree that had no icon. I clicked it and saw YSODs that said:
Value cannot be null.
Parameter name: contentType.
It looks like sometime in the site's past, the media type associated with these media items was deleted. I am unable to delete these offending media nodes from the umbraco backoffice, so I had to manually delete them with SQL
WHERE nodeId = 3400 OR nodeId = 3512
WHERE id = 3400 OR id = 3512
I ran an additional query to find any other nodes without contentTypes. I found a bunch more, but left them alone because they aren't causing any problems. They are all nodes in the content tree. Looks like umbraco only freaks out if the media lack a contentType.
SELECT TOP 1000 *
FROM umbracoNode n
INNER JOIN cmsContent c
ON c.nodeId = n.id
WHERE c.contentType = 0
No worries mark, a I guy I used to work with had the problem when we were importing media and they became null. When We tried to index we got exceptions. Speaking of SQL I thought the was a script knocking around that would clean any duplications or corrupt nodes.
The one above with almost certainly be a doc type that has been removed or has duplicated fields perhaps or is just null.
Thanks for the SQL, that rocks :). I will try and see if I can find the script it might help as well. Charlie.
This information saved me today - thank you all!
One thing - I had to add an additional first SQL statement for it to run correctly:
WHERE ContentId = 23222
WHERE nodeId = 23222
WHERE id = 23222
Glad it helped :) feel free too high five ;)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted