Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Won't Fix
-
14.5.0
-
None
-
Flagged
-
Client Service Team
-
Puma Sprint 264
Description
On the XPages menu, the "Publish (request)" action is not enabled if the workflow hints() call has:
- publishBranch=false
- requestPublication=true
This is due to two else if's instead of just a second if in org.hippoecm.hst.pagecomposer.jaxrs.services.component.XPageContextFactory
if (scheduledRequest == null) { final boolean pageIsUnlocked = StringUtils.isBlank(xPageContext.getLockedBy()); if (hints.containsKey("publishBranch")) { xPageContext.setPublishable(TRUE.equals(hints.get("publishBranch")) && pageIsUnlocked); } *else* if (hints.containsKey("requestPublication")) { xPageContext.setRequestPublication(TRUE.equals(hints.get("requestPublication"))); } if (hints.containsKey("depublishBranch")) { xPageContext.setUnpublishable(TRUE.equals(hints.get("depublishBranch")) && pageIsUnlocked); } *else* if (hints.containsKey("requestDepublication")) { xPageContext.setRequestDepublication(TRUE.equals(hints.get("requestDepublication"))); } }
Similar case with "depublishBranch"/"requestDepublication".
Suggested solution:
Just remove the else!