Expand my Community achievements bar.

SOLVED

Upgrade to 6.1 from 6.0

Avatar

Level 3

Hey ,  

 Has any one migrated to AEM 6.1 from 6.0 . and faced any issues or challenges with sightly code ?  

 I'm currently migrating my code developed on 6 .0  Classic with site live. When i migrate the code and content to 6.1 the whole layout of the site seems disturbed ( in classic mode ) . When I remove couple of sightly calls using data-sly-resource , layout seems to be becoming better , not fully functional though. . 

Any pointers on known issues with migrations or any directions to approach this greatly appreciated .

Regards

1 Accepted Solution

Avatar

Correct answer by
Employee

I have just done the same, but didn't really face issues in this area.

Do you see any errors in the logs on the component that you include, perhaps the issues are in there.

Is this happening on author or publish?

View solution in original post

7 Replies

Avatar

Correct answer by
Employee

I have just done the same, but didn't really face issues in this area.

Do you see any errors in the logs on the component that you include, perhaps the issues are in there.

Is this happening on author or publish?

Avatar

Level 10

Can you show couple of screenshots and the sightly code used by them ? that would help us to get the issue

Avatar

Level 3

Didn't notice any specific errors related to component in logs . . Will try to re run through logs . It's in author instance ,classic mode. 

Avatar

Level 1

Feike Visser wrote...

I have just done the same, but didn't really face issues in this area.

Do you see any errors in the logs on the component that you include, perhaps the issues are in there.

Is this happening on author or publish?

 

`i`ve the same problem

Avatar

Level 3

SO a sample code of navigation which we had used is like below ,

<nav class="Primary-navigation" role="navigation" aria-label="Primary navigation">             <div class="Nav-wrapper " data-sly-use.topNav="topNav" > <ul class="Nav-main-menu" role="menubar" aria-hidden="false" data-sly-list.page="${topNav.rootPage.listChildren}"> <sly data-sly-test.navParent="${topNav.navParentForCurrentPage}" data-sly-unwrap></sly> <sly data-sly-test.activeClass="${navParent.path == page.path ? 'active' : ''}" data-sly-unwrap></sly> <li role="menuitem" class="${activeClass}" data-sly-test="${!page.hideInNav}"> <div data-sly-call="${title.navTitle @ page=page}" data-sly-unwrap></div> </li> </ul>

 </div>

</nav>

 

 

Please note that TopNav is  a java class which extends WcmUse .

In the error logs , i can see the folowing ,

org.apache.sling.scripting.sightly.impl.engine.extension.use.UseRuntimeExtension No use provider could resolve identifier topNav

I have noticed in release notes that WcmUse class is depreceated with WcmUsePOjO , but still is supported .  So i assume it shouldn't be a problem . This code perfectly works fine in AEm 6.0 but doesn't render any in AEM 6.1 .  I have also cleaned sightly classes in /var  but doesn't change any , Any pointers ?

Avatar

Employee

it would be great if you can share a small example...

Avatar

Level 3

So I managed to get a workaround for this issue . 

I renamed my Sightly Java Class from TopNav to "NavUtil" and updated references in html file to use "NavUtil" instead of "TopNav" .  

Not sure why but some of the already defined sightly java classes work and which didn't started to work as normal after renaming and updating references . 

I tried to restart all sightly related bundles from felix to see the sightly engine might reinitialize and pick up classes correctly but didn't work . 

Any known issues around it ? Any ideas to get around this with out need to rename sightly classes  ?

 

 

 

 

Updated Html 

 

  

<nav class="Primary-navigation" role="navigation" aria-label="Primary navigation"> <div class="Nav-wrapper " data-sly-use.topNav="NavUtil" > <ul class="Nav-main-menu" role="menubar" aria-hidden="false" data-sly-list.page="${topNav.rootPage.listChildren}"> <sly data-sly-test.navParent="${topNav.navParentForCurrentPage}" data-sly-unwrap></sly> <sly data-sly-test.activeClass="${navParent.path == page.path ? 'active' : ''}" data-sly-unwrap></sly> <li role="menuitem" class="${activeClass}" data-sly-test="${!page.hideInNav}"> <div data-sly-call="${title.navTitle @ page=page}" data-sly-unwrap></div> </li> </ul>