Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10 Jan 2007, at 13:59, Charlie Clark wrote: Do all content-types have to have a description? ie. is this a necessary part of the DublinCoreSpe? Dublin Core is not mandatory, but many places will expect to find at least a Description method on your content object. Whether you put text into the description is your choice. Or are you talking about the content type objects in the types tool? You don't have to fill it in, but some UI elements will become more user friendly if a description can be shown. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFpPnpRAx5nvEhZLIRAniAAJ9chmGaW1qb58dc1cD12MCfa4P10QCeNfHm KeGU2z1aPjN6APTIjJKYBto= =kxEK -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
Am 10.01.2007 um 13:52 schrieb Charlie Clark: So, it is actually the Templates that are being blocked from accessing the context! Unfortunately I do not understand why this should be the case. aaagh! Simple error: the skin was not in the list of skins to be viewed. Do all content-types have to have a description? ie. is this a necessary part of the DublinCoreSpe? Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
Am 10.01.2007 um 12:52 schrieb Charlie Clark: Okay, next problem. Getting an error trying to access the context in the edit_form.py or view.py scripts. Unauthorized: Not authorized to access binding: context Silly me! Always pays to look at the full traceback! 2007-01-10 13:49:45 ERROR root Exception while rendering an error message Traceback (most recent call last): File "/opt/Zope-2.9/lib/python/OFS/SimpleItem.py", line 223, in raise_standardErrorMessage v = s(**kwargs) File "/opt/Zope-2.9/lib/python/Shared/DC/Scripts/Bindings.py", line 311, in __call__ return self._bindAndExec(args, kw, None) File "/opt/Zope-2.9/lib/python/Shared/DC/Scripts/Bindings.py", line 348, in _bindAndExec return self._exec(bound_data, args, kw) File "/Users/charlieclark/eGenix.com/Products/CMFCore/ FSPageTemplate.py", line 196, in _exec result = self.pt_render(extra_context=bound_names) File "/Users/charlieclark/eGenix.com/Products/CMFCore/ FSPageTemplate.py", line 135, in pt_render result = FSPageTemplate.inheritedAttribute('pt_render')( File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ PageTemplate.py", line 105, in pt_render tal=not source, strictinsert=0)() File "/opt/Zope-2.9/lib/python/TAL/TALInterpreter.py", line 238, in __call__ self.interpret(self.program) File "/opt/Zope-2.9/lib/python/TAL/TALInterpreter.py", line 281, in interpret handlers[opcode](self, args) File "/opt/Zope-2.9/lib/python/TAL/TALInterpreter.py", line 735, in do_useMacro macro = self.engine.evaluateMacro(macroExpr) File "/opt/Zope-2.9/lib/python/Products/PageTemplates/TALES.py", line 221, in evaluate return expression(self) File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ Expressions.py", line 185, in __call__ return self._eval(econtext) File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ Expressions.py", line 173, in _eval ob = self._subexprs[-1](econtext) File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ Expressions.py", line 127, in _eval ob = restrictedTraverse(ob, path, getSecurityManager()) File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ Expressions.py", line 284, in restrictedTraverse t=get(object, '__bobo_traverse__', N) File "/opt/Zope-2.9/lib/python/Shared/DC/Scripts/Bindings.py", line 180, in __getattr__ self.__you_lose() File "/opt/Zope-2.9/lib/python/Shared/DC/Scripts/Bindings.py", line 187, in __you_lose raise Unauthorized('Not authorized to access binding: %s' % name) Unauthorized: Not authorized to access binding: context So, it is actually the Templates that are being blocked from accessing the context! Unfortunately I do not understand why this should be the case. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
Am 10.01.2007 um 12:23 schrieb Jens Vagelpohl: What is the additional step using Python code that you're referring to? Is that the setuphandlers stuff called by import_steps? Yep, exactly. Okay, next problem. Getting an error trying to access the context in the edit_form.py or view.py scripts. Unauthorized: Not authorized to access binding: context for statements like options['title'] = context.Title() I've obviously missed some kind of permission but AddPortalContent and ModifyPortalContent and View but this must be something else. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10 Jan 2007, at 11:47, Charlie Clark wrote: What is the additional step using Python code that you're referring to? Is that the setuphandlers stuff called by import_steps? Yep, exactly. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFpMycRAx5nvEhZLIRAvJSAKCM5aB5g5UVb/ZlSL11ppQV+jHXIwCbB3PO eDvNoEmthKE9shHzNJYRzzE= =J9CM -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
Am 10.01.2007 um 08:52 schrieb Jens Vagelpohl: Yes it it. It sets up one content type (Event), adds two indices and metadata columns to the catalog and one tool to the portal. There's one additional step handled by Python code to add a policy to the metadata tool, which shows you how to deal with situations that are not covered by existing GS handlers yet. Yippee! daylight at the end of the tunnel! - Type is addable and generates lots of lovely specific errors! What is the additional step using Python code that you're referring to? Is that the setuphandlers stuff called by import_steps? Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10 Jan 2007, at 01:26, Charlie Clark wrote: Am 10.01.2007 um 01:17 schrieb Jens Vagelpohl: I believe Tres is referring to is the "global_allow" property that you can find in the GenericSetup XML files for content types. To make a long story short: Completely forget the Plone book examples and look at the GenericSetup examples as set by _recent_ CMF versions, described by the XML files inside /profiles/ default/. factory_type_information dictionaries are obsoleted by GenericSetup profiles. Thanks, I'm using CMF 2.0 from this autumn so I'm using the most recent stable release. I assume CMFCalendar is a good example to follow? Yes it it. It sets up one content type (Event), adds two indices and metadata columns to the catalog and one tool to the portal. There's one additional step handled by Python code to add a policy to the metadata tool, which shows you how to deal with situations that are not covered by existing GS handlers yet. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFpJsyRAx5nvEhZLIRAhDeAKCrGM2aMnZjskma+WAtC7DDbo5FbACgjH7p K/Dev4djMvoF2xG+BY5R2Nc= =KAae -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
Am 10.01.2007 um 01:17 schrieb Jens Vagelpohl: I believe Tres is referring to is the "global_allow" property that you can find in the GenericSetup XML files for content types. To make a long story short: Completely forget the Plone book examples and look at the GenericSetup examples as set by _recent_ CMF versions, described by the XML files inside /profiles/ default/. factory_type_information dictionaries are obsoleted by GenericSetup profiles. Thanks, I'm using CMF 2.0 from this autumn so I'm using the most recent stable release. I assume CMFCalendar is a good example to follow? Thanks Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10 Jan 2007, at 01:01, Charlie Clark wrote: You may need to check its "globally_addable" property (the type object's) and verify that the container into which you would like to add an instance does not have a type-based restriction on adding (e.g., the 'filter_contents' and 'allowed_types' settings on the container's type informatino object). I realise I'm being somewhat obtuse about this but where do I set the globally_addable property? I've been basing my stuff on the example in the Plone book but also on CMFCalendar. My Zope Product gets installed with no errors. This is my factory_type_information I believe Tres is referring to is the "global_allow" property that you can find in the GenericSetup XML files for content types. To make a long story short: Completely forget the Plone book examples and look at the GenericSetup examples as set by _recent_ CMF versions, described by the XML files inside /profiles/default/. factory_type_information dictionaries are obsoleted by GenericSetup profiles. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFpDCPRAx5nvEhZLIRAk5MAJ0afCstmeC1uZolH1c6ZuzF/zU/sACguUJi h2O5tZRiPnJMOOphNfSJc1Y= =tbYp -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
Am 09.01.2007 um 22:26 schrieb Tres Seaver: I think this is the bit I'm fuzzy about. Is adding the type information simply a question of adding a type in portal-types? If so I'm doing something wrong because it my type is not appearing in the pull-down list. You may need to check its "globally_addable" property (the type object's) and verify that the container into which you would like to add an instance does not have a type-based restriction on adding (e.g., the 'filter_contents' and 'allowed_types' settings on the container's type informatino object). I realise I'm being somewhat obtuse about this but where do I set the globally_addable property? I've been basing my stuff on the example in the Plone book but also on CMFCalendar. My Zope Product gets installed with no errors. This is my factory_type_information factory_type_information = { 'id': product_id, 'meta_type': product_name, 'description': ('Extremely flexible type of article.'), 'product': product_name, 'content_icon': 'newsitem.gif', 'immediate_view': 'view', 'actions': ( {'id': 'view', 'name':'View', 'action':'flexible_article_view_form', 'permissions': (view_permission,)}, {'id': 'edit', 'name':'Edit', 'action':'flexible_article_edit_form', 'permissions': (edit_permission,)}, ) } Does the __init__.py need extending? Thanks Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Installing a CMF Content Type from scratch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Charlie Clark wrote: > Am 08.01.2007 um 17:01 schrieb Tres Seaver: > >> Depends. If your type has any other customizations (e.g., workflows, >> caching policies, metadata constraints, etc.) then you need to >> tweak the >> releavant tools, as well. > > It is a fairly standard document. Essentially a News Item on steroids. >> I would recommend doing this as follows: >> >> - Start from a "clean" site, created via "Configured CMF Site" (so >> that it uses the GenericSetup tool and the "baseline" profile). > > I am doing just that. > >> - Add your type information, skins, etc. and test. > > I think this is the bit I'm fuzzy about. Is adding the type > information simply a question of adding a type in portal-types? If so > I'm doing something wrong because it my type is not appearing in the > pull-down list. You may need to check its "globally_addable" property (the type object's) and verify that the container into which you would like to add an instance does not have a type-based restriction on adding (e.g., the 'filter_contents' and 'allowed_types' settings on the container's type informatino object). Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFpAiK+gerLs4ltQ4RAp8sAJ9f0xVWGzg8zPD7JUBLnTz3GCtk6QCgrwXL HRR9+eMTyvzVOz5hyom1jWQ= =JCTf -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Installing a CMF Content Type from scratch
Am 08.01.2007 um 17:01 schrieb Tres Seaver: Depends. If your type has any other customizations (e.g., workflows, caching policies, metadata constraints, etc.) then you need to tweak the releavant tools, as well. It is a fairly standard document. Essentially a News Item on steroids. I would recommend doing this as follows: - Start from a "clean" site, created via "Configured CMF Site" (so that it uses the GenericSetup tool and the "baseline" profile). I am doing just that. - Add your type information, skins, etc. and test. I think this is the bit I'm fuzzy about. Is adding the type information simply a question of adding a type in portal-types? If so I'm doing something wrong because it my type is not appearing in the pull-down list. - Once everything works, visit the 'portal_setup' tool and create a new snapshot. - Compare that snapshot against the "initial_configuration" one, to review your changes. Thanks Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Installing a CMF Content Type from scratch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Charlie Clark wrote: > Hi, > > I'm working on a new content type for the CMF. I've got it working as > a Zope Product and can add instances of it through the ZMI but I need > to register for my CMF site. I've been looking at the way Andy McKay > does this in his Plone book but this seems to rely on some Plone > magic (an install product function in the Plone control panel) which > I don't have. I assume I should be able to do everything I need > through the portal_types and add a file system directory view for the > skins folder. Is this correct? Is anything else required? Depends. If your type has any other customizations (e.g., workflows, caching policies, metadata constraints, etc.) then you need to tweak the releavant tools, as well. I would recommend doing this as follows: - Start from a "clean" site, created via "Configured CMF Site" (so that it uses the GenericSetup tool and the "baseline" profile). - Add your type information, skins, etc. and test. - Once everything works, visit the 'portal_setup' tool and create a new snapshot. - Compare that snapshot against the "initial_configuration" one, to review your changes. Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFomrS+gerLs4ltQ4RAl77AKDCTYVP3adCX2W9/TZeehSIwVBxMACfVuYi QOPFldJ50fdpVsBKj9qHUW8= =jw3H -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests