1

When I try to make a package from package designer, I am getting this error Could not find configuration node: databases/database[@id='test'].

I may know why this happens, and the reason for that is that my other colleagues that were working on the project, made a database just for test, and it looks like when they made a new environment they copied the entire configuration from that environment to this new one, and now I have a problem, because I do not have a test database on this new environment.

Is there any way that I can delete this configuration beacuse I do not need this database now? Because this is a test database. How to do this?

3 Answers 3

3

You can check test database related configuration from this url:

https://<sitename>/sitecore/admin/showconfig.aspx in your browser.

You can check showconfig file through Content Editor as well :

To view the configuration:

  1. Log in to Sitecore with an administrator account.
  2. Open the Control Panel.
  3. In the Administration section, click Administration Tools.
  4. To see the current configuration, click Show Config.

You have to search for the following string:

<database id="test"

This will allow you to identify which config file the configuration node comes from eg.

<database id="test" ... patch:source="Configuration.File.You.Are.Lookin.For.config">

If you find any configuration related to test database then try to find it in configuration files(.config) under webroot path:

 ....\websitename\App_Config\Include

and delete them.

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Richard Seal
    Commented Apr 12, 2022 at 12:36
1

If you cannot open showconfig.aspx page, you can compare Include folders to identify all files which are not part of the default Sitecore installation or are different from originals.

You can use following applications:

  • WinMerge
  • Total Commander

Get Include folder from fresh Sitecore installation and copy it somewhere on your disk. Get Include folder from your Sitecore instance and copy it to the same folder.

Now using any of the folder diff tools, identify the differences between those two folders. You can search for <database id="test" in those files.

Alternatively you can do a full text search on your Include folder using Total Commander (Alt + F7) and search for <database id="test".

You can either delete the configuration entry or disable the configuration file by changing extension.

Update

It is also possible that the change has been made directly in the Sitecore.config file which is located in App-Config folder. If you cannot find anything inside Include folder, please check entire App_Config folder.

Update 2

As I understand, when you are trying to run a showconfig.aspx you get the exception. In that case you can use a tool to build the effective configuration that Sitecore would have build (eg. https://github.com/Sitecore/Sitecore-Config-Builder or https://github.com/ParTech/ScShowConfig) and then try to search for the problematic database.

4
  • Thank you for this information. I will try to do this
    – Samke11
    Commented Apr 12, 2022 at 12:07
  • @Samke11 Please check my update, technically this change can also be made directly in the Sitecore.config file in App_Config folder on level above the Include Commented Apr 12, 2022 at 12:26
  • I checked the Sitecore.config file and everything else, still I can not find anything related to the database test and I still receive this error from Sitecore, even when I open the page in preview mode. I only need to package the items, but I can not do that with this error
    – Samke11
    Commented Apr 12, 2022 at 13:21
  • @Samke11 I have updated my answer with another approach, but I have another question: does it happen on all of your environments? Where are you searching for the configuration entry? On your codebase (the one that is versioned in git) or in the IIS folder. Commented Apr 13, 2022 at 7:07
1

Anytime you see this error message, generally, something is trying to call a Database that is NOT defined in the Sitecore configuration.

Here are some examples:

  1. If your code is calling Database.GetDatabase("test") and "test" is not configured in Sitecore configuration, you'll get this error.

  2. If in your ConnectionStrings.config, you have a database with an id of test, you'll get this error message on Sitecore startup.

The way to fix this is to search for the database that it's trying to connect to within configuration, code, or items, and remove the reference to the nonexistent database configuration.

OR, add in database configuration to allow test to be a configured Sitecore database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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