Module 13 - helparticle card & data mappings apparently failing?

Hello!
Would someone be able to assist me in passing the final check of Module Assessment 13? →
“Add a new helparticle card and update the data mappings”"

I am apparently failing this, but as far as I can see in my preview, all the changes through the challenge look like they are correctly reflected.

My component.js file looks like the following:
{{> cards/card_component componentName=‘helparticle’ }}

class helparticleCardComponent extends BaseCard['helparticle'] {
  constructor(config = {}, systemConfig = {}) {
    super(config, systemConfig);
  }

  /**
   * This returns an object that will be called `card`
   * in the template. Put all mapping logic here.
   *
   * @param profile profile of the entity in the card
   */
  dataForRender(profile) {
    return {
      title: profile.name, // The header text of the card
      url: profile.website || profile.landingPageUrl, // If the card title is a clickable link, set URL here
      target: '_top', // If the title's URL should open in a new tab, etc.
      // image: '', // The URL of the image to display on the card
      // altText: '', // The alternate text for the image
      titleEventOptions: this.addDefaultEventOptions(),
      subtitle: Formatter.joinList(profile.keywords), // The sub-header text of the card
      details: profile.s_snippet, // The text in the body of the card
      // If the card's details are longer than a certain character count, you can truncate the
      // text. A toggle will be supplied that can show or hide the truncated text.
      showMoreDetails: {
        showMoreLimit: 750, // Character count limit
        showMoreText: 'Show more', // Label when toggle will show truncated text
        showLessText: 'Show less' // Label when toggle will hide truncated text
      },
      // The primary CTA of the card
      CTA1: {
        label: profile.c_primaryCTA ? profile.c_primaryCTA.label : null, // The CTA's label
        iconName: 'chevron', // The icon to use for the CTA
        url: Formatter.generateCTAFieldTypeLink(profile.c_primaryCTA), // The URL a user will be directed to when clicking
        target: '_top', // Where the new URL will be opened
        eventType: 'CTA_CLICK', // Type of Analytics event fired when clicking the CTA
        eventOptions: this.addDefaultEventOptions(),
        // ariaLabel: '', // Accessible text providing a descriptive label for the CTA
      },
      // The secondary CTA of the card
      CTA2: {
        label: profile.c_secondaryCTA ? profile.c_secondaryCTA.label : null,
        iconName: 'chevron',
        url: Formatter.generateCTAFieldTypeLink(profile.c_secondaryCTA),
        target: '_top',
        eventType: 'CTA_CLICK',
        eventOptions: this.addDefaultEventOptions(),
        // ariaLabel: '',
      }
    };
  }

  /**
   * The template to render
   * @returns {string}
   * @override
   */
  static defaultTemplateName (config) {
    return 'cards/helparticle';
  }
}

ANSWERS.registerTemplate(
  'cards/helparticle',
  {{{stringifyPartial (read 'cards/helparticle/template') }}}
);
ANSWERS.registerComponentType(helparticleCardComponent);

Any assistance would be greatly appreciated!

Many thanks,
Arisa

Hi Arisa,

Can you try to submit your challenge again? It looks your code is correct and like you’re passing all the rules. Please let me know if you’re still having issues.

Hi @Kristy_Huang ,
thanks for taking a look!

I tried resubmitting, but I still am getting the same Report Card error. I even tried re-publishing and resubmitting again, but still no change. Would you have any other ideas I could try?

My account link btw: https://sandbox.yext.com/s/2606715/entities
Please let me know if you think I should submit a ticket instead!

Also side-question: would you know if there is any way to extend the challenge expiry date? I initially thought that opening the challenge would restart the 5 day counter, but I guess not, and given it’s a relatively heavy challenge, it would be great not to have to start from scratch in 3 days… Took a sweeping look through HH but couldn’t find any mention of restarting the counter, so not too hopeful…

PS… I also tried copy pasting and submitting the helparticle component.js from the next module assessment to see if that would go through, but that did not work either. I’ve since reverted it back to the code pasted at the start of this thread :slight_smile:

Hi Arisa,

The Hitchhikers team can extend the challenge expiration date for you. We check the expiration when we get these challenge troubleshooting questions, but feel free to reach out as well. I’ve extended the expiration for this challenge for you.

As for why the challenge is not passing, I think there’s an extra space on your subtitle line (see below), so it doesn’t match our grading rules. Your code is currently correct, but it is also good practice to delete unnecessary whitespace if it doesn’t help with readability. Let me know if you’re still having trouble submitting after you delete that extra space.

subtitle:  profile.keywords,
1 Like

Hi Kristy,

That did the trick, thank you so much! I thought I double checked the spaces, but looks like I will need to triple check in the future :wink:

Many thanks,’
Arisa