0

I'm trying to do a migration of an old (and full of nodes and comments) D7 site, to a Drupal 8 brand new one.

In order to import only the contents, I'm trying to do the migration from a csv file (with the stuff that I've exported using views).

My question is, how to set the source? Full path? I'm using a test csv file and I put it at the root folder, at the same place where the index.php file is.

I tried this:

source:
  plugin: csv
  path: 'http://www.example.com/myfile.csv'
...

And this:

source:
  plugin: csv
  path: '/myfile.csv'
...

(with and without the slash)

I keep receiving this error when I try to run the migration script:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=20&op=do_nojs&op=do
StatusText: Internal Server Error
ResponseText: The website encountered an unexpected error. Please try again later.

What should I do?

  • 2
    put source as public://csv/test.csv and sites default make a folder named csv and place the file inside that – Shreya Shetty Apr 3 '18 at 5:16
  • Thanks! It worked. Please add it as a reply so I can mark it as accepted. – Rosamunda Apr 4 '18 at 0:32
4

Please add the file as :

source:
  plugin: csv
  path: 'public://csv/test.csv'

And under sites/default make a folder named as csv and place the file inside that. It will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.