We are getting the error once we click on version and the language. This is happening only the first time. The second time I am clicking it is working fine. error is mentioned herewith image Database name is null or empty
.
-
Did you check your logs? Any relevant errors in there? I would also suggest you raise a support ticket directly with Sitecore.– jammykamCommented Sep 12, 2019 at 22:27
-
Thanks, Jammy, It is sitecore issue, We have raised the ticket and got the response– SandeepCommented Sep 19, 2019 at 14:42
Add a comment
|
1 Answer
This happens due to the slow initialization of button states of ExperienceEditor, the gallery button requires the URL query string before opening the menu:
define(["sitecore", "/-/speak/v1/ExperienceEditor/ExperienceEditor.js"], function (Sitecore, ExperienceEditor) {
Sitecore.Commands.OpenSelectLanguageGallery =
{
canExecute: function (context) {
var queryString = "?itemId=" + context.currentContext.itemId +
"&database=" + context.currentContext.database +
"&la=" + context.currentContext.language +
"&vs=" + context.currentContext.version;
context.button.set("galleryUrlQueryString", queryString);
return true;
},
execute: function (context) {
}
};
});
It will throw a "Database name is null or empty" exception if such URL query string wasn't built when the user clicks the Language button.
Probably this issue is unstable and other users might not experience this issue, so I see two solutions here:
- Fix manually
- Reach out to Sitecore Support