Plone 5.0.x site title: where's the "truth"

In Plone 5.0.x:

>>> from zope.component.hooks import setSite
>>> site = app.myplone
>>> setSite(site)
>>> v = site.unrestrictedTraverse('plone_portal_state')
>>> v.portal_title()
u'Plone site'
>>> site.Title()
'Glow N Plone'

Why must the registry fight with (contentish/zopeish) site Title()? Which is the truth?

This has frustrating consequences for things like site welcome email. Can this be improved?

Sean

1 Like

I would certainly like to see an answer to this one!

https://speakfearlessly.net/wp-content/uploads/2013/07/you-cant-handle-the-truth-meme-generator-you-want-the-truth-you-can-t-handle-the-truth-9789dd.jpg

I might be able to explain how it came to this confusion.

The DC metadata "Title" used to be implemented by the property "title". Most properties are used for configuration - and apparently, someone wanted to have most simple configuration at a central place: the registry.

title might be viewed both as configuration option as well as content object metadata.

I agree however, that both views should give the same result -- and that "title" should not be maintained in the registry.

1 Like

Is it similar to this issue? https://github.com/plone/Products.CMFPlone/issues/1761

David's comment here mentions the registry vs Zope title property: https://github.com/plone/Products.CMFPlone/issues/1167

Scattered thoughts:

  • In theory, the registry is cleaner and more modern than property sheets interface;
  • In practice, the registry and access to it requires adaptation to get title (either plone_portal_state or registry);
  • We could make TItle / setTitle() accessor/mutators front for the registry;
  • Or we could just keep these in sync with event handlers (but at what risk/cost?).
  • The benefit of moving back to exclusively property sheets does not likely justify amount of effort (grepping my omelette, I get this sense).
  • Picking one place to store is likely better than syncing two places;
  • Site interface ought to still appear contentish (CMF Dublin Core accessor/mutator), even if a facade to various places the "truth" is living for specific fields.

Sean