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

Blocks that no longer exist on the latest draft shouldn't show a "View Block" link in history #508

Open
ScopeyNZ opened this issue Nov 19, 2018 · 6 comments

Comments

@ScopeyNZ
Copy link
Contributor

Affected Version

3.x, 4.x

Description

Currently when viewing the history of a page with an elemental area you can see blocks that were deleted in the past. At the moment these blocks still show a "View Block >" link even though they shouldn't be edited. This should just be removed

Steps to reproduce

  • Open a blocks page
  • Add a few blocks and publish the page
  • Delete a block and publish the page
  • View the history for the page and view a version that had your deleted block in it
  • Observe the "View block >" link that shouldn't be there.

cc @sachajudd

@robbieaverill
Copy link
Contributor

I think the intention of that link is to view the contents of that block at that version in the archive, not to edit it

@thats4shaw
Copy link
Contributor

A side effect I'm experiencing on 3.x is that when clicking on the 'View Block' link for a deleted block it throws an [Emergency] Uncaught BadMethodCallException: Object->__call(): the method 'forTemplate' does not exist on 'SilverStripe\View\ArrayData' error.

@robbieaverill
Copy link
Contributor

@ScopeyNZ I'm not sure I agree with you on this one. The history view only shows one level deep of blocks - if you remove this link then you'll have no way of viewing nested data for that record at that time. The expectation should be that it opens in a readonly view mode when you click on "View block" - I'm not sure what it does at the moment. If it's opening an edit form then that's probably incorrect behaviour.

@ScopeyNZ
Copy link
Contributor Author

The original designs called for it to open a different history viewer specific to that block. Currently it just takes you to the edit form of the block.

I'd love the original design but it hasn't been implemented yet 🙁

@brynwhyman
Copy link

Side note, I'm getting a 405 Method Not Allowed on my local when I click the 'View block' link (.../admin/pages/edit/EditForm/27). Also, I wouldn't assume to edit a block after clicking "View block"

@brynwhyman
Copy link

We're expecting this to be redundant after #233

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