Answers Final Challenge - Failing joboverride card

Hi Team,

I’m struggling with the Answers final challenge as I keep failing on the “Add custom job card to the Jobs experience” section. I’m really not sure what I’m doing wrong and have looked through other posts on this topic. Changing or not the code of the Job Card after deleting it and creating again, the problem is still the same. Can anyone help with what’s wrong with the joboverride card ?

The code source is as follows:

{{> cards/card_component componentName=‘joboverride’ }}

class joboverrideCardComponent extends BaseCard[‘joboverride’] {
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.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
    // tagLabel: ‘’, // The label of the displayed image
    titleEventOptions: this.addDefaultEventOptions(),
    subtitle: profile.c_department + ’ | ’ + profile.employmentType, // The sub-header text of the card
    details: profile.description, // 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: 500, // 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: ‘Apply Now’, // The CTA’s label
    iconName: ‘briefcase’, // The icon to use for the CTA
    url: ‘http://careers.turtleheadtacos.com’, // 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 template to render
  • @returns {string}
  • @override
    */
    static defaultTemplateName (config) {
    return ‘cards/joboverride’;
    }
    }

ANSWERS.registerTemplate(
‘cards/joboverride’,
{{{stringifyPartial (read ‘cards/joboverride/template’) }}}
);
ANSWERS.registerComponentType(joboverrideCardComponent);

Thanks for your help,
Sylvain

Hi Sylvain,

Welcome to the Community! Looks like you’re really close. The API name of the job department field is c_jobDepartment (not c_department). Once you make that change, you should be good to submit!

Hi Kristy,

Thanks for your reply !

I corrected this mistake but I still cannot complete the challenge.

Actually, even if I don’t change anything for the joboverride card, I get the same error message in the console : The partial cards/joboverride/component could not be found.

Deleting the card, creating again and adding it as a value to cardType in jobs.json always create the same issue, even if I don’t change the subtitle and CTA1 url values.

Best regards,
Sylvain

Hi Kristy,

As my challenge account expired, I had to make it again from scratch.

But still the same issue!

My modified source code is:

subtitle: profile.c_jobDepartment + ’ | ’ + profile.employmentType

url: ‘http://careers.turtleheadtacos.com

Do you see something wrong?

Thanks for your support.

Best regards,
Sylvain

Hi Sylvain,

Apologies for not catching this before your account expired. As you pointed out in your previous message, the issue is actually a missing partial for the forked card, and not something you had missed. I’ve gone ahead and added it to your code repo, so you should not see that error message and your preview works - you may submit at this point.

I’ll look into adding that missing partial so that future Hitchhikers have their repos set up properly! Thanks for your patience as we work through this.

1 Like

Hey @Kristy_Huang ,

I have the exact same situation with my final challenge : “The partial cards/joboverride/component could not be found.
My experience code editor can be found here : https://sandbox.yext.com/s/2591912/sitesgit/editor2/r/59285/b/master?session=466baed1

What is exactly a “missing partial” ? Is this something that can be solved at our level ?

Thanks in advance for your help.

Hi Nicolas,

Apologies as this is something we fixed on our side. All new challenges should be good to go, but you must’ve created your account before that update was pushed! I went ahead and fixed it in your experience.

Two things to note on your jobs experience before you submit:

  • Be sure to change the card type in the jobs.json file to reference the jobsoverride card you created.
  • When setting the joboverride card subtitle, you’ll need to reference fields with profile. prepended to the field API name. For example, profile.c_jobDepartment and profile.employmentType

Hey Kristy,

Thanks for the feedback on that and for the fix!

About the 2 things you are right, thanks for mentioning it:

  • I had switched back the card type to the old value to be able to move forward in the assessment while I had this “bug”.

  • And … good catch, I would have searched a while before realizing that…

Thanks again!!!