Byline cannot be resolved to a type using WKND tutorial

Avatar

Avatar

matth39107775

Avatar

matth39107775

matth39107775

03-09-2019

I've been following along the WKND tutorial here

5 - Custom Component

The initial steps with creating the byline component without any of the actual logic works, but after I added the Byline class I get

Screen Shot 2019-09-03 at 5.12.52 PM.png

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

Screen Shot 2019-09-03 at 5.14.16 PM.png

Screen Shot 2019-09-03 at 5.14.29 PM.png

And 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>

Is there anything I'm missing? What could possibly cause something like this?

View Entire Topic

Avatar

Avatar

ritiks71366454

Avatar

ritiks71366454

ritiks71366454

09-01-2020

I had the same error for WKND tutorial.

Open the terminal or command line. Go to the aem-guides-wknd directory. Run 

mvn -PautoInstallPackage -Padobe-public clean install

 

It worked for me.