Resolving Could not find configuration node for Core Database Error – Sitecore 8.2

Resolving Could not find configuration node for Core Database Error – Sitecore 8.2

Web.config file is minimal when you initially create ASP.NET project. When you install Sitecore, the config file is already in the web root folder and we don’t want to override it when publishing it first time. It is best to delete Web.config from your project.

The error below is likely to be caused by the Web.config file being replaced. The fix is to copy the Web.config from the original Sitecore installation into the web root folder.

Error

Could not find configuration node: databases/database[@id='core']
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: Could not find configuration node: databases/database[@id='core']

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: 

[InvalidOperationException: Could not find configuration node: databases/database[@id='core']]
   Sitecore.Configuration.DefaultFactory.GetConfigNode(String xpath, Boolean assert) +500
   Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert) +273
   Sitecore.Configuration.DefaultFactory.GetDatabase(String name, Boolean assert) +177
   Sitecore.Configuration.DefaultFactory.GetDatabase(String name) +55
   Sitecore.DefaultClient.get_CoreDatabase() +23
   Sitecore.Web.Authentication.DefaultTicketManager.GetTicketByKey(String ticketKey) +22
   Sitecore.Web.Authentication.DefaultTicketManager.GetTicket(String ticketId, Boolean returnExpired) +59
   Sitecore.Web.Authentication.DefaultTicketManager.IsTicketValid(String ticketId) +49
   Sitecore.DefaultPage.Page_Load(Object sender, EventArgs e) +96
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785

Front-End
TypeScript: type aliases to check type equality

This post is to analyse how the type equality check by using type aliases proposed by Matt Pocock in his twitter post. These type aliases allow us to elegantly express type equality checks in unit tests. All we need to do is to pass the output and expected types in …

Front-End
Fixing it.only type error in Jest

If you are getting a type error with it.only in Jest, it could be due to incorrect TypeScript typings or incompatible versions of Jest and TypeScript. To resolve this issue, you can try the following steps: Make sure you have the latest versions of Jest and its TypeScript typings installed …

Front-End
yup conditional validation example

Here’s an example of a Yup validation logic where the first input field is optional but, if filled, it must contain only alphabetic characters, and the second input field is required: import * as Yup from “yup”; const validationSchema = Yup.object().shape({ firstField: Yup.string().matches(/^[A-Za-z]*$/, { message: “First field must contain only …