Please use clean and non-bootstrap themes to test this issue.
Add file resource to a course
Go to file index page (/mod/resource/index.php) and make sure the page contains resource name in h2.
Visit the setting for activity within the course and admin, make sure the 'Display page name' option is not available.
view the page and make sure it has:
course name as h1
resource name as h2
Browse around the resource activity and make sure there's no error occur.