open-oni / plugin_featured_content

Random or curated display of pages
0 stars 1 forks source link

Bugfix/no issues #11

Closed jduss4 closed 5 years ago

jduss4 commented 5 years ago

error when page not in database requested in config file filter out pages which weren't found so not displayed at all instead of "Unknown Title" and then add a conditional in template just to make extra sure that the image error won't occur and no bad links displayed

also noticed that if you had 2 pages to display but your limit was 4 error would be thrown because of how random selection being chosen (same error as when the database was not yet populated, therefore 0 pages) moved logic for number of pages returned and made sure that smaller numbers than limit would display the pages regardless changed the "on this day" feature to always use the "limit" num returned instead of returning 100 and then choosing randomly from that set

adds to documentation

closes https://github.com/open-oni/plugin_featured_content/issues/2

jduss4 commented 5 years ago

This seems like it would be a GREAT candidate for unit testing at some point, as it is a bit painful to try to test all the options without issues, with issues, mocking in "this day" etc after I make any changes to the helpers code. I think I might open an issue about it :)