-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.6
-
Fix Version/s: 5.7.3
-
Component/s: Publishing
-
Tags:
When extending the Domain doctype, the publication feature doesn't work correctly because of a hard-coded reference to the "Domain" doctype in the PublishActionsBean:
nuxeo-platform-publisher-web > AbstractPublishActions.java
protected void getPathFragments(DocumentModel documentModel, List<String> pathFragments) throws ClientException { String pathElementName = documentModel.getTitle(); String translatedPathElement = resourcesAccessor.getMessages().get( pathElementName); pathFragments.add(translatedPathElement); if ("Domain".equals(documentModel.getType())) { return; } DocumentModel parentDocument; if (documentManager.hasPermission(documentModel.getParentRef(), SecurityConstants.READ)) { parentDocument = documentManager.getDocument(documentModel.getParentRef()); getPathFragments(parentDocument, pathFragments); } }
This results in getting error pages at various places because of infinite loops.
Suggested fix: Replace the hard-coded test with a more generic
if (documentModel.getPathAsString().indexOf("/", 1) == -1) { return; }
I will submit the patch as a pull request.
- is duplicated by
-
NXP-10919 Publication service assume that Ancestor tree contains a Domain doc type
- Resolved