Advanced Answers | Module 4 | Assessment

Hi Team,

I’m currently stuck on this assessment. I have completed all the sets but I can’t seem to get past: Update the Restaurants config file to add Facets component.

Below is what I did for this section. I’m getting a 404 error when I attempt to publish a preview so clearly I’ve done something incorrectly but its not clear where I am going wrong. If someone could point me in the right direction that would be great.

},
“componentSettings”: {

"Facets": {
  "title": "", 
  "expand": false, 
  "showMore": true, 
  "searchOnChange": true, 
  "showMoreLimit": "3",
  
  "fields": {
  "c_restaurantFeatures": {
      "searchable": true,
      "searchLabelText": "Search for our features",
      "placeholderText": "Search"       
  }

}
},

"FilterLink": {
  "changeFiltersText": "filters", 
  "resetFiltersText": "reset filters", 
  "clearSearchText": "clear search"
},

Thanks,
Andy

Hi @Andrew_Hosier

You’re very close! It looks like your issue is with showMoreLimit, which should be set to the number 3 rather than the string “3” in quotes like so:

"showMoreLimit": 3,

That should resolve the issue! Additionally, don’t forget to comment out the corresponding div in your hbs file so close out the filterwrapper correctly.

Let us know if you have any other questions!

Best,
Alyssa

Hi @Alyssa_Hubbard i actually am stuck on the same challenge and step.
For me it shows the error for Update the Restaurants config file to add Facets component only. But looking at your screenshot and @Andrew_Hosier input, I seem to have the same. Can you please check if I am overlooking anything? Thanks a lot!, MaliScreen Shot 2021-01-05 at 8.17.16 PM

Hi @Mali_Kuhns

Happy to help here! Looks like the property is mislabelled. It should be showMoreLimit rather than showMoreFilter

That should resolve but let me know if you have further questions or issues!

Best,
Alyssa

:boom: :boom: :boom: this worked of course. wonderful :slight_smile: thank you.

Hello @Alyssa_Hubbard, I am hitting the same issue:

X Update the Restaurants config file to add Facets component

I believe my code (included below) is correct, can you let me know what I’m missing?
Thank you!

"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"       
  }
    }
},

Spoke with @Carolyn_Gorick and determined that the code just needed to be committed to pass the grading logic.

Best,
Sam

Hi @Alyssa_Hubbard and @Sam_Torres ,

I’m actually running into a similar error and trying to compare my code to the others but I might be missing something. Any recommendations on what might be wrong in my code there?

Hi Eleanora,

Happy to help here. You will want to make sure you have a comma after “true” - the red line under Fields is present for that reason.

“searchOnChange”: true,
“fields”: { … }

Let us know if that doesn’t resolve.

Best,
Alyssa

1 Like

THANK YOU! Knew it was something small.