WebDAV MKCOL (was: [Zope-CMF] UnpickleableError)

seb bacon seb@jamkit.com
Fri, 25 May 2001 13:08:55 +0100


Thanks to everyone for the hints, you were all right.  Specifically, I
was changing the File's title in manage_afterAdd like this:
self.title=self.id; a schoolboy error :-)  I can't believe it took a
whole day to track down...

Now I'm working on the fact that MKCOL doesn't work.  

Firstly, there's no provision in NullResource for MKCOL to create
anything other than an OFS.Folder.  Since there's no way of
differentiating between different *types* of folder, I figured a MKCOL
factory wouldn't be of much use.  Instead, would it be a sensible
policy always to create collection of the same type as the enclosing
collection? 

Furthermore, because the current implementation assumes you're adding
folders, it also assumes you need the 'Add Folder' permission, so the
_verifyObjectPaste hack used in the NullResource PUT methods needs to
be used too.

Would this be a reasonable approach?

seb

* Shane Hathaway <shane@digicool.com> [010524 20:03]:
> seb bacon wrote:
> > 
> > OK, a bit more info, although it's just as confusing to me...
> > 
> > The failure happens in line 386 of Connection.py:
> > 
> >   dump(state)
> 
> I would add a print statement here.  UnpickleableErrors occur because
> something is added to a persistent object that can't be pickled, such as
> a function, an acquisition wrapper, etc.  "print state" should reveal
> the contents of the state.
> 
> Shane

-- 

   [] j a m k i t 
           
        seb bacon
T:  020 7749 7218
F:  020 7739 8683
M:  07968 301 336
W: www.jamkit.com