Slice:lookup not returning correctly after upgrade to 4.0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Slice:lookup not returning correctly after upgrade to 4.0

Cory
Hello,

We are in the process of upgrading slice to v4.0 from v3.0 in AEM (we are also upgrading from CQ 5.4 to AEM 6.0) and we are running into an issue where all of the slice lookups return blank and no errors in the log.

In the jsp we have:
<slice:lookup var="band" type="<%=com.core.components.content.layout.LayoutBandComponentModel.class%>" />

<div class="layoutBandWrapper ${band.linkStyle}" style="${band.bandWrapperStyle}">
    <div class="layoutBandContent" style="${band.bandContentStyle}">
    ${band.title}
    ....

Ends up as the following in the HTML:

<slice:lookup var="band" type="class com.core.components.content.layout.LayoutBandComponentModel">
<div class="layoutBandWrapper " style="">
    <div class="layoutBandContent" style="">
    ....
</slice:lookup>

It looks like the slice taglib is not being loaded. In v3 we had reference to <%@taglib prefix="slice" uri="http://cognifide.com/jsp/slice" %> but in v4 I get "The absolute uri: http://cognifide.com/jsp/slice cannot be resolved in either web.xml or the jar files deployed with this application." The documentation stopped mentioning the taglib uri, but it still mentions that the slice tag should be available for use.

I do have the com.cognifide.slice-addon:slice-aem60-assembly installed and the bundle is running.
Reply | Threaded
Open this post in threaded view
|

Re: Slice:lookup not returning correctly after upgrade to 4.0

maciej.majchrzak
Administrator
Hi Cory,

If you are using slice:lookup tag in your JSP you definitely need the taglib definition:
<%@taglib prefix="slice" uri="http://cognifide.com/jsp/slice" %>
I've also updated the documentation to specifically mention this (https://cognifide.atlassian.net/wiki/display/SLICE/Taglibs+-+4.1).

However, the "The absolute uri: http://cognifide.com/jsp/slice cannot be resolved in either web.xml or the jar files deployed with this application." message means that your Slice bundles have not been correctly started on AEM instance. Can you confirm if all Slice bundles are up and running? Slice taglib is provided by slice-core-api bundle. If everything is running correctly, it may be something weird with your AEM instance. I've experienced some issues with taglibs in AEM in the past - you may want to clear your /var/classes node and restart the instance.

Cheers
Maciej