Ticket #7408 (closed Bug: fixed)
plone.app.i18n.locales.languageselector does not show up in portal_view_customizations tool
| Reported by: | kteague | Owned by: | witsch |
|---|---|---|---|
| Priority: | minor | Milestone: | 3.0.4 |
| Component: | Infrastructure | Keywords: | |
| Cc: | hannosch |
Description
The plone.app.customerize.templateViewRegistrations function decides what is available in the view customizations tool.
This can be fixed by changing the name of the class to end with the word 'Viewlet'. Although that could break existing add-ons and customizations. One could check for 'IViewlet.implementedBy(factory)' although maybe that brings in unwanted Viewlets? Or perhaps add a special case just for the LanguageSelector? Or finally 'fix it right' as suggested by the TODO ...
# TODO: this should really be dealt with using # a marker interface on the view factory
Change History
comment:3 in reply to: ↑ description Changed 4 years ago by witsch
Replying to kteague:
This can be fixed by changing the name of the class to end with the word 'Viewlet'. Although that could break existing add-ons and customizations.
that would just be a (imho bad) workaround.
One could check for 'IViewlet.implementedBy(factory)' although maybe that brings in unwanted Viewlets?
nope, it doesn't — the diff of the registration info before and after r18327 is
-
regs
434 434 {'customized': None, 435 435 'for': 'zope.interface.Interface', 436 'type': 'plone.app.layout.viewlets.interfaces.IPortalTop', 437 'viewname': u'plone.app.i18n.locales.languageselector', 438 'zcmlfile': 'plone.app.i18n.locales.browser/configure.zcml', 439 'zptfile': 'plone.app.i18n.locales.browser/languageselector.pt'}, 440 {'customized': None, 441 'for': 'zope.interface.Interface', 436 442 'type': 'plone.app.layout.viewlets.interfaces.IBelowContentBody', 437 443 'viewname': u'plone.belowcontentbody.workflowhistory',
so it only adds the language selector, but then again more missing viewlets would have been most welcome, of course... :)
Or finally 'fix it right' as suggested by the TODO ...
yes, it really should be done like this, but that has to wait a little longer. for 3.0.4 the quick fix from r18327 will have to do...
many thanks for reporting & also the hints on how to fix it, though. much appreciated! :)

Assigning to Mr. Customerize :)