Content versions in eZ Publish are listed by creation date, and we can see all existing versions of an object under /content/history/<object_id>
We can also define a maximum number of versions for all content objects, or for each content object of a given content class.
The issue is not really the number of versions we allow, but the way eZ Publish creates new version: it checks the number of existing versions, compares to the maximum allowed version number, and if the maximum version number has been reached already it removes the oldest one. And after that, it will proceed and create a new version as a draft.
So far so good.
This gives us a huge problem if we need to copy the oldest version and we already reached the maximum number of versions.
In that case, the oldest version will be removed, and an empty draft will created, instead of a copy of the desired version.
Steps to reproduce:
- Create one folder from the administration backed and send it to publish
- Edit the same folder 4 more times, in order to get 5 versions (which is the maximum by default)
- Click the "Manage versions" button
- Copy the oldest version of your folder
You should get an empty draft, which is wrong.