Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Migrate Sourceid

Security covered Maintenance fixes only 4 sites

This module provides a block that displays a link to the original entity from a migrated Drupal entity. It uses migration lookup tables to find the source ID, simplifying the process of referencing old content.

About

This is a helper module when you want to check the source of a migrated Drupal entity on the UI. Using this there is no need to set a custom field to track the old id.

Provides a simple Block with a link to the old Entity of a migrated Entity with the patetrn {OLD_DRUPAL_URL}/node/{sourceid1}.

Currently, it works only for the main Drupal core entities like "node, taxonomy_term, block_content, media, file, user".

Behind the scenes it uses the migration tables to get the sourceid1 with a simple database query.

It is something like a reverse migrate_lookup.

Usage

  • Enable the module after you have finished some migrations. The core "migrate" module is required.
  • Add a new Block instance of type "Migrate Sourceid" on the Block Layout ("/admin/structure/block").
  • You can enable the Block for any entity that has a view page. Eg "/node/*, /taxonomy/term/*"" etc).
  • Export config to get the settings yml in the files (an alternative is to override it through settings.php).
  • Override the "migrate_sourceid.settings.yml" accordingly.
  • For each entity type you can add the migration ids you want to look for.
  • Import the new "migrate_sourceid.settings.yml" file.
  • Clear caches.

Example of configuration settings

source_url: https://www.example.com
migrations:
  node:
    - d7_node
    - my_custom_csv_migration
    - node_news
    - node_page
    - node_article
  block_content:
    - d7_block_content
  file:
    - d7_file
  media:
    - my_media_file
  taxonomy_term:
    - d7_taxonomy_term
  user:
    - d6_user

ToDo

  • Add permissions
  • Add a Drupal form to override settings
  • Allow to override link texts and prefix
  • Create a Drupal service
Drupal 8–11

Ask your assistant about Migrate Sourceid

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • migrate Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Mar 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Slowing

Releases

Version Type Core PHP Release date
1.0.5 Stable 8–11 Mar 25, 2024
1.0.4 Stable 8–10 Mar 1, 2023