mitodl / ocw-hugo-themes

A Hugo theme for building OCW websites
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Don't create empty resource lists #800

Open pdpinch opened 2 years ago

pdpinch commented 2 years ago

Steps to Reproduce

See https://ocw.mit.edu/courses/15-433-investments-spring-2003/resources/readings/

Expected Behavior

If the page doesn't have any content, it should be a 404.

Actual Behavior

The page exists.

Related Issues

Wassaf-Shahzad commented 2 years ago

@pdpinch In my opinion. We should not throw a 404 since the URL is correct, the server processed the query correctly and its just that there are no resources against the filter for learning type "readings". Since this is a list page and not a detail page for resources, Showing the user that currently no resources of this type exist is the correct way to go.

Reference Link

https://stackoverflow.com/questions/53142088/how-to-make-hugo-server-use-custom-404-html

I believe we can redirect to a 404 if you think that is correct.

pdpinch commented 2 years ago

Ok. Let me discuss this some more with other folks. I don't have a clear idea of where we are going with these resource pages.