Ticket #857 (closed Bug: fixed)
[PATCH] "Publish immediately" doesn't make published document live when there are no content changes
| Reported by: | Matthias Bauer <matthias.bauer.drs@…> | Owned by: | somebody |
|---|---|---|---|
| Priority: | Blocker | Milestone: | 2.5 |
| Component: | Repository | Version: | 2.4 |
| Keywords: | PIT | Cc: |
Description
"Published" versions aren't made live, if there were no changes to the document itself. This happens when the user does the following:
- Edit a document in the wiki editor (doing changes)
- Deselect the "publish immediately" option (This is equivalent to a user who doesn't have publish permisions.)
- Save the document.
==> This will result in a new draft version. (Still correct)
- Open the same document in the editor
- Select "publish immediately"
- Don't do any changes to the document
- Hit the "Save" button
==> This will result in the previous version being made "publish" (was "draft" before). (Still correct)
==> But this version will not be made "live" as it should be.
I've attached two patch variants:
- Variant A adds the necessary checking to the repository server (LocalDocumentStrategy?.store() and DocumentVariantImpl?.needsSaving()). This patch obviously changes the behavior of the repository server, but it still passes the regression tests.
- Variant B does the changes in wiki editor (DocumentEditorApple?.saveAndCloseEditor()). The patch unfortunately needs an additional save() operation on the document. Therefore it's less elegant then variant A.
Personally, I'd prefer variant A.
Attachments
Change History
Changed 2 years ago by Matthias Bauer <matthias.bauer.drs@…>
- Attachment publish-draft-fix.variant-A.patch added
Changed 2 years ago by Matthias Bauer <matthias.bauer.drs@…>
- Attachment publish-draft-fix.variant-B.patch added
patch variant B
Note: See
TracTickets for help on using
tickets.
patch variant A