Skip to content

Commit

Permalink
Revert "Remove unused content_icon and content_meta_type properties f…
Browse files Browse the repository at this point in the history
…rom FTI."

This reverts commit da5b2f5.

I looked at `plone.app.contenttypes` for comparison, but those are Dexterity FTIs, and here we have an old-style FTI.
When I locally added `icon_expr` in here, I actually got an error while adding a Plone Site:

```
ValueError: http://localhost:8080/@@plone-addsite
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 391, in publish_module
  Module ZPublisher.WSGIPublisher, line 285, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module Products.CMFPlone.browser.admin, line 299, in __call__
  Module Products.CMFPlone.factory, line 165, in addPloneSite
  Module Products.GenericSetup.tool, line 393, in runAllImportStepsFromProfile
   - __traceback_info__: profile-Products.CMFPlone:plone
  Module Products.GenericSetup.tool, line 1513, in _runImportStepsFromContext
  Module Products.GenericSetup.tool, line 1360, in _doRunHandler
  Module Products.CMFPlone.setuphandlers, line 139, in importFinalSteps
  Module Products.GenericSetup.tool, line 393, in runAllImportStepsFromProfile
   - __traceback_info__: profile-Products.CMFPlone:dependencies
  Module Products.GenericSetup.tool, line 1504, in _runImportStepsFromContext
  Module Products.GenericSetup.tool, line 1316, in _doRunImportStep
   - __traceback_info__: typeinfo
  Module Products.CMFCore.exportimport.typeinfo, line 222, in importTypesTool
  Module Products.GenericSetup.utils, line 926, in importObjects
   - __traceback_info__: portal_types
  Module Products.GenericSetup.utils, line 922, in importObjects
   - __traceback_info__: types/Discussion_Item
  Module Products.GenericSetup.utils, line 525, in _importBody
  Module Products.CMFCore.exportimport.typeinfo, line 61, in _importNode
  Module Products.GenericSetup.utils, line 757, in _initProperties
ValueError: undefined property 'content_icon'
```

So let's keep the old-style properties, although I am not sure they are actually used anywhere in current Plone.
  • Loading branch information
mauritsvanrees committed Aug 19, 2024
1 parent a8f000d commit 95d5399
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
i18n:translate=""
>Discussion Items are documents which reply to other content.
They should *not* be addable through the standard 'folder_factories' interface.</property>
<property name="content_icon">string:${portal_url}/discussionitem_icon.png</property>
<property name="content_meta_type">Discussion Item</property>
<property name="product" />
<property name="factory">plone.Comment</property>
<property name="immediate_view" />
Expand Down

0 comments on commit 95d5399

Please sign in to comment.