I'm trying to migrate to Drupal 10, but the node fields are not migrated...

Created on 14 March 2024, 10 months ago
Updated 15 August 2024, 5 months ago

Hello, I am trying to migrate a website in Drupal 7 to Drupal 10. The website is large, it has more than 40,000 nodes, various types of content, flags, votes with fivestar, etc.
I Installed Drupal 10 and added all the modules that have been ported. The ones that do not work with Drupal 10 are for cache and are not much needed either.
I've tried migrating through the Drupal interface because Drush, for some unknown reason, doesn't work very well on my hosting (you have to access it through "./vendor/bin/drush"). Well, every time I try the migration and it manages to finish (for some reason I get a "504 Gateway Timeout" message every now and then and I have to start over), almost everything migrates, content types with all their fields, taxonomies, images, I even have nodes, but the problem is that the nodes only appear with the title, no field appears. If you try to edit any of that content, it seems that the fields do not exist, but the content types do seem to be migrated complete with all their fields. There are some complex nodereference fields, but others are normal text.

Can you help me? Why aren't the fields migrated?

💬 Support request
Status

Active

Version

10.2

Component
Migration 

Last updated about 13 hours ago

Created by

🇪🇸Spain dcine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dcine
  • Status changed to Postponed: needs info 9 months ago
  • 🇳🇿New Zealand quietone

    @dcine, I hope you have resolved this.

    One thing to check is the display settings. 'Manage form display' and 'Manage display', for all the content types. Sometimes the configuration migration gets those wrong, but it is easy to check.

  • 🇪🇸Spain dcine

    Ok, thanks for your answer, @quietone, but it's the first thing I looked at.
    If you try to edit any content, the fields appear empty. Everything is migrated except the content of the nodes (the title, the author/user and the comments, however, yes).
    It's very weird. I have tried a thousand ways, using Drush, the Drupal UI, migrating in order, etc., and nothing, the data is not migrated. I have reinstalled drupal 10 from scratch and added all the necessary modules again, with no results. I don't know what to do anymore and why it doesn't work.

    The last message that appears is the following (in case it could serve as a guide to finding the solution:

    Warning: Undefined property: Drupal\migrate\Plugin\Migration::$provider in Drupal\migrate\Plugin\migrate\destination\DestinationBase->getDestinationModule() (line 130 of core/modules/migrate/src/Plugin/migrate/destination /DestinationBase.php).
    

    Any help please?

  • 🇳🇿New Zealand quietone

    Can you supply more detail? Things like,

    What is the drush command used to migrate? What was the output?
    You say you looked at the display settings but did you have to modify them at all?
    Are you using custom migrations?
    Is the data for the content of fields in the database on the destination site?
    What are the results when you run the node migration with drush for just one nid?

    The core issue queue isn't the best way to get support. there are more people to help in #migration in Drupal Slack.

  • 🇪🇸Spain dcine

    The first code is:
    ./vendor/bin/drush migrate:upgrade --legacy-db-key=migrate --configure-only

    Them I try to import the site (drupal 7) with:
    ./vendor/bin/drush migrate:import --tag='Drupal 7' --all --continue-on-failure --execute-dependencies

    Regarding the configuration, I have tried all the options, changing it, without changing it, and I have even "cloned" the content types by copying the exact configuration of each content type from the current website in drupal 7 to the new one in drupal 10. Some fields use modules not updated to drupal 10 (Nodereference create, Field collections, etc. but I have installed substitutes like Paragraphs, etc.) and the error appears.
    The migrations I use are the ones I assumed I created by default with the "Migrate", "Migrate plus" and "Migrate tools" modules, I have not created custom migrations (there are more than 40,000 nodes, more than 10 types of content, I use flags, fivestar, etc.) One detail: the website was created a few years ago in Drupal 6, then about 8 years ago we migrated it to Drupal 7 without any notable problems, and now I am trying to migrate it to Drupal 10.
    Regarding your question "Is the data for the content of fields in the database on the destination site?" I don't understand her. If you mean if the content types with their fields are created, yes, I have a version of the database (I have several saved just in case)
    As for using a single nid, I haven't tried it, but I suppose it will be the same. I'll try in any case.

    On the other hand, I take into consideration your recommendation about Drupal Slack, thank you!

  • 🇮🇳India gokul.jayan

    Hi @dcine,

    For fixing the drush you can implement the vendor/bin to your $PATH using direnv. You can refer the article here. https://www.drupal.org/docs/develop/local-server-setup/linux-development-environments/set-up-a-local-development-drupal-0-6

    For the migration part

    1. Please make sure that the machine name of fields are same as the old site.
    2. Check manage display & manage form display are configured properly.
    3. Try to migrate in order.

    If everything fails then go for custom migration.

  • 🇮🇳India gokul.jayan

    Hi @dcine,

    For fixing the drush you can implement the vendor/bin to your $PATH using direnv. You can refer the article here. https://www.drupal.org/docs/develop/local-server-setup/linux-development-environments/set-up-a-local-development-drupal-0-6

    For the migration part

    1. Please make sure that the machine name of fields are same as the old site.
    2. Check manage display & manage form display are configured properly.
    3. Try to migrate in order.

    If everything fails then go for custom migration.

  • 🇮🇳India gokul.jayan

    Hi @dcine,

    For fixing the drush you can implement the vendor/bin to your $PATH using direnv. You can refer the article here. https://www.drupal.org/docs/develop/local-server-setup/linux-development-environments/set-up-a-local-development-drupal-0-6

    For the migration part

    1. Please make sure that the machine name of fields are same as the old site.
    2. Check that manage display & manage form display is configured properly.
    3. Try to migrate in order.

    If everything fails then go for custom migration.

  • 🇪🇸Spain dcine

    Ok, thanks for your answer.
    But is weird. Everything seems to be configured correctly. The machine names of fields are same as the old site, the manage display & manage form display are configured properly, and I have tried the migration of all forms, in an orderly manner, following the order by folders provided by the "Migrate manifest" module , using the migration from the screen provided by Drupal 10, etc. And nothing, there is no way. Everything is migrated, the content types with all their fields, the images, the videos, the pathauto urls, the fivestar module votes, the nodes with their corresponding ids, the corresponding comments and in their order. The problem is that the nodes only appear with their title, without any fields filled in, everything is blank, no images, no long or short texts, nothing.

    I have already performed 5 installations of Drupal 10, with the content types created and configured and without creating them. I saved the initial database and tried a bunch of options and then went back to the original installation. Nothing, there is no way.

    Some help? Any clue as to where the error may be?

  • 🇸🇬Singapore anish.a Singapore

    I am facing the same issue. How did you fix that?

  • Status changed to Active 5 months ago
  • 🇸🇬Singapore anish.a Singapore

    Adding more details.

    Please see the attached screenshot. Eventhough the D7 site has fields populated, The source comes out as empty. I checked using debugging turned on.

    Not sure how to proceed further.

  • 🇸🇬Singapore anish.a Singapore

    Adding a custom migration yml file that I used to test this.

  • 🇹🇼Taiwan Webster H.

    I also have this problem, when I tried to migrate from d7 to d10.
    All the filed are not migrated into d10 (I cannot see it in content type>manage fields)
    But it did have the field table in the database but no data inside
    Do anyone know how to deal with this issue?
    (I also installed the migrate puls module but seems not help)

    Thanks!

  • 🇳🇿New Zealand quietone

    Hi, the Drupal Core issue queue is not the ideal place for support requests (that option is mostly there for filing support issues for contributed modules and themes). And I am not very skilled on helping other debug issues. However, there are several support options listed on our support page (Community > Support at the top of Drupal.org) and there is Drupal Slack . Drupal Slack and the Forums, are our two main support mechanisms in the Drupal community.

    In Drupal slack there is a channel dedication to migrations, #migration.

Production build 0.71.5 2024