wrong last author of published document in properties tab

Bug #109007 reported by Marc Petitmermet on 2007-04-22
Affects Status Importance Assigned to Milestone

Bug Description

1. create new version of published document
2. save it
3. go to properties tab and note that the last author for the **PUBLIC** version was changed. but we did not change the public version; we changed the new version.

this is probably only a small smi bug using the last author of the current version instead of the published version. there is no such error in the publish tab.

Kit Blake (kitblake) on 2007-04-29
Changed in silva:
status: Unconfirmed → Confirmed
assignee: nobody → kitblake
Changed in silva:
assignee: kitblake → aaltepet
Andy Altepeter (aaltepet) wrote :

this is something I will look into once I get WingIDE, which has a nicer interactive debugger.

Doing a cursory test using zopectl debug with a Silva trunk buildout after performing the steps above, I found that the last author of the viewable version of a document is the last author of the editable version of the content. So, it appears to be deeper than a small smi UI bug.

Changed in silva:
importance: Undecided → Low
importance: Low → Medium
Andy Altepeter (aaltepet) wrote :

ok, I found the problem. The lastauthor metadata field's TALES default expression is:

Version objects don't inherit the Silva Security class, VersionedContent does. So, while 'content' may be the published version, sec_get_last* is part of Document. This method gets the previewable (editable) version's last author info.

Not quite sure how to fix this without doing some major changes. Here are a few options. Recall the lastauthorinfo is actually stored on the Version, so:
1) implement a VersionSecurity class, which Version inherits, and contains implementations for the Version. We'd need to audit the Security class to determine which ones to override with version implementations, or perhaps add sec_get_version_last_author_info and such. I'm not sure I like either of these possibilities.
2) add a 'version' parameter to Security.sec_get_last_author_info. The version could be the version id, or a version object, or a string representing which version (last_closed, published, editable, previewable, etc). The metadata field TALES could be changed to:

Changed in silva:
assignee: aaltepet → thisfred
Changed in silva:
assignee: thisfred → wim-boucquaert
Andy Altepeter (aaltepet) wrote :

I'd like to look at option 2, adding a 'version' parameter to sec_get_last_author_info

Changed in silva:
assignee: Wim Boucquaert (wim-boucquaert) → Andy Altepeter (aaltepet)
Andy Altepeter (aaltepet) wrote :

this is now fixed in the silva trunk. It does require a change to the silva-extra metadata, which will happen when you upgrade in the extensions service.

Changed in silva:
assignee: Andy Altepeter (aaltepet) → nobody
status: Confirmed → Fix Committed
Changed in silva:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers