This is related to HTML filtering now being managed by the configuration registry but some critical fields not "getting" into the registry after the upgrade.
Just noting this here for others (and my future self). It seems that HTML filitering is now managed via the configuration registry.
See the code that defines the IFilterSchema below:
The upgrade steps to Plone 5.1rc1 don't currently "activate" the 'valid_tags' or 'custom_attributes' fields, from the IFilterSchema, in the configuration registry.
For now, my workaround was to manually import an .xml file which brings in all of the IFilterSchema.
Now when I visit {mysite}/@@filter-controlpanel it works and, more importantly, my news items are no longer breaking due to missing IFilterSchema records.
I'm running into a broken build due to object indexing problems on 5.1 latest.
By pinning Products.CMFCore back to 2.2.11 instead of 2.2.12 our build does pass.
I don't have a small reproducible test case though. I suspect that the zope.proxy based implementation in Products.CMFCore.indexing is somehow different in practice.
Just noting that I was not able to reproduce the issue on a second website. On the second site the error presents itself when the new software has been activated through buildout but BEFORE upgrade steps have been run (thankfully we test upgrades on a copy of the live site). This means we probably can't do an in-place upgrade by running bin/buildout as there will be a "window" of time where the site has the new software but the upgrade steps have not been activated.