Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When archiving a block it needs to be unpublished first #678

Closed
clarkepaul opened this issue Jun 9, 2019 · 9 comments
Closed

When archiving a block it needs to be unpublished first #678

clarkepaul opened this issue Jun 9, 2019 · 9 comments

Comments

@clarkepaul
Copy link

clarkepaul commented Jun 9, 2019

The archive action for a block needs to unpublish a block prior to archiving it, otherwise the block will remain published with no way to unpublish it. It should follow the same process as pages being archived "Unpublish and archive".

I was sure this issue already existed so delete this if it has already been resolved...

Notes

  • This is currently using an OOB GraphQL query to archive immediately.
  • We'll look at how to use core features and potentially improve them to unpublish versioned objects before archiving.
  • Expect we may address this in versioned and elemental.
@korthjp17
Copy link

We just ran into this issue too. The block was gone on the draft version of the site, but showing on the Live site. If you have a block that gets archived but not unpublished, you can publish the page and it seems to get removed from the Live table. Still a weird UX though.

@robbieaverill
Copy link
Contributor

If I’m reading this correctly, this is expected behaviour.

If you have a page with three blocks on it, all published, and you archive one of them, that should put the page into a modified state where the block is removed, but the published state should still have the block in it because you haven’t published the page again yet.

If unpublishing and archiving a block does not modify the state of the page but still removes the block from the live site, that would not be correctly respecting versioning.

@korthjp17
Copy link

The 2 instances we ran into this morning didn't show any state change for the page itself. It looked like the page was published and there were no changes.

@robbieaverill
Copy link
Contributor

That is actually a core issue, see silverstripe/silverstripe-versioned#195

@clarkepaul
Copy link
Author

This issue is more of a UX issue of informing users (or safeguarding them) of unexpected behaviour. Following the page archive patterns should make the whole process clearer.

@clarkepaul
Copy link
Author

clarkepaul commented Aug 14, 2019

Moving my comment from issue #707 here.
Seeing as the label is quite long as "Unpublish and archive" I'd actually prefer if we kept the label as "Archive" and the success message changes to say something like "Successfully unpublished and archived".

I think users would be expecting it to be removed from the site anyway.
I think we can look to shorten the "Unpublish and archive" label for pages as well.

@ScopeyNZ
Copy link
Contributor

I've raised a fix on the silverstripe/silverstripe-versioned repository as it's not limited to just blocks, it's any consumer of the GraphQL delete mutation that's affected.

@robbieaverill
Copy link
Contributor

I'd expected/hoped it would be this kind of fix, nice!

@ScopeyNZ ScopeyNZ removed their assignment Aug 22, 2019
@robbieaverill
Copy link
Contributor

Fixed upstream in the versioned repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants