Use an INNER JOIN on course_page because it really is that important.
Error handling: Does not crash but does not propagate properly.

Should probably write some kind of after-error filter according to
Locomotive JS. Where are you supposed to send the error code (404)?
Shows "user profile" on pages#main -- assumes there is one.

Really need to start thinking about content editing on this page.