statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.02k stars 528 forks source link

Hardcoded revisions payload not changeable #6026

Open jonassiewertsen opened 2 years ago

jonassiewertsen commented 2 years ago

Bug description

We are working on some custom revisions. As they have been coded to an interface, this does work great on the PHP side.

The payload beeing send, to restore a revision, is hardcoded though and can't be changed. This is an issue in our case, as we aren't using the timestamp as our reference.

https://github.com/statamic/cms/blob/3.3/resources/js/components/revision-history/Restore.vue#L38-L40

How to reproduce

Activate revisions.

Logs

No response

Versions

Statamic 3.3.9 Pro Laravel 8.83.10 PHP 8.0.18

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

No response

Additional details

No response

duncanmcclean commented 10 months ago

This is an issue in our case, as we aren't using the timestamp as our reference.

What are you using instead?

jonassiewertsen commented 10 months ago

We are using UUIDs.

If using timestamps, they may not be unique, if two revisions are created in the exact same moment.