Is it possible to change first_publication_date?

I am planning to move my uncles old WordPress website to Prismic.

I would like to preserve the old publishing date in the nes Prismic posts. Looks like, I can use first_publication_date field for it, but I am unsure if it is possible to manually adjust this field.

Can anyone help?

Hi @pawelgrzybek,

Thanks for reaching out.

In fact, it is not possible to set first_publication_date using the Import/Export feature, and In fact, I will create a feature request and send it to our @features-team to allow that as it makes total sense.

A workaround would be to add a new field to your custom type, such as publication_date and run a script to change it automatically in your WordPress export.

And then, you can have a fallback in your application to check if this field is set. You take its value. Otherwise, you accept the first_publication_date to handle newly-created posts.

Please let us know if need any further help,
Fares

Yes, that makes sense. I wanted to avoid creating new field, but looks like thats what I am going to end up doing. Thanks a ton @Fares

@Fares (or someone else from Prismic). This is a pretty big problem. There is no Write API for posts and also no way to edit the First Published Date. What's the status of this feature request?

A custom field as a second parameter in sorting API requests doesn't seem to be working either.

Hello @bassplayer7, we have no updates for the moment. Check out our progress page to see all the features we're currently working on. What's new - Prismic
Thanks

Any updates on this? Seems like a relatively easy feature to add that will solve a lot of problems for a lot of people (including myself).

Hi @barrymichaeldoyle,

Nope, no update on this, but we'll be sure to mention it when we're discussing feature requests with the product team.

Sam

Any updates on this? Seems like a relatively easy feature to add that will solve a lot of problems for a lot of people (including myself too :slight_smile: )

Hi @manuel1 ,

Nope, no update on this. What's your exact use case?

Thanks.

Would also value this feature, and interested to know if there’s any news. Use case is we’re migrating an old static markdown blog to Prismic. We need to be able to backdate the old articles we port over, but also sort by the correct original publish date in our paginated blog listings, alongside newly created posts in Prismic.

As far as I can tell Prismic does not allow us to retrieve articles sorted by a custom override date but fall back to the first_publication_date if it doesn’t exist, so this is not a valid solution as posts get retrieved in order they are added to Prismic, which is fine but requires us to carefully copy over each post in the correct order - we tried this automatically with the migration API, pushing up the draft migration article by article, but on publish the ordering just got scrambled.

Allowing to either set a `first_publication_date in the past, OR retrieve articles sorted by a custom_publish_date OR `first_publication_date field would resolve this.

It seems kind of insane that there’s a whole migration API, yet it still does not allow the correct original publication date be set. It makes something that should be straightforward extremely tedious and unnecessary.

Hey @ben.hodgson,

There's no news to share so far on this feature. It's still not possible to modify the first_publication_date, you either need to add this as a custom field or recreate the pages. Your use case and what you're saying makes complete sense though, I see your vision. I've created a feature request to outline your use case and let product know this is something users are asking for. I can't promise an ETA for implementation or a specific implementation, but I've linked your post to the feature request so you can be kept updated if/when there's any move on the matter.

Thanks for raising this, and for your feedback, sorry I can't do more for you!