PHPackages                             edwilde/silverstripe-legacy-versioned-repair - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. edwilde/silverstripe-legacy-versioned-repair

ActiveSilverstripe-vendormodule[Database &amp; ORM](/categories/database)

edwilde/silverstripe-legacy-versioned-repair
============================================

Repairs SilverStripe 3/4-era folders that CMS 6 misclassifies as archived (Version=0 or no live row), which blocks creating files and sub-folders inside them.

1.0.0(yesterday)00BSD-3-ClausePHP ^8.3

Since Jul 19Compare

[ Source](https://github.com/edwilde/silverstripe-legacy-versioned-repair)[ Packagist](https://packagist.org/packages/edwilde/silverstripe-legacy-versioned-repair)[ RSS](/packages/edwilde-silverstripe-legacy-versioned-repair/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Legacy Versioned Repair
=======================

[](#legacy-versioned-repair)

Repairs SilverStripe 3/4-era folders that SilverStripe CMS 6 misclassifies as "archived", which blocks creating files and sub-folders inside them for every user, including administrators. In practice this means users cannot upload new files or create sub-folders inside an affected folder, even as an administrator: the "Create folder" button briefly shows a spinner and then reverts with no error message, and new uploads never complete. Replacing an existing file still works, which is often the tell that a site is hitting this.

Related upstream issue: [silverstripe/silverstripe-asset-admin#1689](https://github.com/silverstripe/silverstripe-asset-admin/issues/1689).

The problem
-----------

[](#the-problem)

Folders migrated from SilverStripe 3 or 4 can have `File.Version = 0` and no `File_Live` row. CMS 5 never consulted versioning state when creating files, but CMS 6 does: `Hierarchy::canCreate()` calls `$parent->canAddChildren()`, which calls `Versioned::isArchived()`. `isArchived()` reads `isOnDraft()`, and `isOnDraft()` treats the stage row's `Version` number as a boolean. A row with `Version = 0` therefore reads as "not on draft", and with no live row the folder is deemed archived, so adding children is refused.

The folder looks normal but cannot have files or sub-folders created inside it. Because the check runs before the usual admin permission bypass, even administrators are blocked.

Requirements
------------

[](#requirements)

- SilverStripe CMS 6 (`silverstripe/framework ^6.1`, `silverstripe/assets ^3.1`, `silverstripe/versioned ^3.1`)
- `symbiote/silverstripe-queuedjobs ^6.1`

Installation
------------

[](#installation)

```
composer require edwilde/silverstripe-legacy-versioned-repair

```

Usage
-----

[](#usage)

The task is a dry run by default and only reports how many folders are affected.

Dry run:

```
sake dev/tasks/repair-legacy-folder-versions

```

Alternatively, open the task URL while signed in as an administrator:

```
https://your-site/dev/tasks/repair-legacy-folder-versions

```

To queue the repair, pass `--confirm` (CLI) or `?confirm=1` (HTTP):

```
sake dev/tasks/repair-legacy-folder-versions --confirm
https://your-site/dev/tasks/repair-legacy-folder-versions?confirm=1

```

This queues a single `RepairLegacyFolderVersionsJob` on the normal queue, which every install processes. The job repairs a small chunk of folders on each `process()` call and resumes itself until none remain, so it is safe for large sites: it parks as `Waiting` between chunks rather than exhausting worker memory. Watch progress in the Jobs admin at `/admin/queuedjobs`. Re-running the dry run afterwards should report zero.

The task is idempotent and safe to run more than once. Clicking confirm again while a job is queued or running does not create a duplicate.

How the repair works
--------------------

[](#how-the-repair-works)

Each affected folder is force-written with no field changes. The write is performed on the live stage: `Versioned::augmentWrite()` writes both the draft and live rows, bumping the version off zero and creating the live row, which un-archives the folder. `Folder::updateChildFilesystem()` early-returns on the live stage, so the recursive child-write cascade never fires. A draft write would recurse into every descendant file and folder, which on a near-root folder can exhaust worker memory and needlessly republish child files.

Only folders are repaired. Plain files inherit their permission and versioning behaviour differently and are not affected by this issue.

Configuration
-------------

[](#configuration)

The job runs on the normal queue by default. On a large site that runs a dedicated large-queue processor, move it to that queue so the long repair does not tie up the normal-queue worker:

```
Edwilde\LegacyVersionedRepair\RepairLegacyFolderVersionsJob:
  # Folders repaired per process() call. Keep it small so memory stays flat
  # within a chunk and the runner can park the job between calls.
  chunk_size: 5
  # Queue to run on: QueuedJob::QUEUED ('2', the default) or QueuedJob::LARGE ('3').
  queue: '3'
```

This is one-shot tooling. Once the repair has run you can disable both the task and the job, which removes the task from `/dev/tasks` and makes any queued job a no-op:

```
Edwilde\LegacyVersionedRepair\RepairLegacyFolderVersionsTask:
  is_enabled: false
Edwilde\LegacyVersionedRepair\RepairLegacyFolderVersionsJob:
  is_enabled: false
```

Licence
-------

[](#licence)

BSD-3-Clause. See [LICENSE](LICENSE).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6171b1ee49749a6bae03341370fb418481ad8ea004f078dfd65612f58c8574b1?d=identicon)[edwilde](/maintainers/edwilde)

---

Tags

migrationsilverstripeupgradeassetsversionedfolderrepaircms6

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/edwilde-silverstripe-legacy-versioned-repair/health.svg)

```
[![Health](https://phpackages.com/badges/edwilde-silverstripe-legacy-versioned-repair/health.svg)](https://phpackages.com/packages/edwilde-silverstripe-legacy-versioned-repair)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5253.6M1.4k](/packages/silverstripe-cms)[silverstripe/admin

SilverStripe admin interface

262.8M387](/packages/silverstripe-admin)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2603.2M440](/packages/ssch-typo3-rector)[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M86](/packages/silverstripe-userforms)[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1101.1M314](/packages/dnadesign-silverstripe-elemental)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
