Drupal 8 migration does not pick up Drupal 7 files

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.

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Drupal 8 migration does not pick up Drupal 7 files

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.