diff --git a/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java b/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java index 0d50c261cad..f625559c9b6 100644 --- a/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java +++ b/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java @@ -141,6 +141,7 @@ import java.text.DateFormat; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; @@ -214,6 +215,15 @@ public boolean wasJustLocked() { } } + /** Properties to remove from the copied template when creating a new sitemap entry. */ + public static final List FILTER_PROPERTIES = Arrays.asList( + new String[] { + CmsPropertyDefinition.PROPERTY_TITLE, + CmsPropertyDefinition.PROPERTY_DESCRIPTION, + CmsPropertyDefinition.PROPERTY_DESCRIPTION_HTML, + CmsPropertyDefinition.PROPERTY_NAVTEXT, + CmsPropertyDefinition.PROPERTY_NAVINFO}); + /** The path of the JSP used to download aliases. */ public static final String ALIAS_DOWNLOAD_PATH = "/system/workplace/commons/download-aliases.jsp"; @@ -1729,7 +1739,20 @@ private CmsClientSitemapEntry createNewEntry(String entryPoint, CmsSitemapChange } List filteredProperties = new ArrayList(); for (CmsProperty property : properties) { - if (!property.getName().equals(CmsPropertyDefinition.PROPERTY_DESCRIPTION)) { + boolean filter = false; + if (FILTER_PROPERTIES.contains(property.getName())) { + filter = true; + + } else { + // filter localized versions also + for (String filterProp : FILTER_PROPERTIES) { + if (property.getName().startsWith(filterProp + "_")) { + filter = true; + break; + } + } + } + if (!filter) { filteredProperties.add(property); } }