Skip to content

Files archived before configuring keep_archived_assets show back next buttons which lead to edit screen. #352

@asecondwill

Description

@asecondwill

Module version(s) affected

2.2.1

Description

Adding keep_archived_assets to the site config on an existing site with archived files leads to this behaviour:

  • Files are shown in the File tab of Archive section.
  • Newly archived files have a restore button.
  • Old archived files:
    • do not have a restore button
    • their save button is disabled.
    • They have back and next record buttons

Clicking the next button, and then back buttons leads to the save button being enabled, and the url is now changed

From list, with save disabled:
admin/archive/SilverStripe-Assets-File/EditForm/field/Files/item/739/view

After navigating with back next:
admin/archive/SilverStripe-Assets-File/EditForm/field/Files/item/739

The ability to save not-kept files confusing our users and allows errors:

When we save an old file, it gets removed from the Archive/Files list. Since the file is not recoverable, we get an error when we try to publish the file.

it then gives a new error when trying to rearchive it.

How to reproduce

  1. have a site with silverstripe 5
  2. Add some files.
  3. Delete some files
  4. configure keep_archived_assets:
SilverStripe\Assets\File:
  keep_archived_assets: true
  1. view previously archived files in the archive section of the cms
  2. navigate with the next back buttons to show the enabled save button

Possible Solution

dont show the back next buttons

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions