When a document title and filename are distinct, there should be a configuration in displays settings of the DM portlet. There should be a way for the site admin to set the "Table View" to either show the document title or the document filename. The fact that a folder cannot be called a filename can be fixed by seperating out the table headers.
Examples of how they are different:
- Filename : Expense_Guidance-Final_02.02.2020.docx
- Title: Expense Guidance for the year 2020/21
Essentially a document title is NOT the filename minus the file extension and can include spaces, slashes, poundsigns and even emjois. Currently it is the filename that is taken to be displayed as the title, which is misleading anyway because the label of the table cell says "Title" and it should say "Filename".
What should be allowed is that the site admin makes the judgement on what is appropriate to display in the DM portlet as the "title". They can then "Configure" the display settings of the portlet accordingly. When the title is blank (because the title should not be a required field), fallback on the filename.
I would even go as far as saying if the title is the title then on hover of the title put a tooltip that contains the filename and that really should be the default behavior. Allowing users this control will satisfy users who want to see filenames listed and users who want to see document titles listed instead.
Defaulting the view back to "Title" rather than "Filename" will also be highly desirable by users and also magically fix the document 404 errors, because the title would then not affect the link.
In 7.0 through 7.3 .... The table header for "title" or "name" should be changed to Filename. User guidance on this infamous caveat should be issued by Liferay to suggest that document titles should not be edited by users due to causing 404 errors and that document titles are a new feature coming in 7.4 and haven't up to this point existed.