[Zope-CMF] CMF Support Woes
Andrew Yochum
andrew@digitalpulp.com
Tue, 25 Mar 2003 14:55:11 -0500
Hi Sheppard,
I have some help for you on some of your tasks, if you get none other...
Changing the full edit metadata to be the default (get rid of the "short" form):
1. In the ZMI of your CMF site, navigate to
cmf root / portal_skins / zpt_content / full_metadata_edit_form
2. Under the Customize label, select the "custom" folder and press Customize.
3. In the ZMI of your CMF site, navigate to
cmf root / portal_skins / custom
4. Rename full_metadata_edit_form to metadata_edit_form to override the
default form.
Requiring some metadata (requires some python coding, but should be simple):
1. In the ZMI of your CMF site, navigate to
cmf root / portal_skins / zpt_content / metadata_edit
2. Under the Customize label, select the "custom" folder and press Customize.
3. Modify the script to check the values by adding some code inspecting the
metadata variables that are in the local namespace and setting some flag, or
message.
4. Use the code in the "except" clause as a template to send the user
an error message when you're not happy with the values sent in. You should
do this just before the "try" clause, I believe.
As far as adding metadata and getting them to appear in the form, I'm not sure
of the "right" way to do this using the metadata_tool. My gut says you'd have
to further modify the ZPT and python script's modified in my above instructions
further to accomodate your new metadata properties. Anybody have any input
here on the right way to do this?
There is also this product/patch available (which I have not used myself):
http://www.gocept.com/opensource/projects/CMF_Metadata
Hope my contribution helps.
Regards,
Andrew
On Tue, Mar 25, 2003 at 10:45:34AM -0800, Norfleet, Sheppard S. wrote:
> I am underwhelmed at the limited amount of "good" material about CMF Dogbowl
> out there. I was hoping this mailing list would fill in the gaps, but I
> seem to be ignored; that is not really surprising considering the limited
> number of posts on this list in a 24 hour period. Is there another mailing
> list (or forum) that is more responsive to CMF newbies?
>
> I am not trying to start anything, but I am grasping for help and there
> seems to be little of it for this product. I understand that CMF is Open
> Source (I too code C++ open source), but most other projects seem to have a
> more responsive help sources (usually forums).
>
> Basically, I need to add additional meta-data (for all portal content types)
> to the edit meta data form, and I would like the full edit meta data form to
> be the default. I would also like to have some meta-data entries to be
> required. Is this possible to change via the ZMI, or do I need get out a
> wrench and modify the code. (Not really knowing Python I would prefer a ZMI
> method, but will take what help I can get). I did use the meta-data tool
> to make new meta-data types, but they apparently do not "automatically"
> appear in the form nor is there an apparent interface to add them to the
> form.
>
> Thanks for any help anyone can provide.
>
> Warm Regards
>
> Sheppard Norfleet
>
> P.S. I have been looking for help on this topic for about 2 weeks, 5 days a
> week, 8 hours a day, so please go gentle if I managed to miss a "good" help
> source.
>
> -----Original Message-----
> From: zope-cmf-request@zope.org [mailto:zope-cmf-request@zope.org]
> Sent: Tuesday, March 25, 2003 12:00 PM
> To: zope-cmf@zope.org
> Subject: Zope-CMF digest, Vol 1 #1646 - 9 msgs
>
>
> Send Zope-CMF mailing list submissions to
> zope-cmf@zope.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.zope.org/mailman/listinfo/zope-cmf
> or, via email, send a message with subject or body 'help' to
> zope-cmf-request@zope.org
>
> You can reach the person managing the list at
> zope-cmf-admin@zope.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Zope-CMF digest..."
>
>
> Today's Topics:
>
> 1. Re: Proposal: Limiting the Content Types a user can create (Chris
> Withers)
> 2. Re: Process the results of a method (Dieter Maurer)
> 3. Re: How to cache CMF filesystem images? (Dieter Maurer)
> 4. cmfstaging (Rocky Burt)
> 5. Re: How to cache CMF filesystem images? (Ausum Studio)
> 6. Re: How to cache CMF filesystem images? (Ausum Studio)
> 7. Re: How to cache CMF filesystem images? (Peter Simmons)
> 8. Re: How to cache CMF filesystem images? (Andy McKay)
> 9. Linux Test Results - CMF - OK :-) (zope-tests@squishdot.org)
>
> --__--__--
>
> Message: 1
> Date: Mon, 24 Mar 2003 18:40:06 +0000
> From: Chris Withers <chrisw@nipltd.com>
> To: Florent Guillaume <fg@nuxeo.com>
> CC: zope-cmf@zope.org
> Subject: Re: [Zope-CMF] Proposal: Limiting the Content Types a user can
> create
>
> Florent Guillaume wrote:
> >>Are there any objections?
> >
> > +1 from me but I don't like "Create content", it's too general (newbies
> > wouldn't see the difference from "Add portal content" I'm sure). I'd
> > like something like "Create portal type instance".
>
> Sorry, I meant that to be 'Add portal content'.
>
> I don't see the poitn in adding yet more permission names to make that damn
> security tab even longer...
>
> cheers,
>
> Chris
>
>
>
> --__--__--
>
> Message: 2
> From: Dieter Maurer <dieter@handshake.de>
> Date: Mon, 24 Mar 2003 19:59:40 +0100
> To: "David Cain" <dacain@library.syr.edu>
> Cc: <zope-cmf@zope.org>
> Subject: Re: [Zope-CMF] Process the results of a method
>
> David Cain wrote at 2003-3-24 09:39 -0500:
> > I'd like to give my content provides a way to run a Python External
> > Method on a document view.
> >
> > One the content provide has created the document, and takes a look at
> > it, they'd like to validate it against the W3C's HTML Tidy tool. I have
> > an external method that calls Tidy just fine, but I don't know how to
> > send the results of the .../view method to it.
>
> You call the view method of the respective object and pass its result
> (as argument) into the External Method.
>
> Alternatively, you pass the object itself and call its view method
> in the External Method.
>
>
> Dieter
>
>
> --__--__--
>
> Message: 3
> From: Dieter Maurer <dieter@handshake.de>
> Date: Mon, 24 Mar 2003 19:39:23 +0100
> To: "Ausum Studio" <ausum_studio@hotmail.com>
> Cc: <zope-cmf@zope.org>
> Subject: Re: [Zope-CMF] How to cache CMF filesystem images?
>
> Ausum Studio wrote at 2003-3-22 19:33 -0500:
> > ... Cache Manager ...
> > Every now and then I've googled for information on how to use this tool,
> but
> > I haven't. found it so far. I wonder whether anyone could post a simple
> > explanation on the subject. :)
>
> Read the "Cache Manager API" (--> embedded online help),
> look at the management interface.
>
> It is quite intuitive...
>
>
> Dieter
>
>
> --__--__--
>
> Message: 4
> From: Rocky Burt <rocky.burt@bricsnet.com>
> To: zope-cmf@zope.org
> Organization: Bricsnet FM
> Date: 24 Mar 2003 16:25:18 -0500
> Subject: [Zope-CMF] cmfstaging
>
> I've read all the hype. I've browsed the CVS source. I've even
> downloaded and installed the tools into my cmf site. Now what?
>
> I'm trying to evaluate CMFStaging to see if it's something I can use.
> But I have no idea what to do with it once I have it installed (assuming
> I have it installed correctly, as there's no README or INSTALL in the
> CVS tree).
>
> Any pointers?
>
>
> - Rocky
>
>
>
> --__--__--
>
> Message: 5
> From: "Ausum Studio" <ausum_studio@hotmail.com>
> To: <zope-cmf@zope.org>
> Subject: Re: [Zope-CMF] How to cache CMF filesystem images?
> Date: Mon, 24 Mar 2003 17:32:27 -0500
>
> ----- Original Message -----
> From: "Dieter Maurer" <dieter@handshake.de>
> (...)
> >
> > Read the "Cache Manager API" (--> embedded online help),
> > look at the management interface.
>
> Thanks, but I'm having problems with the Caching Policy Manager.
>
> I'm using the following script and caching policy to attempt to cache
> filesystem images.
>
> ## Script (Python) "isFSImage"
> if context.meta_type == "Filesystem Image":
> return 1
> else:
> return 0
>
> Caching Policy: (as entered in fields)
>
> Policy ID: AnyID
> Predicate: content/isFSImage No-cache?: unchecked
> Mod. Time: content/modified No-store?: unchecked
> Max age (secs): 999999 Must-revalidate?: unchecked
>
> Now, "Folder contents" seem to work fine except that it still takes its time
> to reload the icons at every page view. (Icons at ZMI doesn't present this
> problem so I believe it's not a browser issue), while attempting to view
> "newsitem_view" throws the traceback below.
>
> What am I missing?
>
>
> Ausum
>
>
>
> traceback:
> """
> Site Error
> An error was encountered while publishing this resource.
>
> KeyError
>
> Sorry, a site error occurred.
>
> Traceback (innermost last):
> File D:\ARCHIV~1\Zope251\lib\python\ZPublisher\Publish.py, line 150, in
> publish_module
> File D:\ARCHIV~1\Zope251\lib\python\ZPublisher\Publish.py, line 114, in
> publish
> File D:\ARCHIV~1\Zope251\lib\python\Zope\__init__.py, line 159, in
> zpublisher_exception_hook
> (Object: testnews)
> File D:\ARCHIV~1\Zope251\lib\python\ZPublisher\Publish.py, line 98, in
> publish
> File D:\ARCHIV~1\Zope251\lib\python\ZPublisher\mapply.py, line 88, in
> mapply
> (Object: view)
> File D:\ARCHIV~1\Zope251\lib\python\ZPublisher\Publish.py, line 39, in
> call_object
> (Object: view)
> File H:\Zope251Instance\Products\CMFCore\PortalContent.py, line 126, in
> view
> (Object: testnews)
> File H:\Zope251Instance\Products\CMFCore\PortalContent.py, line 117, in
> __call__
> (Object: testnews)
> File D:\ARCHIV~1\Zope251\lib\python\Shared\DC\Scripts\Bindings.py, line
> 252, in __call__
> (Object: newsitem_view)
> File D:\ARCHIV~1\Zope251\lib\python\Shared\DC\Scripts\Bindings.py, line
> 283, in _bindAndExec
> (Object: newsitem_view)
> File H:\Zope251Instance\Products\CMFCore\FSPageTemplate.py, line 167, in
> _exec
> (Object: newsitem_view)
> File
> D:\ARCHIV~1\Zope251\lib\python\Products\PageTemplates\ZopePageTemplate.py,
> line 210, in _exec
> (Object: newsitem_view)
> File H:\Zope251Instance\Products\CMFCore\FSPageTemplate.py, line 133, in
> pt_render
> (Object: newsitem_view)
> File H:\Zope251Instance\Products\CMFCore\CachingPolicyManager.py, line
> 463, in getHTTPCachingHeaders
> (Object: caching_policy_manager)
> File H:\Zope251Instance\Products\CMFCore\CachingPolicyManager.py, line
> 184, in getHeaders
> File H:\Zope251Instance\Products\CMFCore\Expression.py, line 44, in
> __call__
> File D:\ARCHIV~1\Zope251\lib\python\Products\PageTemplates\Expressions.py,
> line 198, in __call__
> File D:\ARCHIV~1\Zope251\lib\python\Products\PageTemplates\Expressions.py,
> line 193, in _eval
> File D:\ARCHIV~1\Zope251\lib\python\Products\PageTemplates\Expressions.py,
> line 93, in render
> (Object: isImage)
> File
> D:\ARCHIV~1\Zope251\lib\python\Products\PageTemplates\ZRPythonExpr.py, line
> 67, in call_with_ns
> (Object: __render_with_namespace__)
> KeyError: here
> """
>
>
>
>
>
>
> --__--__--
>
> Message: 6
> From: "Ausum Studio" <ausum_studio@hotmail.com>
> To: <zope-cmf@zope.org>
> Subject: Re: [Zope-CMF] How to cache CMF filesystem images?
> Date: Sat, 22 Mar 2003 08:16:33 -0500
>
> ----- Original Message -----
> From: "Tres Seaver" <tseaver@zope.com>
> (...)
> > Two possibilities:
> >
> > - Associate the image with a cache manager, by giving it an attribute,
> > 'cache' (set this in its .properties file, in CMF 1.3, or in its
> > .metadata file in the CVS HEAD).
>
> Interesting. I'll try it right away.
>
> > - Add a "CMF Caching Policy Manager' tool to your site, and set
> > either its default policy, or else one which matches your images, to
> > the caching interval you prefer.
>
> Every now and then I've googled for information on how to use this tool, but
> I haven't. found it so far. I wonder whether anyone could post a simple
> explanation on the subject. :)
>
> > Also, if you have customized the 'folder_contents' view, you should
> > verify that the URLs computed for the icons are all absolute;
> > otherwise, they won't be cacheable by Squid.
>
> This is ok.
>
> Thank you, Tres,
>
>
> Ausum
>
>
>
> > Tres.
> > --
> > ===============================================================
> > Tres Seaver tseaver@zope.com
> > Zope Corporation "Zope Dealers" http://www.zope.com
> >
> >
>
>
> --__--__--
>
> Message: 7
> Date: Tue, 25 Mar 2003 11:23:52 +1200
> From: Peter Simmons <pete@bcmpweb.com>
> Organization: BCMPweb Limited
> To: Ausum Studio <ausum_studio@hotmail.com>
> CC: zope-cmf@zope.org
> Subject: Re: [Zope-CMF] How to cache CMF filesystem images?
>
> Sorry to jump in the middle.
>
> What would the cache property be?
>
> cache=??
>
> The name of the cache manager?
>
> Regards,
> Pete
>
> Ausum Studio wrote:
>
> >----- Original Message -----
> >From: "Tres Seaver" <tseaver@zope.com>
> >(...)
> >
> >
> >>Two possibilities:
> >>
> >> - Associate the image with a cache manager, by giving it an attribute,
> >> 'cache' (set this in its .properties file, in CMF 1.3, or in its
> >> .metadata file in the CVS HEAD).
> >>
> >>
> >
> >Interesting. I'll try it right away.
> >
> >
> >
> >> - Add a "CMF Caching Policy Manager' tool to your site, and set
> >> either its default policy, or else one which matches your images, to
> >> the caching interval you prefer.
> >>
> >>
> >
> >Every now and then I've googled for information on how to use this tool,
> but
> >I haven't. found it so far. I wonder whether anyone could post a simple
> >explanation on the subject. :)
> >
> >
> >
> >>Also, if you have customized the 'folder_contents' view, you should
> >>verify that the URLs computed for the icons are all absolute;
> >>otherwise, they won't be cacheable by Squid.
> >>
> >>
> >
> >This is ok.
> >
> >Thank you, Tres,
> >
> >
> >Ausum
> >
> >
> >
> >
> >
> >>Tres.
> >>--
> >>===============================================================
> >>Tres Seaver tseaver@zope.com
> >>Zope Corporation "Zope Dealers" http://www.zope.com
> >>
> >>
> >>
> >>
> >
> >_______________________________________________
> >Zope-CMF maillist - Zope-CMF@zope.org
> >http://mail.zope.org/mailman/listinfo/zope-cmf
> >
> >See http://collector.zope.org/CMF for bug reports and feature requests
> >
> >
> >
> >
>
>
>
> --__--__--
>
> Message: 8
> Date: Mon, 24 Mar 2003 15:48:50 -0800
> From: Andy McKay <andy@agmweb.ca>
> To: Peter Simmons <pete@bcmpweb.com>
> Cc: Ausum Studio <ausum_studio@hotmail.com>, zope-cmf@zope.org
> Subject: Re: [Zope-CMF] How to cache CMF filesystem images?
>
> Peter Simmons wrote:
> > Sorry to jump in the middle.
> >
> > What would the cache property be?
> >
> > cache=??
> >
> > The name of the cache manager?
>
> Yes
> --
> Andy McKay
>
>
>
> --__--__--
>
> Message: 9
> From: zope-tests@squishdot.org
> To: zope-cmf@zope.org
> Date: Tue, 25 Mar 2003 02:57:50 +0000
> Subject: [Zope-CMF] Linux Test Results - CMF - OK :-)
>
> ============================================================================
> ==
> ============================================================================
> ==
> Python Version:2.1.3 (#1, May 20 2002, 12:02:16)
> [GCC 2.95.2 20000220 (Debian GNU/Linux)]
>
> Modules included:
> Zope (Zope-2_6-branch)
> CMF (HEAD)
>
> ............................................................................
> ............................................................................
> ............................................................................
> ............................................................................
> ....................
> ----------------------------------------------------------------------
> Ran 324 tests in 38.286s
>
> OK
>
>
>
>
> --__--__--
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> http://www.zope.org/Products/PTK/Tracker for bug reports and feature
> requests
>
> End of Zope-CMF Digest
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
--
Andrew Yochum
Digital Pulp, Inc.
212.679.0676x255
andrew@digitalpulp.com