Re: silva metadata: changing properties
Reinhard Hess <[email protected]>
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
Marc Petitmermet wrote: > dear developer > > using the workaround for listfields in my self-made metadataset which > guido suggested last week (did i already mention that i don't like this > workaround;-) i categorized all my sila documents. today i found out > that i made one of those silly typos in the listfields :-( > > it is not possible to just correct the typo in the metadataset because > now, silva throws up a zope error every time when looking up the > properties tab. apart from recreating all documents the only workaround > i've found so far was to reinsert the list element with the same typo, > add an additional element without the typo, reassign all properties to > the element without the typo and then, at the very end, remove the > element with the typo from the metadataset. Of course you cannot assign a certain category, then remove the category (for whatever reason) and all of a sudden some documents own a property which doesn't exist any more. That would be a bad situation. Maybe we find a better procedure than just throwing an exception, but at least the worst case of part of the documents having properties which don't exist any more was inhibited. needless to say that this is > very inconvenient for large sites and sites with many self-made > metadatasets/elements (e.g. eth zurich). You did not even bring up this issue up at ETH Zurich as usual and we could not discuss it together as we do usually. So maybe you might be so kind not to mention ETH Zurich as an example before we discuss it and come to decision which might be not exactly the one you are proposing. The findings could be different from yours, can it ? metadatasets can evolve and > change with time... Of course. But this is not the case that you are describing above. > > instead of a zope error, could you catch this error and display a > message such as "sorry, because of an error the properties have been > reset. please reassign the proper values." and reset all properties of > all self-made metadatasets to the default or inherited ones. This "autocorrection" might not be what you always want. If documents have a property which you - if I understand it right - remove all of a sudden (because of typo of yours, but that could be also any other reason, an erronous removal for example as well) then I expect that this throws an exception. And maybe I do not want that now missing metadata field is changed on all the documents AUTOMATICALLY to some casual value. I have experienced both cases (that I wanted to change a category after some time deliberatly and that I changed categories by error) in the environment of the issue tracker. In one case it gave me the work to do which you mention, but in the other case I was happy that there was no "Automatic Correction". There might be a better way which could suit both cases. maybe you > know exactly where the error occurred and you could reset this metadata > element only and inform the user about it. No implicit automatic reset. I prefer definitely: "Explicit is better than implicit". maybe there is an even easier > way to solve this problem? > > regards, > marc > Regards, Reinhard -- Reinhard Hess Email: [email protected] Phone: +41-(0)1-632 30 86 Fax: +41-(0)1-632 13 12 ETH Zuerich Informatikdienste Technologie- und Informationsmanagement ETH-Zentrum WEP J17 Weinbergstrasse 109 CH-8092 Zuerich