AEM Pattern detector issues

sonalid49327489

24-06-2020

Hi,

 

We are currently upgrading aem 6.3 to 6.5 version. We are clearing the issues mentioned in pattern detector.

 

But errors related to overlay components in pattern detector are not updating even after solving them. The component functionality is working fine as per requirement but imcompatible errors are still showing in pattern detector.

Below is the error pattern

 

/apps/cq/gui/components/common/wcm/clientlibs/wcm by overlaying (shadowing) the JCR path at /libs/cq/gui/components/common/wcm/clientlibs/wcm might be incompatible after update and might need some adaption.

 

Can someone please help me understand why the js errors are showing up even after solving them.

 

Accepted Solutions (1)

Accepted Solutions (1)

Theo_Pendle

MVP

24-06-2020

Hello @sonalid49327489,

Both @berliant and @vanegi are correct in a way. This pattern detector issue is not meant to be understood as "Your whole AEM instance will commit suicide if you overlay /libs/cq/gui/components/common/wcm/clientlibs/wcm" but more like "Watch out, things have changed in /libs/cq/gui/components/common/wcm/clientlibs/wcm and your overlay may cause a conflict or some errors" 😉

Here is a comparison between /libs/cq/gui/components/common/wcm/clientlibs/wcm in 6.3 vs 6.5:

Selection_049.png

 If we look more closely at just one file, eg: copy.js, we see that things have changed a lot!

Selection_050.png

So for example, if your overlay in 6.3 was a copy of copy.js, but you added one line at the end that's a small change in behvaiour. If you carry that overlay into 6.5 though, you now have dozens of changes!

What you should do is examine the diff between the 6.3 and 6.5 versions of every overlay you've made and patch them. In some cases you may find that if your overlay was made as a fix, you might not even need it anymore 🙂

If you have a lot of overlays and it's causing trouble, that's too bad... but going forward perhaps you'd like to read my article on best practices to minimise the impact of patching overlays on AEM upgrades #shamelessplug 😉

Hope that helps!

Answers (2)

Answers (2)

berliant

Employee

24-06-2020

I think it means that you should not overlay wcm clientlibs, which might cause some unexpected effect on OOTB UI, but specify cq.common.wcm within your custom libs as dependencies.

vanegi

Employee

24-06-2020

This seems to be false positive warnings which can be safely ignored. Currently Pattern Detector reports suspicions (warnings) with different codes and an internal ticket [CQ-4284004] has already been filed with R&D to introduce priority/importance level for each suspicion (detected pattern). The priority/importance would help (even for the same metapattern problem code) to highlight which concrete potential issues are more important to fix in the first place and would also help to lower the levels of false positives (those ideally should be scored the lowest so in the end they are analyzed if there is a time for that).