Hi team! Back again with a module assessment issue.
The module assessment grader says that I have failed to “Add the facets code to the restaurants.html.hbs file.” However, everything is working as it should in the staging environment as described by the instructions and everything is published.
My hunch is that it might have something to do with the
that uncommented, but I’m not totally sure, it could be anything.
Thanks for posting this question! I took a look at your Restaurants HBS file and everything looks good from what I can see… Would you mind trying to recommit after adding spaces before the ending brackets on your script and markup facets lines?
I took a look and you’re very close. For restaurants and community stories, when adding facets, make sure you don’t forget to comment in the closing div component here:
Additionally, in your communitystories.json file, I am seeing two red lines - these serve to highlight errors. In this case, you have **/ accidentally commented into the code. Make sure to always check for these red lines before committing!
There is a closing div tag on line 37 of the communitystories.html.hbs that is currently commented out in your file. If you comment that in, I think you should be good to go.
It looks like at some point in the editing process, the line of code representing the facet markup was deleted from the hbs file. I added it back in and committed the fix, so you can try submitting again!
Took a look at your account and seeing these issues for the rules you mentions:
Add the facets configuration to the communitystories.json file:
Facets are commented out in the communitystories.json file. You will need to comment them in by removing the /** and **/ around that section. (Make you customize this section to match what the steps say in the assessment instructions)
Add the facets code to the restaurants.html.hbs file
I see that a large chunk of this file was commented out. Here is the section that needs to be modified (and what it should look like). I think your main issue here was that that last div needed to be commented back in
{{!-- Uncomment the following div if you want to include filters, facets, or sort options --}}
<div class="Answers-filtersWrapper js-answersFiltersWrapper CollapsibleFilters-inactive">
</div>
{{!-- {{> templates/vertical-full-page-map/markup/sortoptions }} --}}
{{> templates/vertical-standard/markup/facets }}
{{!-- {{> templates/vertical-full-page-map/markup/filterbox }} --}}
</div>
Add the facets configuration to the communitystories.json file
Similar to the first point, the facets and Filter Link sections need to be commented into the config file. I noticed a comma was missing after “searchOnChange: true” and that expand was set to true.
"componentSettings": {
/**
"QASubmission": {
"entityId": "", // Set the ID of the entity to use for Q&A submissions, must be of entity type "Organization"
"privacyPolicyUrl": "" // The fully qualified URL to the privacy policy
},
**/
"Facets": {
"title": "", // The title to display above the facets
"expand": false, // Allow the user to expand and collapse the facets
"showMore": true, // Display a link to see more facet options within a facet
"showMorelimit": 3,
"searchOnChange": true, // Will automatically run a search as facets are selected or unselected. Set to false to only trigger updates with an Apply button.
// Additional options are available in the documentation
"fields": {
"c_restaurantFeatures": {
"searchable": true,
"searchLabelText": "Search for our features",
"placeholderText": "Search"
}
}
},
"FilterLink": {
"changeFiltersText": "filters", // Text that displays by default
"resetFiltersText": "reset filters", // Text when filters are appliterlined
"clearSearchText": "clear search" // Text when there are no results, conducts an empty search
},
I also extended the expiration of your account so you can work through this. Let me know if you are still running into issues after using these edits!
Excuse the mistype - #3 was where I meant to refer to restaurants.json. That code snippet should resolve the problem. There was nothing glaring in your file but there may have been a very slight syntax issue. When I readded this code snippet into your restaurants.json file, the issue was resolved.
For #2, it looks like that file had lines referencing vertical-standard page layouts from the theme rather than vertical-full-page-map. I do see some of the directions for the assessment references vertical-standard so I will flag this to be updated. Otherwise, I have gone ahead and fixed the code
Feel free to submit the quiz again and it should be good to go