neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

9.0 BUG: Content Migration does not migrate creation and publication dates

Open dlubitz opened this issue 11 months ago • 4 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

If we want to migrate content from Neos 8.3 to Neos 9.0 the node timestamps (created, modified, published) are not migrated anymore. This leads to nodes which all have the created datetime of the migration. Modified and published become empty.

Expected Behavior

When I migrate content to a newer version, I expect the node timestamps (created, modified, published) to be also migrated.

Steps To Reproduce

  1. Create an export of Neos 8.3 instance with ./flow site:exportLegacyData --path ./migratedContent --config '{"dbal": {"dbname": "neos80"}, "resourcesPath": "/path/to/neos-8.0/Data/Persistent/Resources"}'
  2. Import into Neos 9.0 instance with ./flow site:importall --path ./migratedContent
  3. Check created date of any node in Neos 9.0 instance

Environment

- Flow: 9.0-beta18
- Neos: 9.0-beta18
- PHP: 8.3

Anything else?

No response

dlubitz avatar Mar 07 '25 11:03 dlubitz

As discussed, this should be solve-able by adding a new field to the exported event rows in json and then importing the date as event meta data field initiatingTimestamp (see Neos\ContentRepository\Core\EventStore\InitiatingEventMetadata::INITIATING_TIMESTAMP)

We cannot change the actual recorded at date of the event because that is predetermined by the event store.

mhsdesign avatar Mar 12 '25 20:03 mhsdesign

Ok, this might work for creation dates, but not for changed and published, right?

dlubitz avatar Mar 17 '25 17:03 dlubitz

touché yes im afraid we cant really fix that ... especially the published information. The last creation time could be solved by somehow faking the recorded at date of the event store (by using a custom static clock) ... actually that could work *g

mhsdesign avatar Mar 18 '25 15:03 mhsdesign

Just ran into this – and it's a blocker for any site that displays that information (e.g. on articles, blog posts, …) or needs that for auditing of any sort.

kdambekalns avatar Jun 25 '25 17:06 kdambekalns