You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2018/12/15 04:35:34 UTC
[sling-org-apache-sling-app-cms] branch master updated: Fixing
SLING-8177
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
The following commit(s) were added to refs/heads/master by this push:
new 963bed4 Fixing SLING-8177
963bed4 is described below
commit 963bed47f85080736cb4a076ecf9e85c890af5d6
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Dec 14 23:35:29 2018 -0500
Fixing SLING-8177
Adding a check to make sure the config subnode is not a sling:Folder
---
.../editor/scripts/componentConfigOptions.jsp | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/componentConfigOptions.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/componentConfigOptions.jsp
index cfe5c00..26b7d3e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/componentConfigOptions.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/componentConfigOptions.jsp
@@ -19,15 +19,15 @@
<%@include file="/libs/sling-cms/global.jsp"%>
<option value="">Select Component</option>
<c:forEach var="component" items="${sling:findResources(resourceResolver,'SELECT * FROM [sling:Component] WHERE [componentType] IS NOT NULL','JCR-SQL2')}">
- <c:if test="${sling:getRelativeResource(component,'config') != null}">
- <c:choose>
- <c:when test="${fn:startsWith(component.path,'/apps/')}">
- <c:set var="rt" value="${fn:substringAfter(component.path,'/apps/')}" />
- </c:when>
- <c:otherwise>
- <c:set var="rt" value="${fn:substringAfter(component.path,'/libs/')}" />
- </c:otherwise>
- </c:choose>
- <option value="${rt}" ${rt == editProperties.type ? 'selected' : ''} data-config="${component.path}/config.html"><sling:encode value="${component.valueMap['jcr:title']}" mode="HTML" /></option>
- </c:if>
+ <c:if test="${sling:getRelativeResource(component,'config') != null && sling:getRelativeResource(component,'config').resourceType != 'sling:Folder'}">
+ <c:choose>
+ <c:when test="${fn:startsWith(component.path,'/apps/')}">
+ <c:set var="rt" value="${fn:substringAfter(component.path,'/apps/')}" />
+ </c:when>
+ <c:otherwise>
+ <c:set var="rt" value="${fn:substringAfter(component.path,'/libs/')}" />
+ </c:otherwise>
+ </c:choose>
+ <option value="${rt}" ${rt == editProperties.type ? 'selected' : ''} data-config="${component.path}/config.html"><sling:encode value="${component.valueMap['jcr:title']}" mode="HTML" /></option>
+ </c:if>
</c:forEach>
\ No newline at end of file