Score:0

Migration does not pick up files

bd flag

Please forgive me for not going the canonical path with either Drush or Composer. I tried, but could not find documentation to get me started. I'm coming from a Debian installation of Drupal 7 that used Debian packages.

I have had bad experiences with skipping major releases with several software product, so I did not want to skip from Drupal 7 to 9. Please correct me if you think this is a bad idea. So I downloaded the latest Drupal 8 tarball and installed that. I configured a basic site and started .../upgrade.

Most of the migration went OK, but I could not get it to import the files from Drupal 7. I had kept them in /var/lib/drupal6/files. The log mentioned files, but with the path like //varlibdrupal6filessomething.jpeg. So I copied the files to / with the prefixed name, but no dice.

I can't find why there is a lot of error messages (but less than one per file) like this:

Source ID 1022: Could not create or write to directory 'private:'

I straced apache but could not find anything that looked like a problem with the private files path. The top level directory is owned by www-data:www-data is is set to 0777 anyway. The strace does not show any access involving that directory, accept for a few to PHP files like this:

/var/lib/drupal8/private_lupe/php/twig/622f743c27556_file-upload-help.html.twi_eD0VmjHtlHLVX1mpIjHA75Nma/G6aJ5F6Sil2zIJaFe5fOVmGmTblecD0xEgu82CsdGMs.php

The apache access.log shows this:

172.17.6.1 - - [14/Mar/2022:21:13:37 +0100] "POST /buexeCMS8/node/add/rezept?element_parents=upload/widget&ajax_form=1&_wrapper_format=drupal_ajax&_wrapper_format=drupal_ajax HTTP/1.1" 200 6292 "https://drudev.lupe-christoph.de/buexeCMS8/node/add/rezept" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"

So it looks like it the POST has succeeded. Except it hasn't.

I tried diving into the PHP code but had to give up when I got to a file with very complex Entity-related code.

I installed the File (Field) Paths module and built a new content type using both the old and the new File widgets. The old one refuses to upload, the new one presumably using File (Field) Paths, does its job.

Now I'm completely confused, and have no idea where to look next. Any nudge in the hopefully right direction would be very welcome.

id flag
It is a bad idea to migrate to Drupal 8. It is end of life. You are only making more work for yourself. Composer codebase install is well documented and is a single command https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies. You will cause yourself many problems by choosing not to use Composer.
bd flag
Sorry, I did not get composer to work for me. As for more work - as I said, I'm paranoid about version skips. But I'll keep Drupal 9 as a last resort if I can't get the migration to Drupal 8 to work. Right now I'm looking for help importing those files.
cn flag
Drupal 9 IS Drupal 8 with some deprecated code cleanup. Also the migration tools continue to be improved, so Drupal 9.3 should have less buggy migration than any release of Drupal 8. As cilefen said, composer is the way forward and you are unlikely to get support by saying composer did not work for you. Please take a second look at composer; it is very likely to pay off for you in the long run if you continue to do PHP development.
id flag
You directly asked for advice on these matters. Please listen. I’ve seen a lot of people who “know better” and decided to go their own way with these things and that decision cost them time and money.
bd flag
OK, I'll try to migrate to Drupal 9. More when I'm stuck or done. Thanks for explaining the relation of 8 and 9. Given the huge step from 7 to 8, I expected a similar step between 8 and 9. I don't think I "know better", it's just that I've been burned quite a few times by trying to take two steps at once.
bd flag
After fiddling with private and public file paths and some mistakes along the way I finally got a Drupal 9 site that includes all the assets from the old site. Thanks for insisting that I use Drupal 9.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.