plone / plone.app.contenttypes Goto Github PK
View Code? Open in Web Editor NEWDexterity-based content types for Plone
Home Page: https://pypi.org/project/plone.app.contenttypes
Dexterity-based content types for Plone
Home Page: https://pypi.org/project/plone.app.contenttypes
When you add a new File and do not provide a Title, this field should be filled with the filename of the uploaded file and not left as None (This is the existing behavior for Archetypes)
The migration runs and on the console log I gets lots (like after each migrated item) of messages like:
ERROR Products.ZCatalog A different document with value '2c9ac6a4e1df4ce6a0f5b6acd19fa612' already exists in the index.'
Afterwards the migration seems to succeed, but I fear I missed something?
After migration the sharing tab fails with traceback if there where locals roles set on the item:
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module plone.app.workflow.browser.sharing, line 59, in __call__
Module Products.Five.browser.pagetemplatefile, line 125, in __call__
Module Products.Five.browser.pagetemplatefile, line 59, in __call__
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module zope.pagetemplate.pagetemplate, line 240, in __call__
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
Module zope.tales.tales, line 696, in evaluate
URL: /opt/eca/RC/eggs/plone.app.workflow-2.1.5-py2.7.egg/plone/app/workflow/browser/sharing.pt
Line 67, Column 8
Expression: <PathExpr standard:u'view/role_settings'>
Names:
{'args': (),
'container': <Collage at /Plone/mitarbeiter/startseite>,
'context': <Collage at /Plone/mitarbeiter/startseite>,
'default': <object object at 0xb7531818>,
'here': <Collage at /Plone/mitarbeiter/startseite>,
'loop': {},
'nothing': None,
'options': {},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x1132bbe4>,
'request': <HTTPRequest, URL=https://root.rc.eca1.zoplo.com/Plone/mitarbeiter/startseite/@@sharing>,
'root': <Application at >,
'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x122873ac>,
'traverse_subpath': [],
'user': <PropertiedUser 'admin'>,
'view': <Products.Five.metaclass.SharingView object at 0x122871ac>,
'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x1183130c>}
Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 155, in _eval
Module Products.PageTemplates.Expressions, line 117, in render
Module plone.memoize.instance, line 51, in memogetter
Module plone.app.workflow.browser.sharing, line 157, in role_settings
Module plone.memoize.instance, line 51, in memogetter
Module plone.app.workflow.browser.sharing, line 223, in existing_role_settings
TypeError: can only concatenate list (not "tuple") to list
I just fixed the jenkins job for p.a.contenttypes:
https://jenkins.plone.org/view/Plone%20Core%20Projects/job/plone.app.contenttypes/47/
I would prefer to comment out these failing "implementation missing" tests for now, so we get an email when someone breaks the build, otherwise CI does not really makes sense. What do you think?
The condition marked below with <----------- needs a |nothing added
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="context/main_template/macros/master"
i18n:domain="plone">
<body>
<metal:content-core fill-slot="content-core">
<metal:content-core define-macro="content-core">
<tal:comment replace="nothing">
This is fixed in dexterity trunk
http://code.google.com/p/dexterity/issues/detail?id=200 and
tal:condition="context/text" should be removed after the next release of dexterity.
</tal:comment>
<div id="parent-fieldname-text"
tal:condition="context/text|nothing" <------------------------
tal:content="structure context/text/output" />
</metal:content-core>
</metal:content-core>
</body>
</html>
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Shared.DC.Scripts.Bindings, line 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 237, in _exec
Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 113, in pt_render
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 851, in do_condition
Module Products.PageTemplates.Expressions, line 205, in evaluateBoolean
Module zope.tales.tales, line 696, in evaluate
URL: file:/home/zope/energieclusterR5/src/plone.app.contenttypes/plone/app/contenttypes/skins/templates/document_view.pt
Line 17, Column 8
Expression: <PathExpr standard:u'context/text'>
Names:
{'container': <ATDocument at /ecweb/ecweb5/front-page>,
'context': <ATDocument at /ecweb/ecweb5/front-page>,
'default': <object object at 0x7f4430dda4e0>,
'here': <ATDocument at /ecweb/ecweb5/front-page>,
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xa7030a8>,
'request': <HTTPRequest, URL=http://ecweb5.energie-cluster.ch/front-page/document_view>,
'root': <Application at >,
'template': <FSPageTemplate at /ecweb/ecweb5/front-page/document_view>,
'traverse_subpath': [],
'user': <SpecialUser 'Anonymous User'>}
Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 147, in _eval
Module zope.tales.expressions, line 124, in _eval
Module Products.PageTemplates.Expressions, line 74, in boboAwareZopeTraverse
Module OFS.Traversable, line 317, in restrictedTraverse
Module OFS.Traversable, line 285, in unrestrictedTraverse
__traceback_info__: ([], 'text')
AttributeError: text
plone app contenttypes tries to load collective.dexteritytextindexer
however this module does not load under plone4.3
The image in the News Item view ist not wrapped by a link to image_view_fullscreen.
Steps to reproduce:
plone.app.contenttypes currently has a transitive dependency on Archetypes, via plone.app.referenceablebehavior. This behavior is currently only used for Folders. Who can tell me why it was decided to enable it for Folders? We should get rid of that if possible so that plone.app.contenttypes can be the default content type set for Plone 5 without pulling in Archetypes.
The migration is not happening. The images are still plone.app.blob.interfaces.IATBlob and Products.ATContentTypes.interfaces.interfaces.IATContentType
Since this will be a major upgrade, what does everyone think about making all types folderish? Or at the very least, making the page type folderish? We could then get rid of the Folder type too.
This is going to be part of a major plone upgrade so IMO it's fine to change the behavior. Then we could finally stop training people on how to create a folder and then set a page inside the folder as the default view of the folder.
The location field is not part at the metadata-behavior in dx. My guess is that was a consious design-decision in dexterity. We could add this to all types (it is only a stringfield) but I'd like to hear from the framework-team if this is really wanted.
The presentation mode has been moved to plone.app.s5slideshow. The package is discussed in https://dev.plone.org/ticket/13270. That package could be extended to also provide a behavior for this mode.
Most of the strings used in the schemata already exist in the i18n-domain 'atcontenttypes'. The corresponding po-file holds 176 different values. Should we use this domain, create a new domain and copy the neccessary translations or use 'plone' like the skin-templates in CMFPlone do?
Breaks when default site language includes a territory.
Traceback:
2012-08-28 15:28:43 ERROR Zope.SiteErrorLog 1346160523.880.0856174562525 http://localhost:8080/i18ntest/portal_setup/manage_importAllSteps
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
Module ZPublisher.Publish, line 46, in call_object
Module Products.GenericSetup.tool, line 549, in manage_importAllSteps
Module Products.GenericSetup.tool, line 353, in runAllImportStepsFromProfile
After migration all exclude from navigation are set to False.
While writing the migration I saw that AT FileFields store etags:
(Pdb) pp self.old.getField('file').get(self.old).__dict__
{'_EtagSupport__etag': 'ts59196707.53',
'__name__': 'file',
'content_type': 'text/plain',
'data': 'dummydata',
'filename': 'third',
'precondition': '',
'size': 9,
'title': ''}
No idea if we need that to support something like webdav or caching.
Migration works but after editing and trying to save without any changes ther is a validation-error "Object is of wrong type". Could be connected to contraints in the schema.
Currently only the id is created from the filename.
steps to reproduce:
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
Module ZPublisher.Publish, line 46, in call_object
Module Products.Five.browser.metaconfigure, line 476, in __call__
Module Products.Five.browser.pagetemplatefile, line 125, in __call__
Module Products.Five.browser.pagetemplatefile, line 59, in __call__
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
- Warning: Macro expansion failed
- Warning: <type 'exceptions.KeyError'>: 'atct_topic_view'
Module zope.pagetemplate.pagetemplate, line 240, in __call__
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
Module zope.tales.tales, line 696, in evaluate
- URL: /Users/philip/workspace/plone.app.contenttypes/plone/app/contenttypes/browser/templates/atct_album_view.pt
- Line 9, Column 0
- Expression: <PythonExpr (here.atctListAlbum(images=1, folders=1, subimages=0, others=1))>
- Names:
{'args': (),
'container': <Folder at /Plone/asd>,
'context': <Folder at /Plone/asd>,
'default': <object object at 0x10403db70>,
'here': <Folder at /Plone/asd>,
'loop': {},
'nothing': None,
'options': {},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x1091753c0>,
'request': <HTTPRequest, URL=http://localhost:8080/Plone/asd/atct_album_view>,
'root': <Application at >,
'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x107a67750>,
'traverse_subpath': [],
'user': <PropertiedUser 'admin'>,
'view': <Products.Five.metaclass.SimpleViewClass from /Users/philip/workspace/plone.app.contenttypes/plone/app/contenttypes/browser/templates/atct_album_view.pt object at 0x109c2e6d0>,
'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x1090baa50>}
Module zope.tales.pythonexpr, line 59, in __call__
- __traceback_info__: (here.atctListAlbum(images=1, folders=1, subimages=0, others=1))
Module <string>, line 1, in <module>
AttributeError: atctListAlbum
In Archetypes a Folder also implements SearchableText (returning id, title and description).
Dexterity implementation of Folder content type should also provide that.
folder_summary_view.pt is registered for Products.CMFPlone.interfaces.siteroot.IPloneSiteRoot but it is not rendered.
http://localhost:8080/Plone/ and http://localhost:8080/Plone/folder_summary_view still render the old skin-template from CMFPlone whereas http://localhost:8080/Plone/@@folder_summary_view renders the one in p.a.c
:) even if there are open issues - this would simplifiy deployment of our sites aleady using current master.
To reflect the problem in 8a745cd we must use a user with contributor role in the tests, where adding of contenttype is tested.
see atct_image_transform.pt
To make it easier to extend and re-use the collection functionality.
I have never met a use for this. It could be easily changed (by adding '/view' to the url_expr of the action). I just doubt it serves any purpose (with collections it does not work since view is a 'zope.traversing.namespace.view object at ...').
migrations are there but I'm having a problem with the tests. I did not manage to create a real ATBlobFile object to test the migration on.
at_blobfile = self.createATCTobject(ATBlob, 'file')
was not enough.
The fallback is the skin-template in CMFPlone which fauls with dexterity-images.
When running the test cases from plone.app.contentypes the NewsItemIntegrationTest throws an error:
Error in test test_view (plone.app.contenttypes.tests.test_news_item.NewsItemIntegrationTest)
Traceback (most recent call last):
File "/home/plone/plone.app.contenttypes/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py", line 340, in run
testMethod()
File "/home/plone/plone.app.contenttypes/plone/app/contenttypes/tests/test_news_item.py", line 88, in test_view
self.assertTrue(view())
File "/home/plone/plone.app.contenttypes/eggs/plone.autoform-1.3-py2.7.egg/plone/autoform/view.py", line 46, in __call__
self._update()
File "/home/plone/plone.app.contenttypes/eggs/plone.autoform-1.3-py2.7.egg/plone/autoform/view.py", line 56, in _update
self.updateWidgets()
File "/home/plone/plone.app.contenttypes/eggs/z3c.form-2.8.2-py2.7.egg/z3c/form/form.py", line 135, in updateWidgets
self.widgets.update()
File "/home/plone/plone.app.contenttypes/eggs/z3c.form-2.8.2-py2.7.egg/z3c/form/field.py", line 243, in update
if not dm.canWrite():
File "/home/plone/plone.app.contenttypes/eggs/z3c.form-2.8.2-py2.7.egg/z3c/form/datamanager.py", line 95, in canWrite
context = self.adapted_context
File "/home/plone/plone.app.contenttypes/eggs/z3c.form-2.8.2-py2.7.egg/z3c/form/datamanager.py", line 59, in adapted_context
context = self.field.interface(context)
TypeError: ('Could not adapt', <NewsItem at /plone/news_item>, <InterfaceClass plone.dexterity.schema.generated.plone_0_News_1_Item>)
Ran 71 tests with 0 failures and 1 errors in 8.332 seconds.
In ATCT the ATFile puts a mimetype specific icon in the catalog. This is missing for p.a.ct File.
2013-04-09 16:36:20 ERROR OFS.subscribers _delObject() threw
Traceback (most recent call last):
File "/Users/philip/.cache/buildout/eggs/Zope2-2.13.19-py2.7.egg/OFS/subscribers.py", line 155, in callManageBeforeDelete
ob.manage_beforeDelete(item, container)
File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/BaseContent.py", line 51, in manage_beforeDelete
BaseObject.manage_beforeDelete(self, item, container)
File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/BaseObject.py", line 170, in manage_beforeDelete
Referenceable.manage_beforeDelete(self, item, container)
File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/Referenceable.py", line 295, in manage_beforeDelete
self.deleteReferences()
File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/Referenceable.py", line 63, in deleteReferences
return tool.deleteReferences(self, relationship)
File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/ReferenceEngine.py", line 354, in deleteReferences
self._deleteReference(b)
File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/ReferenceEngine.py", line 564, in _deleteReference
annotation = sobj._getReferenceAnnotations()
AttributeError: 'NoneType' object has no attribute '_getReferenceAnnotations'
This can be closed if the event type is scrapped in favour of plone.app.event.
When editing an event (I noticed it for the date fields and the event URL field), I get instances of this error:
2013-01-24 14:14:07 ERROR Zope.SiteErrorLog 1359033247.270.538704078821 http://localhost:8080/procyon/events/kss_z3cform_inline_validation
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module , line 5, in wrapper
Module kss.core.actionwrapper, line 231, in apply
Module plone.app.z3cform.kss.validation, line 60, in validate_input
ValueError: invalid literal for int() with base 10: '#fieldsetlegend-default'
After migration all folders are modifed.
I have really no good idea why this happens. But I refactored the tests so plone.namedfile.file.NamedBlobFile gets an open file to consume the data from. The tests are working, except that the file is deleted after NamedFile read from a file thats opened in mode 'r' for read. So running the test a second time will fail. Therefore I added a check at the very end of the test to check if the file exists.
I would be happy if someone with deeper insight on plone.namedfile looks at it, so this is really odd behavior. I fear its only a side effect and the real bug is somehwere else and not in p.a.c - but since it starts here I report here.
I added the scenario to the tests - including a comment - here.
uses collections.Counter which was introduced in Python 2.7:
http://docs.python.org/2/library/collections.html
Therefore starting a Plone instance with Python 2.6 fails:
ZopeXMLConfigurationError: File "/srv/www/dkg-staging/krebswegweiser/src/plone.app.contenttypes/plone/app/contenttypes/configure.zcml", line 44.2-44.32
ZopeXMLConfigurationError: File "/srv/www/dkg-staging/krebswegweiser/src/plone.app.contenttypes/plone/app/contenttypes/browser/configure.zcml", line 119.2-125.6
ImportError: cannot import name Counter
Flake8/McCabe currently complains about three methods:
Flake8. [ FAILURE ]
/home/timo/workspace/plone/plone.app.contenttypes/plone/app/contenttypes/setuphandlers.py:165:1: C901 'importContent' is too complex (14)
/home/timo/workspace/plone/plone.app.contenttypes/plone/app/contenttypes/migration/browser.py:89:1: C901 'MigrateFromATContentTypes.call' is too complex (10)
/home/timo/workspace/plone/plone.app.contenttypes/plone/app/contenttypes/migration/migration.py:34:1: C901 'restoreReferences' is too complex (13)
Steps to reproduce:
Click edit and tab Categorization
Click on Related Items Browse. Choose a related item.
Click Add or Cancel and again on Browse
You will see the Items twice.
I think that is a great feature and we use it in a lot of sites. But I'll be happy to move it into a branch if you agree that this should not be shipped.
Migrate Content-Types
[link: migrate all items]
Existing content:
Content extended trough archetypes.schemaextender:
options:
Some Documentation:
Output after running:
Successfully migrated xxx objects
xxx Documeents were migrated
xxx Objects werde not migrated because...
Error-Messages
Currently at https://github.com/plone/plone.app.contenttypes/blob/master/plone/app/contenttypes/content.py#L24 the collection schema is defined, while all other schemas are xml based in https://github.com/plone/plone.app.contenttypes/tree/master/plone/app/contenttypes/schema
I think we should unify this an make the collection schema also xml based.
This reduces confusion and makes p.a.ct easier to understand for other developers.
Just wanted to put it somewhere, will do some more research and complete the issue.
Got following traceback:
2013-04-08 07:22:51 INFO ZServer HTTP server started at Mon Apr 8 07:22:51 2013
Hostname: 0.0.0.0
Port: 8080
Traceback (most recent call last):
File "/Users/daniel/Workspace/my.package/parts/instance/bin/interpreter", line 337, in <module>
exec(compile(__file__f.read(), __file__, "exec"))
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
run()
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/Zope2/Startup/__init__.py", line 86, in prepare
self.startZope()
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/Zope2/Startup/__init__.py", line 262, in startZope
Zope2.startup()
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/Zope2/__init__.py", line 47, in startup
_startup()
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/Zope2/App/startup.py", line 118, in startup
load_zcml()
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/Zope2/App/startup.py", line 52, in load_zcml
load_site()
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/Zope2/App/zcml.py", line 46, in load_site
_context = xmlconfig.file(site_zcml)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 649, in file
include(context, name, package)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/Users/daniel/Workspace/.buildout/eggs/Zope2-2.13.19-py2.7.egg/OFS/metaconfigure.py", line 46, in loadProducts
xmlconfig.include(_context, zcml, package=product)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/Users/daniel/Workspace/.buildout/eggs/z3c.autoinclude-0.3.4-py2.7.egg/z3c/autoinclude/zcml.py", line 104, in includePluginsDirective
includeZCMLGroup(_context, info, filename)
File "/Users/daniel/Workspace/.buildout/eggs/z3c.autoinclude-0.3.4-py2.7.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
include(_context, filename, includable_package)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/Users/daniel/Workspace/.buildout/eggs/z3c.autoinclude-0.3.4-py2.7.egg/z3c/autoinclude/zcml.py", line 54, in includeDependenciesDirective
includeZCMLGroup(_context, info, 'configure.zcml')
File "/Users/daniel/Workspace/.buildout/eggs/z3c.autoinclude-0.3.4-py2.7.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
include(_context, filename, includable_package)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/Users/daniel/Workspace/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/Users/daniel/Workspace/.buildout/eggs/z3c.autoinclude-0.3.4-py2.7.egg/z3c/autoinclude/zcml.py", line 51, in includeDependenciesDirective
info = DependencyFinder(dist).includableInfo(['configure.zcml', 'meta.zcml'])
File "/Users/daniel/Workspace/.buildout/eggs/z3c.autoinclude-0.3.4-py2.7.egg/z3c/autoinclude/dependency.py", line 24, in includableInfo
module = resolve(dotted_name)
File "/Users/daniel/Workspace/.buildout/eggs/zope.dottedname-3.4.6-py2.7.egg/zope/dottedname/resolve.py", line 38, in resolve
__import__(used)
File "/Users/daniel/Workspace/.buildout/eggs/collective.dexteritydiff-0.1b4-py2.7.egg/collective/dexteritydiff/__init__.py", line 2, in <module>
from .compounddiff import DexterityCompoundDiff
File "/Users/daniel/Workspace/.buildout/eggs/collective.dexteritydiff-0.1b4-py2.7.egg/collective/dexteritydiff/compounddiff.py", line 2, in <module>
from .binarydiff import DexterityBinaryDiff
File "/Users/daniel/Workspace/.buildout/eggs/collective.dexteritydiff-0.1b4-py2.7.egg/collective/dexteritydiff/binarydiff.py", line 3, in <module>
from .filefields import named_file_as_str, is_same
File "/Users/daniel/Workspace/.buildout/eggs/collective.dexteritydiff-0.1b4-py2.7.egg/collective/dexteritydiff/filefields.py", line 9, in <module>
if field.HAVE_BLOBS:
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/Users/daniel/Workspace/my.package/parts/instance/etc/site.zcml", line 16.2-16.23
ZopeXMLConfigurationError: File "/Users/daniel/Workspace/.buildout/eggs/Products.CMFPlone-4.3rc1-py2.7.egg/Products/CMFPlone/configure.zcml", line 98.4-102.10
ZopeXMLConfigurationError: File "/Users/daniel/Workspace/my.package/src/my/package/configure.zcml", line 8.4-8.39
ZopeXMLConfigurationError: File "/Users/daniel/Workspace/my.package/devsrc/plone.app.contenttypes/plone/app/contenttypes/configure.zcml", line 10.2-10.37
AttributeError: 'module' object has no attribute 'HAVE_BLOBS'
to prevent LinkIntegrityNotificationException
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.