How to get the download window option for file widget field?
Dear All, I have created one ARCHETYPE having few fields for FileWidget, to upload the file. Problem::In the base view page i want to get the download window option(same like when u try to download a file) while clicking on link to download those file contents *****Code which I have given in archetype for FILE****** FileField('reserveform', searchable=1, required=0, schemata='DetailedInfo3', widget=FileWidget(label='Reservation Form')) FileField('enquiry', searchable=1, required=0, schemata='DetailedInfo5', widget=FileWidget(label='Enquiry Form')) ************************ ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
I have encountered an unusual situation which I believe may be related to collector item #505 (http://www.zope.org/Collectors/Zope/505 - ZCTextUndex should not hold a reference to a lexicon). Prior to performing a ZCatalog update I cleared the catalog (using the clear catalog option under the Advanced tab of the ZMI); then, to clear out the Lexicon, I deleted the Lexicon and created a new Lexicon (id of both was 'Lexicon'). I then added about 805,000 records to the ZCatalog (which went smoothly) and tested catalog searches - all went well, including globbing searches, 'and', 'and not' searches. The previous Lexicon had 764,410 word entries. The current Lexicon has 0 word entries. The ZCatalog and ZCTextIndex appear to be working ok, so I am guessing that somehow the ZCTextIndex is using a 'hidden/old' version of the Lexicon (not the newly created version) - which is very strange, as the .fs file was packed prior to the update (so any old versions should have been deleted). This activity was all performed on a linux server running zope 2.6.1 Finally, the questions: 1) Can ZCTextIndex really be using the some other version of the Lexicon (which I can not access via the ZMI)? 2) Was Collector Item #505 ever fixed (I can not find a reference to issue #505 in any of the zope change logs)? Thanks, Jonathan
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jonathan wrote:
I have encountered an unusual situation which I believe may be related to collector item #505 (http://www.zope.org/Collectors/Zope/505 - ZCTextUndex should not hold a reference to a lexicon).
Prior to performing a ZCatalog update I cleared the catalog (using the clear catalog option under the Advanced tab of the ZMI); then, to clear out the Lexicon, I deleted the Lexicon and created a new Lexicon (id of both was 'Lexicon').
I then added about 805,000 records to the ZCatalog (which went smoothly) and tested catalog searches - all went well, including globbing searches, 'and', 'and not' searches.
The previous Lexicon had 764,410 word entries. The current Lexicon has 0 word entries.
The ZCatalog and ZCTextIndex appear to be working ok, so I am guessing that somehow the ZCTextIndex is using a 'hidden/old' version of the Lexicon (not the newly created version) - which is very strange, as the .fs file was packed prior to the update (so any old versions should have been deleted).
This activity was all performed on a linux server running zope 2.6.1
Finally, the questions:
1) Can ZCTextIndex really be using the some other version of the Lexicon (which I can not access via the ZMI)?
Yes, it can. The ZCTextIndex holds an attribute, 'index', which is an instance of either OkapiIndex or CosineIndex. That subobject also holds a reference to the lexicon, which is the reason for the collector follow-up: = Comment - Entry #2 by Caseman on Aug 14, 2002 5:45 pm Partial fix in place. I still need to resolve the deeper reference held in the actual index object that ZCTextIndex delegates to (more fun and games)
2) Was Collector Item #505 ever fixed (I can not find a reference to issue #505 in any of the zope change logs)?
No, it has not been fixed. The workaround in your case is to delete the entire ZCTextIndex, re-add it, and re-index your content. You might be able to revivify the current lexicon by opening the database yourself, but the risk / reward ratio is pretty steep, compared to just recreating the index. Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC3nIO+gerLs4ltQ4RAsPKAJ4woaBODws9bZeoZ3AklTrrL/w1FgCfVhmb spNBGhNwM8QfAWeAd7LySQI= =nwRs -----END PGP SIGNATURE-----
Thanks for the info Tres. For now I will leave the ZCatalog/ZCTextIndex as-is (I don't really need to access the Lexicon via the ZMI - it is just nice to check how many entries the indexing process has created), and will 'delete/re-create' the Lexicon AND the ZCTextIndex during next months update cycle. Thanks again, Jonathan ----- Original Message ----- From: "Tres Seaver" <tseaver@palladion.com> To: <zope@zope.org> Sent: Wednesday, July 20, 2005 11:47 AM Subject: [Zope] Re: ZCTextIndex - Collector Item #505?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jonathan wrote:
I have encountered an unusual situation which I believe may be related to collector item #505 (http://www.zope.org/Collectors/Zope/505 - ZCTextUndex should not hold a reference to a lexicon).
Prior to performing a ZCatalog update I cleared the catalog (using the clear catalog option under the Advanced tab of the ZMI); then, to clear out the Lexicon, I deleted the Lexicon and created a new Lexicon (id of both was 'Lexicon').
I then added about 805,000 records to the ZCatalog (which went smoothly) and tested catalog searches - all went well, including globbing searches, 'and', 'and not' searches.
The previous Lexicon had 764,410 word entries. The current Lexicon has 0 word entries.
The ZCatalog and ZCTextIndex appear to be working ok, so I am guessing that somehow the ZCTextIndex is using a 'hidden/old' version of the Lexicon (not the newly created version) - which is very strange, as the .fs file was packed prior to the update (so any old versions should have been deleted).
This activity was all performed on a linux server running zope 2.6.1
Finally, the questions:
1) Can ZCTextIndex really be using the some other version of the Lexicon (which I can not access via the ZMI)?
Yes, it can. The ZCTextIndex holds an attribute, 'index', which is an instance of either OkapiIndex or CosineIndex. That subobject also holds a reference to the lexicon, which is the reason for the collector follow-up:
= Comment - Entry #2 by Caseman on Aug 14, 2002 5:45 pm
Partial fix in place. I still need to resolve the deeper reference held in the actual index object that ZCTextIndex delegates to (more fun and games)
2) Was Collector Item #505 ever fixed (I can not find a reference to issue #505 in any of the zope change logs)?
No, it has not been fixed. The workaround in your case is to delete the entire ZCTextIndex, re-add it, and re-index your content. You might be able to revivify the current lexicon by opening the database yourself, but the risk / reward ratio is pretty steep, compared to just recreating the index.
Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC3nIO+gerLs4ltQ4RAsPKAJ4woaBODws9bZeoZ3AklTrrL/w1FgCfVhmb spNBGhNwM8QfAWeAd7LySQI= =nwRs -----END PGP SIGNATURE-----
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Try the Plone mailing list. That's where they discuss archetypes a lot. On 7/20/05, praveen kumar nagle <online_prav@yahoo.com> wrote:
Dear All,
I have created one ARCHETYPE having few fields for FileWidget, to upload the file.
Problem::In the base view page i want to get the download window option(same like when u try to download a file) while clicking on link to download those file contents
*****Code which I have given in archetype for FILE****** FileField('reserveform', searchable=1, required=0, schemata='DetailedInfo3', widget=FileWidget(label='Reservation Form'))
FileField('enquiry', searchable=1, required=0, schemata='DetailedInfo5', widget=FileWidget(label='Enquiry Form'))
************************
____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
participants (4)
-
Jonathan -
Peter Bengtsson -
praveen kumar nagle -
Tres Seaver