Ticket #857 (closed Bug: fixed)

Opened 2 years ago

Last modified 19 months ago

[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

publish-draft-fix.variant-A.patch (3.7 KB) - added by Matthias Bauer <matthias.bauer.drs@…> 2 years ago.
patch variant A
publish-draft-fix.variant-B.patch (4.2 KB) - added by Matthias Bauer <matthias.bauer.drs@…> 2 years ago.
patch variant B

Change History

Changed 2 years ago by Matthias Bauer <matthias.bauer.drs@…>

patch variant A

Changed 2 years ago by Matthias Bauer <matthias.bauer.drs@…>

patch variant B

comment:1 Changed 19 months ago by paul

  • Status changed from new to closed
  • Resolution set to fixed

In [5913]:

fixes #857. Applying patch by Matthias Bauer. Users can always change the version state through the versions UI but this solution does aid the user experience.

Note: See TracTickets for help on using tickets.