Getting rid of orphaned AT content instances

2 messages Options
Embed this post
Permalink
Ken Winter () Getting rid of orphaned AT content instances
Reply Threaded More More options
Print post
Permalink
I think some instances of an AT content type that I removed are still persisting in my ZODB.  I'm wondering if Zope or Plone has any kind of garbage collector that will get rid of them.

Some details:

The name of the deleted content type is "rdb_my_contact_info".

The issue first arose when I tried to export/import the Plone site that used to contain "rdb_my_contact_info" from one Zope instance to another.  I got the error message 'No module named rdb_my_contact_info'.

So I did everything I could to expunge all references to "rdb_my_contact_info" from my site: reinstalling, deleting files, rebuilding catalogs, etc.  

Then I ran grep on the whole Plone Products directory in my file system.  It confirmed that "rdb_my_contact_info" was gone from there.  However, when I grep'd the ZODB file (Data.fs) and the export file I had generated (export.zexp), I found that they contained, respectively, 11 and 3 occurrences of "rdb_my_contact_info".

Here's a file with the grep output from the export file: my_contact_info_in_groups_zexp.txt.  The file shows the grep command, then the output.  To make this binary file more legible, I stuck a row of **** before each occurrence of "rdb_my_contact_info".  The other readable names in (the nearly identical) contexts of these 3 occurrences are mostly the names of fields in the "rdb_my_contact_info" content type's schema.

The Data.fs grep report looks similar; the extra 8 occurrences of "rdb_my_contact_info" seem to be some subordinate content objects (which were linked into "rdb_my_contact_info" by DatagridFields).

The "Find" tabs inside of my ZMI are of no use in locating these references.  Searching the whole Zope instance for "rdb_my_contact_info", they find nothing.

The reason I suspect these references to "rdb_my_contact_info" are orphaned instances (rather than some other kind of garbage) is that, when I go in the ZMI to archetype_tool/UIDs tab (hoping to rebuild this list), I get "AttributeError: 'NoneType' object has no attribute 'title_or_id'" (see full traceback below).

By the way, I can get around the import error by temporarily reinstalling the "rdb_my_contact_info" content type, doing the export and import, and then deleting "rdb_my_contact_info" again (in both Zope instances).  But this is not a comfortable workaround as my project moves toward production.

Can you help me find and eliminate these objects, or whatever they are?

~ TIA
~ Ken

P.S. The traceback:  

2009-01-05T14:26:01 ERROR Zope.SiteErrorLog http://c.05.luxor.highspeedrails.com/groups/archetype_tool/manage_uids
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.PageTemplates.PageTemplateFile, line 113, in _exec
  Module Products.PageTemplates.PageTemplate, line 104, in pt_render
   - <PageTemplateFile at /groups/archetype_tool/manage_uids>
  Module TAL.TALInterpreter, line 238, in __call__
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 691, in do_loop_tal
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 715, in do_condition
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 457, in do_optTag_tal
  Module TAL.TALInterpreter, line 442, in do_optTag
  Module TAL.TALInterpreter, line 437, in no_tag
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 531, in do_insertText_tal
  Module Products.PageTemplates.TALES, line 227, in evaluateText
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: manage_uids
   - Line 31, Column 8
   - Expression: <PythonExpr object.getObject().title_or_id()>
   - Names:
      {'container': <ArchetypeTool at /groups/archetype_tool>,
       'context': <ArchetypeTool at /groups/archetype_tool>,
       'default': <Products.PageTemplates.TALES.Default instance at 0x8f01b0c>,
       'here': <ArchetypeTool at /groups/archetype_tool>,
       'loop': <Products.PageTemplates.TALES.SafeMapping object at 0x10183ccc>,
       'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x8f6e04c>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0x10183ccc>,
       'request': <HTTPRequest, URL=http://c.05.luxor.highspeedrails.com/groups/archetype_tool/manage_uids>,
       'root': <Application at >,
       'template': <PageTemplateFile at /groups/archetype_tool/manage_uids>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'zadmin'>}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: object.getObject().title_or_id()
  Module Python expression "object.getObject().title_or_id()", line 1, in <expression>
  Module AccessControl.ImplPython, line 688, in guarded_getattr
AttributeError: 'NoneType' object has no attribute 'title_or_id'

Alexander Limi () Re: Getting rid of orphaned AT content instances
Reply Threaded More More options
Print post
Permalink
You have tried using the Find tab in the ZMI and looing for this content  
type?

On Tue, 06 Jan 2009 12:31:36 -0800, Ken Winter  
<[hidden email]> wrote:

>
> I think some instances of an AT content type that I removed are still
> persisting in my ZODB.  I'm wondering if Zope or Plone has any kind of
> garbage collector that will get rid of them.
>
> Some details:
>
> The name of the deleted content type is "rdb_my_contact_info".
>
> The issue first arose when I tried to export/import the Plone site that  
> used
> to contain "rdb_my_contact_info" from one Zope instance to another.  I  
> got
> the error message 'No module named rdb_my_contact_info'.
>
> So I did everything I could to expunge all references to
> "rdb_my_contact_info" from my site: reinstalling, deleting files,  
> rebuilding
> catalogs, etc.
>
> Then I ran grep on the whole Plone Products directory in my file  
> system.  It
> confirmed that "rdb_my_contact_info" was gone from there.  However, when  
> I
> grep'd the ZODB file (Data.fs) and the export file I had generated
> (export.zexp), I found that they contained, respectively, 11 and 3
> occurrences of "rdb_my_contact_info".
>
> Here's a file with the grep output from the export file:
> http://n2.nabble.com/file/n2119234/my_contact_info_in_groups_zexp.txt
> my_contact_info_in_groups_zexp.txt .  The file shows the grep command,  
> then
> the output.  To make this binary file more legible, I stuck a row of ****
> before each occurrence of "rdb_my_contact_info".  The other readable  
> names
> in (the nearly identical) contexts of these 3 occurrences are mostly the
> names of fields in the "rdb_my_contact_info" content type's schema.
>
> The Data.fs grep report looks similar; the extra 8 occurrences of
> "rdb_my_contact_info" seem to be some subordinate content objects (which
> were linked into "rdb_my_contact_info" by DatagridFields).
>
> The "Find" tabs inside of my ZMI are of no use in locating these  
> references.
> Searching the whole Zope instance for "rdb_my_contact_info", they find
> nothing.
>
> The reason I suspect these references to "rdb_my_contact_info" are  
> orphaned
> instances (rather than some other kind of garbage) is that, when I go in  
> the
> ZMI to archetype_tool/UIDs tab (hoping to rebuild this list), I get
> "AttributeError: 'NoneType' object has no attribute 'title_or_id'" (see  
> full
> traceback below).
>
> By the way, I can get around the import error by temporarily reinstalling
> the "rdb_my_contact_info" content type, doing the export and import, and
> then deleting "rdb_my_contact_info" again (in both Zope instances).  But
> this is not a comfortable workaround as my project moves toward  
> production.
>
> Can you help me find and eliminate these objects, or whatever they are?
>
> ~ TIA
> ~ Ken
>
> P.S. The traceback:
>
> 2009-01-05T14:26:01 ERROR Zope.SiteErrorLog
> http://c.05.luxor.highspeedrails.com/groups/archetype_tool/manage_uids
> Traceback (innermost last):
>   Module ZPublisher.Publish, line 115, in publish
>   Module ZPublisher.mapply, line 88, in mapply
>   Module ZPublisher.Publish, line 41, in call_object
>   Module Shared.DC.Scripts.Bindings, line 311, in __call__
>   Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
>   Module Products.PageTemplates.PageTemplateFile, line 113, in _exec
>   Module Products.PageTemplates.PageTemplate, line 104, in pt_render
>    - <PageTemplateFile at /groups/archetype_tool/manage_uids>
>   Module TAL.TALInterpreter, line 238, in __call__
>   Module TAL.TALInterpreter, line 281, in interpret
>   Module TAL.TALInterpreter, line 691, in do_loop_tal
>   Module TAL.TALInterpreter, line 281, in interpret
>   Module TAL.TALInterpreter, line 715, in do_condition
>   Module TAL.TALInterpreter, line 281, in interpret
>   Module TAL.TALInterpreter, line 457, in do_optTag_tal
>   Module TAL.TALInterpreter, line 442, in do_optTag
>   Module TAL.TALInterpreter, line 437, in no_tag
>   Module TAL.TALInterpreter, line 281, in interpret
>   Module TAL.TALInterpreter, line 531, in do_insertText_tal
>   Module Products.PageTemplates.TALES, line 227, in evaluateText
>   Module Products.PageTemplates.TALES, line 221, in evaluate
>    - URL: manage_uids
>    - Line 31, Column 8
>    - Expression: <PythonExpr object.getObject().title_or_id()>
>    - Names:
>       {'container': <ArchetypeTool at /groups/archetype_tool>,
>        'context': <ArchetypeTool at /groups/archetype_tool>,
>        'default': <Products.PageTemplates.TALES.Default instance at
> 0x8f01b0c>,
>        'here': <ArchetypeTool at /groups/archetype_tool>,
>        'loop': <Products.PageTemplates.TALES.SafeMapping object at
> 0x10183ccc>,
>        'modules':  
> <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
> instance at 0x8f6e04c>,
>        'nothing': None,
>        'options': {'args': ()},
>        'repeat': <Products.PageTemplates.TALES.SafeMapping object at
> 0x10183ccc>,
>        'request': <HTTPRequest,
> URL=http://c.05.luxor.highspeedrails.com/groups/archetype_tool/manage_uids>,
>        'root': <Application at >,
>        'template': <PageTemplateFile at  
> /groups/archetype_tool/manage_uids>,
>        'traverse_subpath': [],
>        'user': <PropertiedUser 'zadmin'>}
>   Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
>    - __traceback_info__: object.getObject().title_or_id()
>   Module Python expression "object.getObject().title_or_id()", line 1, in
> <expression>
>   Module AccessControl.ImplPython, line 688, in guarded_getattr
> AttributeError: 'NoneType' object has no attribute 'title_or_id'
>



--
Alexander Limi · http://limi.net


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users
Alexander Limi · http://limi.net