adobe / aem-guides-wknd Goto Github PK
View Code? Open in Web Editor NEWTutorial Code companion for Getting Started Developing with AEM Sites WKND Tutorial
License: MIT License
Tutorial Code companion for Getting Started Developing with AEM Sites WKND Tutorial
License: MIT License
No steps to add the resource for vault definition in ui.apps/pom.xml and ui.content/pom.xml. Kindly add the steps to include resource tag in build definition in the documentation
Note: if we change the https to http in .content.xml file inside definition folder. It is working properly. Please update the docs
With #110, the responsive grid was replaced by WKND container (which proxies the Core Components container). However, the Core Components container is not responsive by default (one needs to set layout="responsive"
property). This makes the rest of the containers and components behave erratically when using responsive layouting.
The WKND content currently uses wcm/foundation/components/responsivegrid
. This should be replaced with the Core Component Container:
<root
cq:lastRolledout="{Date}2020-01-09T12:46:59.404-08:00"
cq:lastRolledoutBy="admin"
jcr:mixinTypes="[cq:LiveRelationship]"
jcr:primaryType="nt:unstructured"
- sling:resourceType="wcm/foundation/components/responsivegrid">
+ sling:resourceType="wknd/components/content/container">
This could potentially be a large PR since it requires so many paths to be updated
The ImageList custom component should implement the data layer as an example of how to add the data layer to custom components.
Data schema
A component entry for the overall ImageList component:
image-list-XXXX:
@type: "wknd/components/image-list"
A component entry for each item in the ImageList:
image-list-084fc720c8-image-list-item-4ac450a007:
@type: "wknd/components/image-list/image-list-item"
dc:description: "Learn about our ski touring experience and how it differs from traditional downhill skiing and even
backcountry skiing."
dc:title: "Ski Touring"
parentId: "image-list-XXXX"
xdm:linkURL: "/content/wknd/language-masters/en/magazine/ski-touring.html"
Where the dc:title
, dc:description
, and xdm:linkURL
are derived from the linked page in the list. In addition there is a parentId
that links back to the overall ImageList component.
Events
The cmp:click
event is registered via the data attribute data-cmp-clickable
placed on the anchor tag surrounding the Image and Title for each item in the list.
Best practices outlined by https://github.com/adobe/aem-core-wcm-components/blob/master/DATA_LAYER_INTEGRATION.md and https://experienceleague.adobe.com/docs/experience-manager-learn/sites/integrations/adobe-client-data-layer/data-layer-customize.html should be followed.
URLs should be shortened on production publish to remove /content/wknd
The WKND code base (excluding the tutorial chapters) represents AEM best practices, but it is also used as a demo/reference site. As such it contains a significant amount of authored content that would not be and should not found in source control for a real-world project.
To make it obvious that this is an exception (rather than the rule) a dedicated samplecontent module should be created.
Currently shows as "Deustsch"
/conf/wknd/settings/wcm/templates/< template-name >/structure/jcr:content
Because this value is hard coded in, there isn't the resolution process of etc > libs/settings > apps/settings > conf/settings and therefore, you cannot easily create custom emulators.
Like the html5page template-type, the value should be
This also probably needs to be updated under /content/wknd/jcr:content too.
Looking at the ui.content.sample
, I think there are a few things that are wrong:
/conf/wknd
doesn't define any node type, but is part of filter.xml
ui.content.sample
to ui.content
This leads to following error when trying to install the ui.content.sample
package:
Could not Install Package
"javax.jcr.nodetype.ConstraintViolationException: OakConstraint0001: /conf/wknd[[nt:folder]]: No matching definition found for child node sling:configs with effective type [nt:unstructured, rep:AccessControllable]"
During installation and doing this...
$ cd aem-guides-wknd
$ mvn -PautoInstallPackage clean install
the installation runs but halfway it will have this error:
[INFO] Installing aem-guides-wknd.ui.apps (/Users/macbookname/Documents/projects/src/aem-guides-wknd/ui.apps/target/aem-guides-wknd.ui.apps-0.0.1-SNAPSHOT.zip) to http://localhost:4502/crx/packmgr/service.jsp
[ERROR] Request failed: javax.jcr.RepositoryException: Inaccessible value (500)
[INFO] Looks like the /Users/macbookname/Documents/projects/src/aem-guides-wknd/ui.apps/target/aem-guides-wknd.ui.apps-0.0.1-SNAPSHOT.zip package was not installed, checking the list...
....
the build would fail to this:
INFO] /Users/macbookname/Documents/projects/src/aem-guides-wknd/ui.apps/target/aem-guides-wknd.ui.apps-0.0.1-SNAPSHOT.zip package not installed, re-uploading it...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for aem-guides-wknd 0.0.1-SNAPSHOT:
[INFO]
[INFO] aem-guides-wknd .................................... SUCCESS [ 0.292 s]
[INFO] WKND Site Project - Core ........................... SUCCESS [ 6.924 s]
[INFO] WKND Site Project - UI apps ........................ FAILURE [ 34.308 s]
[INFO] WKND Site Project - UI content ..................... SKIPPED
[INFO] WKND Site Project - Integration Tests Bundles ...... SKIPPED
[INFO] WKND Site Project - Integration Tests Launcher ..... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.093 s
[INFO] Finished at: 2019-08-23T17:21:52+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (install-package) on project aem-guides-wknd.ui.apps: Error while installing package. Check log for details. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :aem-guides-wknd.ui.apps
what can I do to make this work? is this an internal error in dependencies?
I'm using AEM version 6.5 and Maven 3.6.1
The localhost port 4502 is live and I can actually see wknd project showing up under sites, but it empty. Looking at http://localhost:4502/crx/packmgr/index.jsp , only shows one wknd package: wknd-events.download-1.0.2.zip, I believe there should be other two... ui.apps and ui.contents
Steps:
Navigate to any page in WKND --> http://localhost:4502/editor.html/content/wknd/en/restaurants/best-tacos-in-the-city.html
Click on settings and "View as Published"
AEM Version - 6.4.2
AEM Core - 2.4.2
Add several API endpoints for exposing Adventure content fragments and Magazine content fragments that can be consumed as JSON using AEM Content Services.
Storybook’s Component Story Format (CSF) is the recommended way to write stories since Storybook 5.2 and all future tools and infrastructure will be oriented towards CSF as per the documentation.
Hence, update the story format from storiesOf API to CSF.
WKND Reference Site - 0.0.2 - https://github.com/adobe/aem-guides-wknd/releases/tag/aem-guides-wknd-0.0.2 cannot be used on AEM 6.3.3
With ref to this #92 (comment) if AEM 6.4 is required, can we mention somewhere in README. Thanks!
com.day.cq.search,version=[1.3,2) -- Cannot be resolved
com.day.cq.wcm.api,version=[1.27,2) -- Cannot be resolved
org.apache.commons.lang3,version=[3.6,4) -- Cannot be resolved
org.apache.sling.api.resource,version=[2.11,3) -- Cannot be resolved
Hi @godanny86 ,
Could we have the client library high level architecture diagram included in the reference document [1], as available in [2] ?
Cloud Manager supports compiling using Java 11. WKND code base should have this setting turned on by default.
Core Components 2.11.0 introduces support for Accelerated Mobile Pages: https://github.com/adobe/aem-core-wcm-components/tree/master/extensions/amp
WKND should provide some AMP support.
Hello,
I got some errors when compiling the UI and in order to deploy the code, I changed some libs versions:
"aem-clientlib-generator": "^1.4.3", to "aem-clientlib-generator": "^1.7.0",
and
"node-sass": "^4.11.0", to "node-sass": "^4.14.1",
After installing the latest build (#62 ) on legacy and cloud ready quickstarts (seems to work fine in Skyline), page tags are not populating correctly. This impacts the tabs functionality in the /language-masters/en/adventures.html page.
Also, the cq:tags appear in the .content.xml file for the pages, but not in the properties screen in Admin UI.
AEM 6.5, everything else apparently up to date.
I've been trying to build the custom Byline component (though to be perverse, mine is called 'Intro') and I am getting compile errors as shown:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project aem-demos-gl_demo.core: Compilation failure: Compilation failure: [ERROR] /D:/AEM65/src/aem-demos-gl_demo/core/src/main/java/com/gw/aem/demos/gl_demo/core/models/impl/IntroImpl.java:[34,51] package com.adobe.cq.wcm.core.components.models does not exist [ERROR] /D:/AEM65/src/aem-demos-gl_demo/core/src/main/java/com/gw/aem/demos/gl_demo/core/models/impl/IntroImpl.java:[57,17] cannot find symbol [ERROR] symbol: class Image [ERROR] location: class com.gw.aem.demos.gl_demo.core.models.impl.IntroImpl [ERROR] /D:/AEM65/src/aem-demos-gl_demo/core/src/main/java/com/gw/aem/demos/gl_demo/core/models/impl/IntroImpl.java:[98,17] cannot find symbol [ERROR] symbol: class Image [ERROR] location: class com.gw.aem.demos.gl_demo.core.models.impl.IntroImpl [ERROR] /D:/AEM65/src/aem-demos-gl_demo/core/src/main/java/com/gw/aem/demos/gl_demo/core/models/impl/IntroImpl.java:[61,93] cannot find symbol [ERROR] symbol: class Image [ERROR] location: class com.gw.aem.demos.gl_demo.core.models.impl.IntroImpl [ERROR] /D:/AEM65/src/aem-demos-gl_demo/core/src/main/java/com/gw/aem/demos/gl_demo/core/models/impl/IntroImpl.java:[81,19] cannot find symbol [ERROR] symbol: class Image [ERROR] location: class com.gw.aem.demos.gl_demo.core.models.impl.IntroImpl [ERROR] -> [Help 1]
I'm very new to this stuff, but the Eclipse editor seems happy that everything resolves correctly in the IntroImpl.java code:
` package com.gw.aem.demos.gl_demo.core.models.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.annotation.PostConstruct;
import org.apache.commons.lang3.StringUtils;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.models.annotations.DefaultInjectionStrategy;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.injectorspecific.OSGiService;
import org.apache.sling.models.annotations.injectorspecific.Self;
import org.apache.sling.models.annotations.injectorspecific.ValueMapValue;
import org.apache.sling.models.factory.ModelFactory;
import com.gw.aem.demos.gl_demo.core.models.Intro;
import com.adobe.cq.wcm.core.components.models.Image;
@Model(
adaptables = {SlingHttpServletRequest.class},
adapters = {Intro.class},
resourceType = {IntroImpl.RESOURCE_TYPE},
defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL
)
public class IntroImpl implements Intro {
protected static final String RESOURCE_TYPE = "gl_demo/components/content/intro";
etc etc`
The Build Path in Eclipse references core.wcm.components.core-2.7.0.jar in the .m2 repository, so at this point, I'm stumped. Any clues where to start looking? I've run mvn -PautoInstallBundle clean install, and started and stopped the server (why, I have no idea, it won't compile, never mind deploy) all to no avail...
At Adobe, anything that goes open source needs to go through the Open Source Office for approval. Usually, employees fill out a quick and simple form at opensource.corp.adobe.com to kick that process off.
It looks like this repo didn't go through this process. At a minimum, please ensure you have a Adobe-legal-approved license and license headers in place, contribution guidelines that make explicit the signing of Adobe's CLA and Adobe's approved code of conduct.
If the above confuses you, please fill out the form at opensource.corp.adobe.com and we will gladly guide you through this process and ensure everything is ready for the public.
WKND Reference site should try to conform to the latest best practices for SEO, Performance, and Accessibility.
When running a single unit test via the IDE (Eclipse), the test fails with
java.lang.NoClassDefFoundError: org/junit/platform/commons/PreconditionViolationException
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createTest(JUnit5TestLoader.java:90)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.loadTests(JUnit5TestLoader.java:48)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:525)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
Caused by: java.lang.ClassNotFoundException: org.junit.platform.commons.PreconditionViolationException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more
To resolve this, the junit-bom
dep should be updated to version 5.5.2
in the reactor pom.
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.5.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Question:
When using the new AEM Archetype (v23) general/react/angular sources are built into "ui.frontend" folder.
While this project (wknd) is a great resource/refer to build codebases for new projects, the "ui.frontend" in wknd is used for "sass" and this works great.
How can we build a new codebase using both react-app(when built with archetype 23) and sass (file structure as defined in wknd) i.e., AEM + React + SASS ?
Recommend changing
return occupations;
to
import java.util.Arrays;
import java.util.ArrayList;
.
.
.
return new ArrayList<String>(occupations);
in
/core/src/main/java/com/adobe/aem/guides/wknd/core/components/impl/BylineImpl.java
to avoid SonarQube rule: squid:S2384, when deploying via CI/CD in Adobe Cloud Manager
[INFO] --- content-package-maven-plugin:1.0.2:install (install-package) @ aem-guides-wknd.ui.apps ---
[INFO] Installing aem-guides-wknd.ui.apps (C:\SumanWS\aem-guides-wknd\ui.apps\target\aem-guides-wknd.ui.apps-0.0.1-SNAPSHOT.zip) to http://localhost:4502/crx/packmgr/service.jsp
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for aem-guides-wknd 0.0.1-SNAPSHOT:
[INFO]
[INFO] aem-guides-wknd .................................... SUCCESS [ 0.413 s]
[INFO] WKND Sites Project - Core .......................... SUCCESS [ 10.693 s]
[INFO] WKND Sites Project - UI apps ....................... FAILURE [ 23.305 s]
[INFO] WKND Sites Project - UI content .................... SKIPPED
[INFO] WKND Sites Project - Integration Tests Bundles ..... SKIPPED
[INFO] WKND Sites Project - Integration Tests Launcher .... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.079 s
[INFO] Finished at: 2019-12-01T09:55:52-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (install-package) on project aem-guides-wknd.ui.apps: end tag name must be the same as start tag from line 2 (position: TEXT seen ...\r\n\t\ta,\r\n\t\t.fid-blue {\r\n\t\t\tcolor: #0E67A9;\r\n\t\t}\r\n\t</style>\r\n... @155:8) -> [Help 1]
Note: local AEM instance is running and I'm on windows 10. I haven't made any change in pom.xml for aem-guides-wknd.ui.apps application. AEM version is 6.4.0.
I've been following along the WKND tutorial here
The initial steps with creating the byline component without any of the actual logic works, but after I added the Byline class I get
No use provider could resolve identifier com.adobe.aem.guides.wknd.core.components.Byline
I used mvn -PautoInstallPackage -Padobe-public clean install
in the root of my project and
mvn -PautoInstallBundle clean install
in my core folder
I saw someone who was having a similar issue here Re: Error while deploying custom AEM component
But in their case it's saying that it resolves to a package. I do not have that error. Mine just says 'Cannot get DefaultSlingScript'
Here's how I have everything positioned in eclipse
My byline.html code is
<div data-sly-use.byline="com.adobe.aem.guides.wknd.core.components.Byline"
data-sly-use.placeholderTemplate="core/wcm/components/commons/v1/templates.html"
data-sly-test.hasContent="${!byline.empty}"
class="cmp-byline">
<div class="cmp-byline__image"
data-sly-resource="${ '.' @ resourceType = 'core/wcm/components/image/v2/image' }">
</div>
<h2 class="cmp-byline__name">${byline.name}</h2>
<p class="cmp-byline__occupations">${byline.occupations @ join=','}</p>
</div>
<sly data-sly-call="${placeholderTemplate.placeholder @ isEmpty=!hasContent}"></sly>
and my byline .content.xml is
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:description="Displays a contributor's byline."
componentGroup="WKND.Content"
sling:resourceSuperType="core/wcm/components/image/v2/image"
jcr:title="Byline"/>
As a test I've copy and pasted the code from the final WKND code on this repo. I've recompiled all the JSPs. I've Invalidated caches and rebuilt libraries
Is there anything I'm missing? What could possibly cause something like this?
The tutorial and code base should be updated to use the latest released verson of Core Components, which is 2.5.0
Archetype 23 has been released, the reference site should include any enhancements/modifications from the generated project
When I am installing core bundle in osgi below two dependency can not be resolved
com.day.cq.search,version=[1.3,2) -- Cannot be resolved
org.apache.sling.api.resource,version=[2.11,3) -- Cannot be resolved.
Apache Sling API bundle version is 2.16.4
Can anyone suggest something.
When using the new Image List component with the option to Build List Using: Child Pages, the resulting list of pages includes unpublished pages. I would expect that unpublished pages would not be included in the list.
I have successfully installed all modules onto my instance (6.5.3).
But pages cannot render normally as the reference site do.
I can see there are some warnings when rendering this page:
16.02.2020 09:00:20.279 *WARN* [192.168.1.1 [1581814818862] GET /content/wknd/language-masters/en.html HTTP/1.1] org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy Ignoring reference to /conf/wknd/settings from /conf/wknd/settings - Probably misconfigured as it ends with '/settings'
16.02.2020 09:00:20.288 *WARN* [192.168.1.1 [1581814818862] GET /content/wknd/language-masters/en.html HTTP/1.1] org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy Ignoring reference to /conf/wknd/settings from /conf/wknd/settings - Probably misconfigured as it ends with '/settings'
16.02.2020 09:00:20.305 *WARN* [192.168.1.1 [1581814818862] GET /content/wknd/language-masters/en.html HTTP/1.1] org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy Ignoring reference to /conf/wknd/settings from /conf/wknd/settings - Probably misconfigured as it ends with '/settings'
How can I fix the page rendering? Need some help here, thanks!
Regards,
Eason
Currently, in ui.content the merge
mode has been removed for /conf/wknd
and /content/wknd
to ensure consistent deployments. This has an adverse effect on anyone attempting to save features like cloud service configurations and then re-deploying the code base...
In default rewrite rules of dispatcher there is a rule with text:
RewriteCond %{HTTP:X-Forwarded-For} !^$
RewriteCond %{HTTP:X-Forwarded-For} !^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}
RewriteRule .* - [F]
This rule is taking as condition and IPv4, however connection is rejected if is an IPv6.
if an IPV6 is on this header the connection is returned with state 403 and refused.
basic 404 not found page should be used
When using the lazy load feature of AEM Core Components Image component a loading icon should be presented while the image is loading.
Using the maven release plugin, didn't catch all of the dependencies leaving some mismatched:
aem-guides-wknd/ui.content/pom.xml
Line 62 in 1fbe024
Should be
<dependencies>
<dependency>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd.ui.apps</artifactId>
<version>0.0.3-SNAPSHOT</version>
</dependency>
</dependencies>
Actual
<dependencies>
<dependency>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd.ui.apps</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
@godanny86 - if you have a moment, could you please reach out?
Wondering if there is a better way to automate the compilation of htl so that the storybook youve created can use that data output rather than html copied and pasted in which would make it more dynamic.
twitter: @CodeByAlex
website codebyalex.com
or please respond here
Hi,
I downloaded & installed the latest package & source code of WKND (0.0.4) on my local and after npm install on source code & running storybook I keep getting "Uncaught TypeError: Cannot read property 'hasAttribute' of null" error in console and accordion does not work for me.
Anyone else getting the same error?
Thanks,
Kavin Mehta.
The ResourceResolver cannot resolve the request path below (as well as many other similar request paths on the WKND site). Either implement a custom ResourceResolver for the WKND application or implement your resources differently. IMHO it is a Sling paradigm that a request path can be resolved to a resource, in particular if it is a resource.
/content/wknd/us/en/adventures/ski-touring-mont-blanc/jcr%3acontent/root/responsivegrid/carousel/item_1571168419252.coreimg.jpeg/1572285729016.jpeg
WKND should enable the Adobe Client Data Layer by default: https://github.com/adobe/adobe-client-data-layer
https://github.com/adobe/aem-core-wcm-components/blob/master/DATA_LAYER_INTEGRATION.md
WKND reference site should be updated to use 2.10.0 version of AEM Core Components.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.