"No Thumbs in Summary Views" breaks Summary Views in Plone 5.x

I've noticed but never taken the time to really investigate that on all of my recent Plone sites (across multiple instances of 5.0.4 through 5.2.1), if you select Summary View from the Display menu, you get this error:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 338, in publish_module
  Module ZPublisher.WSGIPublisher, line 256, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 62, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 88, in __call__
  Module z3c.pt.pagetemplate, line 173, in render
  Module chameleon.zpt.template, line 306, in render
  Module chameleon.template, line 209, in render
  Module chameleon.utils, line 75, in raise_with_traceback
  Module chameleon.template, line 187, in render
  Module 36a72a371908ee19b708556385e5d1ca.py, line 617, in render
  Module db6b4485765c0b0f4a135668e3f381aa.py, line 683, in render_master
  Module db6b4485765c0b0f4a135668e3f381aa.py, line 1239, in render_content
  Module 36a72a371908ee19b708556385e5d1ca.py, line 607, in __fill_content_core
  Module 36a72a371908ee19b708556385e5d1ca.py, line 378, in render_content_core
  Module 22f9d2e451f1cc4e49d1ad57934c73da.py, line 113, in render_content_core
  Module 22f9d2e451f1cc4e49d1ad57934c73da.py, line 426, in render_listing
  Module 36a72a371908ee19b708556385e5d1ca.py, line 356, in __fill_entries
  Module 22f9d2e451f1cc4e49d1ad57934c73da.py, line 751, in render_entries
  Module 36a72a371908ee19b708556385e5d1ca.py, line 174, in __fill_entry
TypeError: must be str, not NoneType

 - Expression: "tem_type_class python:('contenttype-' + view.normalizeString(item_type)) if sh"
 - Filename:   ... .egg/plone/app/contenttypes/browser/templates/listing.pt
 - Location:   (line 48: col 17)
 - Source:     ... tem_type_class python:('contenttype-' + view.normalizeString(item_type)) if sh ...
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "batch"
 - Filename:   ... .egg/plone/app/contenttypes/browser/templates/listing.pt
 - Location:   (line 28: col 30)
 - Source:     <tal:listing condition="batch">
                                       ^^^^^
 - Expression: "context/@@listing_view/macros/content-core"
 - Filename:   ... ne/app/contenttypes/browser/templates/listing_summary.pt
 - Location:   (line 13: col 24)
 - Source:     ... use-macro="context/@@listing_view/macros/content-core">
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "provider:plone.abovecontentbody"
 - Filename:   ... egg/Products/CMFPlone/browser/templates/main_template.pt
 - Location:   (line 94: col 70)
 - Source:     ... 
                                     ^
 - Expression: "context/@@main_template/macros/master"
 - Filename:   ... ne/app/contenttypes/browser/templates/listing_summary.pt
 - Location:   (line 6: col 21)
 - Source:     ... tal:use-macro="context/@@main_template/macros/master"
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  template: <ViewPageTemplateFile - at 0x7ff303148d30>
               options: {...} (0)
               args: <tuple - at 0x7ff338e21048>
               nothing: <NoneType - at 0x88e860>
               modules: <_SecureModuleImporter - at 0x7ff326b0c198>
               request: <WSGIRequest - at 0x7ff3027cff98>
               view: <SimpleViewClass from /opt/plone/buildout-cache/eggs/plone.app.contenttypes-2.1.5-py3.6.egg/plone/app/contenttypes/browser/templates/listing_summary.pt summary_view at 0x7ff302ef3240>
               context: <ImplicitAcquisitionWrapper TestSite2 at 0x7ff3025af120>
               views: <ViewMapper - at 0x7ff3027cff60>
               here: <ImplicitAcquisitionWrapper TestSite2 at 0x7ff3025af120>
               container: <ImplicitAcquisitionWrapper TestSite2 at 0x7ff3025af120>
               root: <ImplicitAcquisitionWrapper  at 0x7ff30298c048>
               traverse_subpath: <list - at 0x7ff302c8f4c8>
               user: <ImplicitAcquisitionWrapper - at 0x7ff302315438>
               default: <object - at 0x7ff338e1ca90>
               repeat: {...} (0)
               loop: {...} (1)
               wrapped_repeat: <SafeMapping - at 0x7ff3029a5748>
               target_language: <NoneType - at 0x88e860>
               translate: <function translate at 0x7ff3021a6488>
               macroname: master

I decided to look into it today, and created a new site from scratch to see if the error existed there, and it did not. I then began customizing the site to see what introduced the error. It turns out that if you check Site Setup > Site > No Thumbs in Summary Views, that immediately starts happening. Unchecking the box gets rid of the issue.

Of course, knowing that I can just not check the box, but it seemed worth documenting in case someone else runs into it.

Plone Foundation Code of Conduct