The object type 'cms.document' is missing the provider type configuration.

Antony V asked on July 22, 2017 04:13

We have several projects outside the CMS proper that use Kentico API: The MVC web app, a utilities console app, and a shared library used by all the others. I've just upgraded all the projects to Kentico 10.0.28 from Kentico 9.0.43. The CMS and the web app are working. However the utilities console app is throwing an exception on a call to DocumentHelper.GetDocuments() with the following message: "The object type 'cms.document' is missing the provider type configuration.".

The strange thing is that the same method, which is housed inside the shared library, is invoked with no issues by the MVC app. I've confirmed that the package versions of KenticoLibraries and KenticoLibraries.Dependencies are the same across the board: 10.0.28. Ideas?

UPDATE: I tried calling DocumentHelper.GetDocuments() directly from the console app, bypassing the shared library, just to have one less variable in the mix. The result was the same exception.

UPDATE 2: The generic version of GetDocuments<>() also fails, but GetDocument(int documentId, TreeProvider tree) works.

Correct Answer

Antony V answered on July 26, 2017 02:56

Turns out I was missing a call to CMSApplication.Init(). In v9 API, this was not required on a call to DocumentHelper.GetDocuments(). The exception message could have been more helpful, but in all fairness this was in the documentation that Brenden linked to, which clued me in. Thank you.

3 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on July 24, 2017 15:26

Sounds like you are missing an updated driver perhaps? Check on the Utilities console app, and see if it copies the drivers locally (the properties panel in Visual Studio when you select the driver on the content tree), if this is the case it may be still referencing an old driver. Otherwise verify it's pointing to the updated V10 kentico drivers, try cleaning the solution, and also check the files themselves and see if there is any driver that is being used over the proper one.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 25, 2017 15:08

Have you reviewed the documentation for using the libraries externally? Have you updated the NuGet package in your project to use v10 or the "Kentico.Libraries.Web.UI" package? In v9 it was simply called "Kentico.Libraries"

2 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 26, 2017 02:59

If you're not going to give me the vote for the correct answer, then at least vote up the answer that prompted you to review your code again and realized your code was incorrect.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.