[Zope] Values lost when restarting

Jonas Nielsen jonasn at mail.tele.dk
Tue Jan 9 11:06:24 EST 2007


Hi this is probably a little vague but any help is appreciated.

I'm developing on an old zope application, which I ported from zope 
2.5.1 to zope 2.9. The application seems like it's based on the 
addressbook application in the "Zope Bible"

The application is a tool for localization, where translators can log in 
and edit "translation resources" in "resource folders"

I made a function to export all these resources to a csv-file and one to 
import the values in the zodb again.

the text are set using a function on the resource calling
   	
def setText(self,language,text, REQUEST=None):
       # ... some stuff
       self.texts[language] = text

The function works fine and updates the values correctly. But after I 
restart zope all the changes are lost. This not so when calling the 
function from the Resource objects web form.

The "Zope Bible" says something about calling self.__changed__(1) after 
updating the value but this doesn't seem to work even though the objects 
inherits from "Persistent"

When importing I fetch the object by using the RestrictedTraverse 
function, that's really the only difference I can see.

Please write if you have ANY idea of what could be the problem.



More information about the Zope mailing list