Hi How do I change the meta_type for an object in the ZMI from within Zope? An instance of a product I have built (inheriting from the the Folder Product) has become inaccessible after adding a lot of data. Essentially this is a product to archive text strings in a specific format and has worked fine for months. The problem has lead to corruption of the Data.fs file (and fsrecovery.py did not find anything to recover). I had a few backups from which I was able to recover the rest of the site and of the archive in a previous state, but had to go back 3 days. The backup from the day before the corruption does have the object in the ZMI tree, but now Zope thinks this is a normal Folder and when I try to access it, gives me attribute errors. When I attempt an XML download, although there are errors, I can see all the archived texts in the text that is appearing in my browser, however they are embedded in chaotic-looking text garbage, so I can't find a way to extract them by script. (And there are about 5000 missing texts, so copy and paste would take days!) I was wondering if I could just alter the meta_type for the object from within Zope, maybe through a python script and see if that makes the object accessible again. I can't find anything on how to change the meta_type for an existing object though. Any help very appreciated. Cheers David
David wrote:
I was wondering if I could just alter the meta_type for the object from within Zope, maybe through a python script and see if that makes the object accessible again. I can't find anything on how to change the meta_type for an existing object though.
This is likely ot be the wrong way to go about it. You need to put the code for the class of object with the problems back in a state it was when things were last working. Changing meta_type, or worse still, trying to change the class of a persistent object will lead to much pain and suffering... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
David