Migrating localized documents to another repository

Hello all, we're running up against an issue with migrating localized documents to another repository. The new repository is an all-new site which was built from the ground up. It contains a blog though which matches the legacy site, including the slices and content types of the blog documents. The issue is we manually migrated the English content at launch and created new documents for each article. We'd like to now migrated the non-English equivalents but get the "We found some minor errors in your documents" error upon import, when testing with a single JSON example.

We can manually curate the JSON files so it's only the blog posts that we're attempting to import, but the error isn't clear what else is needed. The uids match for all the documents but I see the URLs for assets reflect the legacy site's URL/domain.

Has anyone done this before?

Hello @jason3

Welcome to the Prismic community.

I need more information from you. Could you please send me the URL of your repository and a Zip file that you want to import?

Thanks,
Priyanka

Greetings @Priyanka — thank you for the response! Sure, I can provide those details. Included in the attached are two examples of non-English content from our original repository, algorandfdn-legacy, which is at this URL: https://algorandfoundation.prismic.io

We are looking to migrate a series of these files to the new repository, algorandfoundation, to match up with the English posts with the same UID. It is located here: https://algorandfoundationv2.prismic.io/

JSON-examples.zip (5.3 KB)

Hello @jason3

Sorry for the delayed response. I was off the last few days. I am looking into the issue now and will come back to you as soon as possible.

Thanks,
Priyanka

Hello @jason3

Thanks for the patience.

We have figured out the Import/Export issue is coming due to the Bulk action cluster. It's stopping you from importing the documents even though you get minor errors because minor errors are avoidable.

Can I move your repo out from the Bulk actions until the issue is resolved?

Thanks,
Priyanka

Great, thank you Priyanka. I don't understand completely regarding the Bulk actions but you're free to change the algorandfdn-legacy repo. The algorandfoundation repo is our live site so it cannot be changed.

Hello @jason3

Bulk actions allow you to perform multiple tasks on Prismic documents at the same time, like

  • bulk Publish
  • bulk move to a release
  • bulk Archive
    You can find the complete detail of bulk actions in this guideline.

The algorandfdn-legacy is already out of the bulk actions cluster. And you are migrating documents to the algorandfoundation repository that is in the bulk actions cluster. If I move out the algorandfoundation repository from the bulk actions, it doesn't cause any issue on your live website, and you will be able to migrate documents to this repository.

Thanks,
Priyanka

Great, thanks @Priyanka

If there's no impact to the live site then let's try it. You can move algorandfoundation into the bulk actions cluster.

Thanks,
Jason

Hello @jason3

The algorandfoundation repository is being transferred to another cluster. There should be no issue in the migration of documents to this repository. Let me know if you find any trouble.

Thanks,
Priyanka

Thanks much @Priyanka! That appears to have done the trick. I was able to successfully import the two test files. I'll try the full set as a next step.

One odd thing I noticed which may or may not be problematic: When I locate the test file by switching from English post to the localized import in Chinese, the post appears to be blank. However, when I exit to the pages list for Chinese and search for the same UID, the post appears and all the content is available once I click into it. Reference video: Monosnap

Hello @jason3

This is strange behavior. This issue is happening after you import files? If so, I have to report this issue to my developer team.

Thanks,
Priyanka

Yes, that's what I see directly after the import when I check the result

partial-import.zip (200.7 KB)
full-import.zip (1.9 MB)

@Priyanka Apologies, but one more related issue here: When I attempt to upload a set of files I consistently receive the "We couldn't find any document in the archive. Was it a valid import file?" error. I cannot figure out the pattern as it worked with 2 files in the zip file, but when I attempt a bulk import with the same type of files that error appears.

I see there's an upload limit of 200 JSON files max so I attempted to split into sets of 45-50, however, each shows that error. Do you have any suggestions on how to get the importer to recognize the files properly? I've attached an example (partial-import.zip) and the full set for reference (full-import.zip).

Hello @jason3

This error happens when you haven't compressed the documents directly. Try to generate the ZIP archive again by selecting and compressing the JSON files directly (do not ZIP the folder itself), then try to upload that archive.

I tried your JSON files, and it's working well with me.

I hope it clears to you. Let me know if you are still having any trouble.

Thanks,
Priyanka

Thank you again @Priyanka — that was the solution. Creating the zip files in the correct format allows me to upload them and everything appears to be successful with the import area. However, when I view the releases for each of the three zip files (attached for reference) there's only few pages that appear.

Are the minor errors that are showing up with the imports preventing the pages from making it to the releases?

Archive-1.zip (689.4 KB)
Archive-2.zip (721.8 KB)
Archive-3.zip (439.7 KB)

Hello @jason3

So you have documents in different locales, you will find all imported documents in their respective languages in the release. I tested it and they are available.
You can navigate to the different locales from the side left navigation. (Screenshot attached)

I hope it works for you. Let me know if you have any other doubt.

Thanks,
Priyanka

Ah, I had missed that. Thank you so much for your help @Priyanka!

@jason3 Great. Feel free to reach out to us if you have any doubts.

Thanks,
Priyanka

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.