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

Remove the "_" namespace prefix check hiding Restore button

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 13.4.4, 14.2.2
    • Fix Version/s: 13.4.7, 14.4.0
    • Component/s: None
    • Flagged:
      Flagged
    • Processed by team:
      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

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

              Dates

              Created:
              Updated:
              Resolved: