2

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.

enter image description here

2
  • Did you check your logs? Any relevant errors in there? I would also suggest you raise a support ticket directly with Sitecore.
    – jammykam
    Commented Sep 12, 2019 at 22:27
  • Thanks, Jammy, It is sitecore issue, We have raised the ticket and got the response
    – Sandeep
    Commented Sep 19, 2019 at 14:42

1 Answer 1

0

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:

  1. Fix manually
  2. Reach out to Sitecore Support

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.