CDRH / orchid

Rails Engine for site integration with CDRH API
MIT License
3 stars 0 forks source link

Default item's date link broken #75

Closed jduss4 closed 6 years ago

jduss4 commented 6 years ago

By default, orchid ships with certain fields displayed as metadata, including "date_display":

image

However, when you click that link, you get an error:

image

Without looking into it too much, I assume it's because date_display is not a facet listed in facets.rb. We should probably adjust either the metadata displaying or the facet file's information. We also might want to make it so that undescribed facets gracefully fail instead of bringing everything to a dramatic halt.

techgique commented 6 years ago

The error undefined method '[]' for nil:NilClass and the highlighted line makes it look like info isn't defined, so that seems to be the trail of crumbs to follow.

jduss4 commented 6 years ago

Yeah, info is coming from here: <% info = Facets.facet_info[type] %> which is why I kinda suspect that since date_display isn't in the facets.rb file, it's getting upset that it can't find things like the label, etc.

I just got lucky that I clicked that particular metadata field to go back to the search page and found our charming bug :)

jduss4 commented 6 years ago

closed with https://github.com/CDRH/orchid/pull/82