Hey there,
I am trying to go through this Answer Final Challenge and admit being totally lost …
At the end of step 15., I was unable to preview (white page with only /static visible) but I still tried to move forward to step 22 : I have a 404 error when trying to open staging URL.
Is this better to restart from the beginning or maybe this is just a detail that I have missed ?
My sand box : https://sandbox.yext.com/s/2504742/sites/
Thanks in advance if you have any idea.
Best,
Nicolas
1 Like
Hi! I am seeing the same error - the I see a 404 page when I click my staging URL.
I’m experiencing the same issue, I haven’t been able to see a preview for the entire challenge! @Nicolas_S did you ever find a fix?
No sorry, I wasn’t able to try again or restart the challenge, and I guess now my sandbox is not valid anymore.
Hi all,
Sorry we missed this. In the future, please tag any challenge questions under the “Challenge Troubleshooting & Discussion” category (Challenge Troubleshooting & Discussion - Hitchhikers).
@Nicolas_S if you revisit the challenge once your account has expired, you can click “Start Challenge” to start with a fresh account.
@Matt_Malone After you click “Create Preview”, it looks like your site is going to the directory page like this:
This means that we weren’t able to compile the output files for you to show you something valid to preview which should be your first hint that there is something wrong with your code. The best thing to do is to open the console in the code editor (Tools > Console). In order to trigger a full build-log that you can review, you can make a trivial change, like add a space at the end of a line and then click update preview.
In your case, here’s the error I see:
Specifically, it looks like in your joboverride card you have:
subtitle: profile.c_jobDepartment + '|' + field profile.c_department, // The sub-header text of the card
The “field” part is invalid and breaking the javascript. If you remove this, you should be able to create your preview.
(One other, unrelated hint - it looks like you have '|'
and not ' | '
– you are missing the space on each side of the divider).
Thanks!
Liz
1 Like
Hi Liz,
I’ve encountered this same issue. I was able to successfully save all of my changes in the Search Configuration after some troubleshooting, but working in the Code Editor I have not yet been able to produce any sort of live preview. I tried the Console trick you mentioned above but still can’t seem to identify the specific code error that’s throwing me off.
I compared the code in my Jobs experience to the code in my Answers experience, and the only notable difference I’ve been able to identify so far is that my Jobs and FAQs config files in the Jobs experience include an extra line of code at the bottom:
universalSectionTemplate": “standard”.
Removing this didn’t seem to fix the problem so I added it back. Any advice you have would be greatly appreciated! My sandbox ID is 2529009.
Hi Isabelle,
It looks like you have an invalid experience key in your jobs experience. When I look at your live preview, the search bar is not getting intialized, which tells me that there is a core issue with the interaction with the SDK. If I inspect the page, you’ll see this:
Typically, when I see the “TypeError: Cannot read property ‘includes’ of undefined” I look at the config/global_config.json file to make sure that everything is set properly. This is when I noticed the experience_key set does not match the key in the Search Configuration.
If you navigate to your global_config.json
file and update the experience_key to “jobs_answers” it should start working!
Hope that helps!
Hi Liz,
Thank you so much! Ironically, I finally stumbled across this error this morning and that did resolve the issue.