Re: [Zope] Clarification: uncatalog_object question

2006-10-11 Thread Jonathan

Thanks for the response Chris, but it is about 2 years too late!

If you look at the email source you will see my original post was dated from 
2004.  I have been getting several zope mails from 2004, the mailman must be 
pooched!


Thanks for the effort though!

Jonathan


- Original Message - 
From: Chris Withers [EMAIL PROTECTED]

To: Jonathan Hobbs [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Tuesday, October 10, 2006 6:44 AM
Subject: Re: [Zope] Clarification: uncatalog_object question



Jonathan Hobbs wrote:
I used catalog-aware objects and just deleted the object in the folder 
and

the object was automatically removed from the zcatalog).


I don't understand why the uid of 1049298593 works in retrieving the 
record

from the zcatalog, but not when used to delete the record from the
zcatalog?!  (I have looked at the code in Catalog.py and nothing in the
uncatalog_object method provides any hints as to why this problem is
occuring).


Be careful the difference between the internal document id used by the 
catalog and the identifier the object was catalogued with.


The latter is the physical path of the object unless you specify it...

The latter is also what you need to pass to uncatalog an object...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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 )




___
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 )


Re: [Zope] Clarification: uncatalog_object question

2006-10-10 Thread Chris Withers

Jonathan Hobbs wrote:

I used catalog-aware objects and just deleted the object in the folder and
the object was automatically removed from the zcatalog).


I don't understand why the uid of 1049298593 works in retrieving the record
from the zcatalog, but not when used to delete the record from the
zcatalog?!  (I have looked at the code in Catalog.py and nothing in the
uncatalog_object method provides any hints as to why this problem is
occuring).


Be careful the difference between the internal document id used by the 
catalog and the identifier the object was catalogued with.


The latter is the physical path of the object unless you specify it...

The latter is also what you need to pass to uncatalog an object...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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 )


[Zope] Clarification: uncatalog_object question

2006-10-09 Thread Jonathan Hobbs
Typo in dtml-in statement...

 I have a ZCatalog which contains about 850k entries. Each entry is a
zclass
 instance which is NOT 'catalog aware' (ie. catalog_object was used to
 explicitly add the record to the zcatalog).

 The records exist in the zcatalog and I can access a single record's
 data_record_id_ by:

 dtml-call REQUEST.set('recid', '1049298593')
 dtml-in Catalog({'master_recid' : recid})
dtml-call REQUEST.set('drid', data_record_id_)
 /dtml-in
 drid= dtml-var drid

Incorrect (typo):
dtml-in Catalog({'master_recid' : recid})

Corrected:
dtml-in Catalog({'id' : recid})



 Displays:

 drid= 17223047659

 All is well, so far... I now want to remove the record from the ZCatalog:

 dtml-call Catalog.uncatalog_object(recid)

 generates the following error in my log file:

 2004-07-02T11:13:07 ERROR(200) Catalog uncatalogObject unsuccessfully
 attempted to uncatalog an object with a uid of 1049298593.

 and

 dtml-call Catalog.uncatalog_object(drid)

 generates the following error in my log file:

 2004-07-02T11:21:07 ERROR(200) Catalog uncatalogObject unsuccessfully
 attempted to uncatalog an object with a uid of 1722304759.

 So, how do you remove a 'non-catalog aware' object from a zcatalog? (this
is
 the first time I have used non-catalog aware instances, in previous
projects
 I used catalog-aware objects and just deleted the object in the folder and
 the object was automatically removed from the zcatalog).

I don't understand why the uid of 1049298593 works in retrieving the record
from the zcatalog, but not when used to delete the record from the
zcatalog?!  (I have looked at the code in Catalog.py and nothing in the
uncatalog_object method provides any hints as to why this problem is
occuring).

Any ideas would be really appreciated!

Thanks,

Jonathan




___
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 )