Comment 10 for bug 101759

Revision history for this message
Eric Casteleijn (thisfred) wrote :

This is a beauty, took me a good while to track down:

We have access handlers for the metadata of ghosts, which means that if the
metadata binding for a ghost is called, it passes through that accesshandler,
which returns the metadata of the target instead.

That is obviously a huge problem when we get the binding when we want to *WRITE
TO IT*.

What I don't get, is why this behavior is new: both the handlers, and the way
the code calls them are ancient. Benno, can you confirm this is not the case in
1.5? The way to trigger the behavior is to click the 'save reference' button on
the ghost, and see whether the target document's modification date is changed
after that.

To assist my own memory:

The offending call comes from Security.py lines 260-267:

            try:
                binding = self.service_metadata.getMetadata(version)
            except BindingError:
                return
            if binding is None:
                return
            now = DateTime()
            binding.setValues('silva-extra', {'modificationtime': now})