Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14038

Remove the "_" namespace prefix check hiding Restore button

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 13.4.4, 14.2.2
    • 13.4.7, 14.4.0
    • None
    • Flagged
    • Client Service Team

    Description

      `In org.hippoecm.frontend.plugins.reviewedactions.VersionWorkflowPlugin there's a check on presence of an underscore in the project's namespace prefix to hide the Restore-button.

      The check is there since Sept 2009, see https://code.onehippo.org/cms-enterprise/brxm/commit/eeaf997980afc11c3377f49695cc7c72a63b92a5#ca0919cf645df88811d382656a480273dc308c24 stating "disable restore action when version cannot be restored".

      However, a restore action does work on 13 and 14 for this case (already tested it out using my_project14.2.2.zip that has my_project namespace prefix).

      For reference, code is this

      public boolean isVisible() {
          Node frozenNode;
          try {
              frozenNode = ((WorkflowDescriptorModel) getDefaultModel()).getNode();
              String primaryType = frozenNode.getProperty(JcrConstants.JCR_FROZEN_PRIMARY_TYPE).getString();
              String prefix = primaryType.substring(0, primaryType.indexOf(':'));
              if (prefix.contains("_")) {
                  return false;
              }
          } catch (RepositoryException e) {
               log.warn("Could not determine whether to enable restore button", e);
           }
       return true;
      }
      

      Let's remove the check.

      Attachments

        Activity

          People

            clientserviceteam Client Service Team
            jhoffman Jeroen Hoffman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: