tobiasherp / mycompany.myproduct Goto Github PK
View Code? Open in Web Editor NEWAn Archetypes-based Plone extension package, with a problem
An Archetypes-based Plone extension package, with a problem
After installaton of MyCompany.MyProduct
in the Quick-Installer, the MyType
type is visible in the portal_types
tool; however, even if added to the types which are allowed for Folder
, they are not offered for addition.
An instance debug
session, using a minimally enhanced develop
version of CMFCore
, branch 2.2
:
>>> root = app.plone # use the id of your Plone instance
>>> from Products.CMFCore.utils import getToolByName
>>> tmp_folder = root.temp
>>> type_name = 'MyType'
>>> types_tool = getToolByName(tmp_folder, 'portal_types')
>>> type_info = types_tool.getTypeInfo(type_name)
>>> type_info
<DynamicViewTypeInformation at /vdz/portal_types/MyType>
>>> new_content_item = type_info._constructInstance(tmp_folder, 'shiny_new_object')
{'check_security': 0,
'container': <ATFolder at /vdz/temp>,
'm': None,
'p': <App.FactoryDispatcher.FactoryDispatcher object at 0x8b760d0>,
'pd': <App.FactoryDispatcher.ProductDispatcher object at 0x32ab050>,
'self': <DynamicViewTypeInformation at /vdz/portal_types/MyType>,
'self_factory': 'addMyType',
'self_product': 'MyCompany.MyProduct'}
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/zope/instances/wnzkb-trunk/src/Products.CMFCore/Products/CMFCore/TypesTool.py", line 551, in _constructInstance
m = self._getFactoryMethod(container, check_security=0)
File "/opt/zope/instances/wnzkb-trunk/src/Products.CMFCore/Products/CMFCore/TypesTool.py", line 467, in _getFactoryMethod
self.getId())
ValueError: Product factory for MyType was invalid
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.