diff --git a/source/java/org/alfresco/web/bean/DocumentPropertiesBean.java b/source/java/org/alfresco/web/bean/DocumentPropertiesBean.java index dc411c9a51..a51e945004 100644 --- a/source/java/org/alfresco/web/bean/DocumentPropertiesBean.java +++ b/source/java/org/alfresco/web/bean/DocumentPropertiesBean.java @@ -149,7 +149,7 @@ public class DocumentPropertiesBean // extra and deal with the Author prop if the aspect has not been applied yet String author = (String)props.get(ContentModel.PROP_AUTHOR); - if (author != null) + if (author != null && author.length() != 0) { // add aspect if required if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUTHOR) == false) @@ -161,6 +161,16 @@ public class DocumentPropertiesBean // else it will get updated in the later setProperties() call } + // deal with adding the "titled" aspect if required + String title = (String)props.get(ContentModel.PROP_TITLE); + String description = (String)props.get(ContentModel.PROP_DESCRIPTION); + if (title != null || description != null) + { + // add the aspect to be sure it's present + nodeService.addAspect(nodeRef, ContentModel.ASPECT_TITLED, null); + // props will get added later in setProperties() + } + // add the remaining properties Iterator iterProps = props.keySet().iterator(); while (iterProps.hasNext()) diff --git a/source/java/org/alfresco/web/ui/repo/component/property/UIProperty.java b/source/java/org/alfresco/web/ui/repo/component/property/UIProperty.java index 2d93f547db..e1ded72f24 100644 --- a/source/java/org/alfresco/web/ui/repo/component/property/UIProperty.java +++ b/source/java/org/alfresco/web/ui/repo/component/property/UIProperty.java @@ -110,15 +110,14 @@ public class UIProperty extends PropertySheetItem else { if (logger.isDebugEnabled()) - logger.debug("Failed to find property definition for property '" + propertyName + "'"); + logger.debug("Failed to find property definition for property '" + propertyName + "' for node: " + node.getNodeRef().toString()); + // NOTE: removed the error as it simply serves to confuse users and clutter the screen, + // the debugging log level should be used instead when developing property screens. // add an error message as the property is not defined in the data dictionary and // not in the node's set of properties - String msg = MessageFormat.format(Application.getMessage(context, MSG_ERROR_PROPERTY), new Object[] {propertyName}); - Utils.addErrorMessage(msg); - - if (logger.isDebugEnabled()) - logger.debug("Added global error message: " + msg); + //String msg = MessageFormat.format(Application.getMessage(context, MSG_ERROR_PROPERTY), new Object[] {propertyName}); + //Utils.addErrorMessage(msg); } } else diff --git a/source/web/jsp/dialog/edit-document-properties.jsp b/source/web/jsp/dialog/edit-document-properties.jsp index bea10603ba..4119a3964a 100644 --- a/source/web/jsp/dialog/edit-document-properties.jsp +++ b/source/web/jsp/dialog/edit-document-properties.jsp @@ -29,8 +29,7 @@