Questions tagged as ['migrations']

"Migration" means any migration of data to a Drupal site.
Score: 1
quantumized avatar
Is it possible to create new node ID's when migrating content instead of using the existing one?
ng flag

We're working on migrating a D7 site to D9 and will be creating new nodes (with new node ID's) before the site launches. The next time we sync the content from the D7 site to D9 the migration will overwrite the new nodes that we create on the new site.

Is there a way to run a migration and create new node ID's instead of using the old/existing ones?

Score: 0
finnishNinja avatar
Migrating one field into multiple rows
kn flag

I am trying to migrate html code into multiple paragraphs that need to be linked together somehow. My idea is to have them linked my ID that comes from the dataset, maybe using that ID as second source. My code currently creates multiple paragraphs but there is no link between them. The data comes form csv an I am using Drupal 9

TLDR: How to map one column from csv file into multiple rows in mapp ...

Score: 0
Lambic avatar
Migrating an array of values into multiple entities
ph flag

I'm using migrate/migrate_plus modules to import CSV files and generate entities.

One of the columns in the CSV can contain multiple values like 1|2|3, which I'm converting to an array using:

  plugin: explode
  source: jurisdiction
  delimiter: "|"

I'm then using the array to generate taxonomy terms with this:

    plugin: entity_generate
    source: "@_ ...
Score: 1
user3713929 avatar
Issues with beans in the migration (some nodes don't migrate, some migrate old revisions)
th flag

I am trying to do a migration from Drupal 7 to Drupal 9. Most seems to migrate okay but I noticed the following problems:

  • I am missing some nodes
  • Some nodes migrated only old revisions of the node (IE: In the live site a node has 8 revisions, and the migration only migrated the first 2, leaving the most recent of the 2 as the live content, which is a review from 2015. The most recent review in the sit ...
Score: -1
Matoeil avatar
Migrating date into drupal datetime field
za flag

i am having the xml selector

<starting_date><![CDATA[ 2017-01-01 22:34:56 +0100 ]]></starting_date>

this migration process fails :

    plugin: format_date
    source: starting_date
    from_format: 'Y-m-j H:i:s Z'
    to_format: 'Y-m-d\TH:i:s'
    to_timezone: 'Europe/Paris'

How can i fix it ?

Score: 1
Import content in nodes with media:image fields using Migrate from csv source
mx flag

I try to import content from a .csv file into article nodes of a fresh D9 install using Migrate, Migrate Plus, Migrate Tools, Migrate csv source and Migrate File (extended)

My article content type has a field_article_media_image expecting a media image item.

When I run the migration, the articles are created correctly BUT the field_article_media_image is still empty. I see the image has been import ...

Score: 1
FooBar avatar
Migration away from Open Atrium
cn flag

We have an intranet site running on Open Atrium (A product which has not been supported or updated in some time) and would like to migrate to a Vanilla Drupal install on either 8 or 9.

We do not use any custom code (we do use a few additional modules, which as far as I can tell are supported in at least 8.x).

Is there an accepted method for doing this?

I have tried disabling all the OA modules and then ...

Score: 0
Warning when repeating migrate:import process
in flag

I created source and data process plugins for mongo db. And when I run import for the first time it works well. But if I run it again, immediately after that I get warning:

[warning] Could not load the following items on index Content index: "entity:node/104:en", "entity:node/105:en", "entity:node/106:en", "entity:node/107:en", "entity:node/108:en".

Where those are the ids of previously imported nodes ...

Score: -2
Matoeil avatar
how to import 3 xml selectors in one drupal field using the migrate plus module?
za flag

the migrate_plus migration conf i had so far was

  title: title
  body: job_description
  field_job_diffusion: offer_type
  field_job_statut: statut
  field_job_domaine: domaine
  field_job_campus: campus
  field_job_niveau_etudes: study_level
  field_job_emailapi: application_email

It works for single XML selector to single field mapping and migration. I need now to get the value from 3 ...

Score: 0
Thony avatar
Migrate Json data with non-numeric unique identifier (from facebook...)
cm flag

I am trying to fetch posts form facebook, using migrate.

My question is:

in my migration conf.yml how should I set the source:ids key to handle non-numeric IDs, like the ones provided by facebook that look like that 1333842536759100_23306506123438

Some details:

I fetch a json from FB that look like that:

   "data": [
         "permalink_url": "URL",
         "created_time": "2021-11-06T16:59: ...
Score: 0
Migrate accessing source fields by name instead of by selector?
in flag

I'm working on the MongoDB source plugin and I'm able to do the migration, but I have to make strange compromises. When defining the source fields, I have to set name the same as selector, like this.

    name: _id
    label: 'Unique ID'
    selector: _id

That works, but if I decide to change field name and keep selector, the migration fails.

    name: node_id
    label: 'Uni ...
Score: 0
hank avatar
Problem with upgrading because an unmigrated module
mx flag

I am trying to migrate a Drupal 8 site to Drupal 9. Though most of the migrations have gone easily, this site breaks because it uses the Video module, which hasn't been updated for Drupal 9.
Specifically, the problem happens when I try to run drush updb. I geet this error message.

Unable to determine class for field type 'video' found in the 'field.storag e.paragraph.field_video_item' configurat ...

Score: 0
How can I debug a Twig error that occurs after migrating from Drupal 8.9 to Drupal 9+
cn flag

I am trying migrate my Drupal 8.9 site to Drupal 9+ and I am stuck with an error its cause I am not able to hunt down. On almost every page I get the following PHP exception:

Twig\Error\RuntimeError: The "replace" filter expects an array or 

"Traversable" as replace values, got "string" in "__string_template__faabd18c7a37a1e54d0ef10115b24022e72bc201187fff502de48bf58589321f" at line 2. in twig_repl ...
Score: 0
quantumized avatar
How can I prevent my migration from overwriting existing nodes instead of using the source's (D7) NID
ng flag

I have imported my content types from D7 to D9 using /upgrade for the complete migration and the data is all good. I then have a separate migration to import and convert my date fields and this works too, except that it overwrites all of the existing nodes instead of using their exiting NID or pulling it from the source again. Any ideas how to prevent this?

id: event_node
label: Event Nodes
migrati ...
Score: 0
Using root source property within migrate sub_process plugin
gb flag

I'm performing migration from Drupal 9 into another Drupal 9 project. Let's say "content features" migration.

In a node migration I'm trying to create stubs for media items.

The media source has two id keys: mid, langcode. The mid key is getting from field's target_id property. But there is no language property on field's level and I'm trying to pass node's language as second id value for the medi ...

Score: 1
How to implement TrustedCallbackInterface
us flag

I'm maintaining a module that I've had a 3rd party dev build for me. I D9 this issue has appeared when using the module that otherwise works in D8 and should be compatible with 8 & 9.

The module creates blocks with event dates pulled from the Songkick service but on D9 pages with a songkick block enabled throws this error:

Drupal\Core\Security\UntrustedCallbackException: Render #pre_render c ...

Score: 1
How to use migrate process plugin concat on multiple values?
bv flag

I am trying to import from a csv that has multiple files in the same column, e.g.


I need to prepend the path to these file names to get something of the form /path/to/file/img4.jpg.

I have written a process pipeline similar to the following (which doesn't work):

    file_source: '/ ...
Score: 0
ShabbyAbby avatar
Import multiple images with sub_process and image_import
to flag

I have some nodes with multiple images I want to import. How can I combine sub_process plugin with image_import?

    {"src":"","alt":"Image 1","title":"Image one."}, 
    {"src":"","alt":"Image 2","title":"Image two"}

What can I do to loop throw the array of images and import them later.

Here is example of my YML migratio ...

Score: 0
Delford Chaffin avatar
Migrate commerce_order__order_items from CSV files
gg flag

I'm writing a custom migration module from a legacy system. I have all of my orders and order items being migrated, but the commerce_order__order_items table is not being populated.

My orders migration:

id: my_order_data
label: My orders
migration_group: mygroup
  - kentico
  - orders
  plugin: csv
  ids: [OrderID]
  path: 'public://import/program/'
  header_r ...
Score: 0
mark newton avatar
unserialize(): Error at offset 0 of 18 bytes
in flag

I am doing a migration from Drupal 7 to Drupal 8. Its using a MYSQL database (Server version: 8.0.26-0ubuntu0.20.04.2 (Ubuntu)). With this one particular node type when I drush cr and then reload the page I am given the following error.

Notice: unserialize(): Error at offset 0 of 18 bytes in Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromDedicatedTables() (line 1288 of core/lib/Drupal/Core ...

Score: 0
miststudent2011 avatar
How do I migrate body content with [embed]*[/embed] tags?
fr flag

Currently I am working on migrating a Drupal 7 site to Drupal 9. The nodes in the site has nodes with content similar to the following one.

<h3><strong>WHAT WILL YOUR NEXT MEAL BE?</strong></h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry galley of type and Lor ...
Score: 1
C0c0b33f avatar
Files migration from local dev site
kh flag

I'm migrating from Drupal 7 to Drupal 9 and am having an issue with my source files getting found with the upgrade_d7_file migration. My public files directory for my source site is not 'sites/default/files'. It's a multisite instance and it's public file directory is 'sites/'. I have exported the configuration generated with migrate-upgrade --configure-only and can change the so ...

Score: 2
Delford Chaffin avatar
Migrate order billing profile
gg flag

I'm trying to migrate order data from an existing site using CSV files and I can't get the billing profile to relate.

In trying to troubleshoot this, I have it set just to insert a default value of a known profile and it's still not working for me. Currently, in the process section of my YML migration file I have these lines, but I still end up with <null> in the database.

billing_profile/targ ...
Score: 0
crafter avatar
Migration lookup and no stubbing
jp flag

I have a problem with languages and no stubbing regarding migration_lookup plugin in Drupal 8. I have a different json data, each of them is different languages for example json with de:

data:{ id: 12345, name: 'Product 1 de', id: 123456, name: 'Product 2 de'}

json with en

data:{ id: 12345, name: 'Product 1 en'} 

of course this json is only example not validate.

I have a 2 migration yaml file called: m ...

Score: 0
J. Scott Elblein avatar
Best upgrade path?
jp flag

One of my Drupal sites has been languishing on Drupal 5.

It has a lot of content, so I can't just start from scratch. I'm considering to finally upgrade it to Drupal 9.

What would be the best and easiest path to getting all caught up?

Should I make a clone of my most recent 5 on a development machine, then install each of the next version using its upgrade method?

Can I just install Drupal 9 over my ancie ...

Score: -4
Shyam Jha avatar
The website encountered an unexpected error. Please try again later. as shown in body
uz flag

I tried to set up my drupal 8 full project on localhost but after set up when I run project getting error as shown below:-

The website encountered an unexpected error. Please try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "node" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 150 of core\lib\Drupal\Core\Entity\EntityTypeM ...

Score: 0
Michael Chaplin avatar
How to set the appropriate bundle for a paragraph on migration?
us flag

I'm trying to migrate some paragraphs from D7 to D9.

The bundle type is always set by the default_bundle setting for the destination migration eg:

 plugin: 'entity_reference_revisions:paragraph'
 default_bundle: text

Can anyone sign post me to a good example of a yml file that sets this for paragraphs with more than one field?

Here is the whole yml file:

langcode: en
status: true
dependenc ...
Score: -1
BlondeSwan avatar
What is Pages (from D7 and D8) replaced with in D9?
br flag

I'm working on a D9 project that we just migrated from D7, but there doesn't exist a admin > structure > pages link. What was this replaced with? Same with Panels, I still see Panels as a Content Type, but what about a structure?

All I could find online was "How to create a Basic Page". I want more than a basic page, I want to structure pages together.

Score: 1
Fill multi-value field from comma separated values in a field
kr flag

I have data in xml which I want to import into drupal. Which works fine. But one field in the xml is filled with a comma separated list of terms. There is a target field in drupal which is a multi-valued field. I do not need those as a taxonomy, just as multi-value for solr search. I just want to expand the one,fourty,flower,... values to fill the multiple-value field.

It absolutely will not work. Any h ...