Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Test we.retail with AEM in nosamplecontent mode #89

Closed
keepthebyte opened this issue Mar 17, 2016 · 3 comments
Closed

Test we.retail with AEM in nosamplecontent mode #89

keepthebyte opened this issue Mar 17, 2016 · 3 comments

Comments

@keepthebyte
Copy link
Member

We should also test the we.retail code that it runs in an AEM instance in nosamplecontent runmode (https://docs.adobe.com/docs/en/aem/6-1/deploy/configuring/configure-runmodes.html#Using%20samplecontent%20and%20nosamplecontent )

A quick test shows - that the we.retail homepage throws an exception.

GET /content/we-retail/language-masters/en.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getPath" of null (/apps/we-retail/components/content/product-grid/item/item.js#88)

@raducotescu
Copy link
Member

The error you mentioned does not relate to the nosamplecontent run mode. However I've discovered that in nosamplecontent run mode the jQuery version that We.Retail provides cannot be correctly minified by YUI 2.4.8, shipped with AEM 6.2. This is caused by yui/yuicompressor#234.

The solution that I found for now is to downgrade jQuery to 1.12.4, which doesn't use ECMAScript 5+ features.

@justinedelson
Copy link
Contributor

@raducotescu the YUI issue was supposed to be fixed by #103. any thoughts why that didn't work and downgrading was necessary?

@raducotescu
Copy link
Member

The problem was caused by the base client library [1], which embeds jQuery. It seems that embedded client libraries are concatenated in a writer and only then minified. We can either live with the jQuery downgrade (I didn't notice any issues regarding how components render) or try to apply the GCC processor for all We.Retail client libraries. However I think that the downgrade is the simplest way to move forward.

[1] - https://github.com/Adobe-Marketing-Cloud/aem-sample-we-retail/blob/master/ui.apps/src/main/content/jcr_root/etc/designs/we-retail/clientlib-base/.content.xml

raducotescu added a commit that referenced this issue Jul 19, 2016
* downgraded jQuery to 1.12.4 which can correctly be minified by YUI 2.4.8 when nosamplecontent
run mode is used with AEM 6.2


Former-commit-id: 09416d2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants