Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

s7PublishStatus cannot be resolved to a variable in overlayed JSP file

Avatar

Level 4

We have overlayed a jsp file to customize the touchUI, but some of the unaltered code from the overlayed jsp file is throwing an unexpected error:

 

05.09.2024 13:52:40.181 *ERROR* [10.1.204.145 [1725569559794] GET /mnt/overlay/dam/gui/content/assets/jcr:content/views/list.0.html/content/dam/my-dam/photography HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 176 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved to a variable
173: if (showDMPublishCol){
174: //s7 publish status does a s7config lookup for every resource
175: //no need to get s7 publish status if DM publish columns is not to be shown
176: s7PublishStatus = resource.adaptTo(Scene7PublishStatus.class);
177: }
178: if (s7PublishStatus != null) {
179: //should this only be when mode is selective publish


An error occurred at line: 178 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved to a variable
175: //no need to get s7 publish status if DM publish columns is not to be shown
176: s7PublishStatus = resource.adaptTo(Scene7PublishStatus.class);
177: }
178: if (s7PublishStatus != null) {
179: //should this only be when mode is selective publish
180: dmPublishDate = s7PublishStatus.getPublishTimestamp();
181: dmPublishPrincipal = s7PublishStatus.getPublishedBy();


An error occurred at line: 180 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved
177: }
178: if (s7PublishStatus != null) {
179: //should this only be when mode is selective publish
180: dmPublishDate = s7PublishStatus.getPublishTimestamp();
181: dmPublishPrincipal = s7PublishStatus.getPublishedBy();
182: dmPublishPublishedBy = dmPublishPrincipal!=null ? AuthorizableUtil.getFormattedName(resource.getResourceResolver(), dmPublishPrincipal) : "";
183: if (Scene7Constants.PV_S7_PUBLISH_COMPLETE.equals(s7PublishStatus.getPublishAction())){


An error occurred at line: 181 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved
178: if (s7PublishStatus != null) {
179: //should this only be when mode is selective publish
180: dmPublishDate = s7PublishStatus.getPublishTimestamp();
181: dmPublishPrincipal = s7PublishStatus.getPublishedBy();
182: dmPublishPublishedBy = dmPublishPrincipal!=null ? AuthorizableUtil.getFormattedName(resource.getResourceResolver(), dmPublishPrincipal) : "";
183: if (Scene7Constants.PV_S7_PUBLISH_COMPLETE.equals(s7PublishStatus.getPublishAction())){
184: dmPublishIcon = "assetsPublished";


An error occurred at line: 183 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved
180: dmPublishDate = s7PublishStatus.getPublishTimestamp();
181: dmPublishPrincipal = s7PublishStatus.getPublishedBy();
182: dmPublishPublishedBy = dmPublishPrincipal!=null ? AuthorizableUtil.getFormattedName(resource.getResourceResolver(), dmPublishPrincipal) : "";
183: if (Scene7Constants.PV_S7_PUBLISH_COMPLETE.equals(s7PublishStatus.getPublishAction())){
184: dmPublishIcon = "assetsPublished";
185: }
186: else if (dmPublishDate != null ){

 

We do not use scene7 and I am unfamiliar with that aspect of aem, so I am wondering what could be causing this issue. I used this post as a guide when making my overlay and changes to the jsp file: http://experience-aem.blogspot.com/2018/03/aem-6310-show-custom-banners-in-card-list-column-views-to... . Nothing in my custom code is throwing any errors. What could be causing this issue? I have tried forced recompiling the jsp files to no avail.

0 Replies