- π³π±Netherlands Summit
Hi,
I start up the migration scenario again! Now from Drupal 7 -> Drupal 10.
First is it all a lot of efford to get all modules in place.
Then get the content over. Now over 1000 nodes :(Anyone has experience with the Web links module now, to get it in Link?
Looking forward to replies:)
Greetings, Martijn - π©πͺGermany GStegemann
Hi Martijn,
Seems to be a good idea.
Anyone has experience with the Web links module now, to get it in Link?
No, not at all. I stopped all my Drupal activities since the beginning of 2020.
Good luck and best regards,
Gerhard - π³π±Netherlands Summit
Hi,
May be this is the best scenario?
First converting the Weblinks to Link, Second migrate Link D7 to Link D10?
Issue here: https://www.drupal.org/project/weblinks/issues/3347473 π¬ Convert Weblinks to Link module for preparation Drupal 10 migration Active
Greetings, - π³π±Netherlands Summit
Hi,
Will this may be work for Weblinks: https://www.drupal.org/project/url/issues/1778224 β<?php namespace Drupal\custom_url_migrate\plugin\migrate\field; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase; /** * @MigrateField( * id = "url", * core = {7}, * type_map = { * "url" = "link" * }, * source_module = "weblinks", * destination_module = "link" * ) */ class url extends FieldPluginBase { /** * {@inheritdoc} */ public function getFieldWidgetMap() { return [ 'url' => 'link', ]; } /** * {@inheritdoc} */ public function getFieldFormatterMap() { return [ //'default' => 'link', //'url' => 'link', 'url_external' => 'link', ]; } /** * {@inheritdoc} */ public function processFieldValues(MigrationInterface $migration, $field_name, $data) { $process = [ 'plugin' => 'sub_process', 'source' => $field_name, 'process' => [ 'uri' => 'value', ], ]; $migration->setProcessOfProperty($field_name, $process); } }
Didn't test it yet...Any one success with this?
- πΊπΈUnited States DamienMcKenna NH, USA
Does the Weblinks content type get picked up during a normal migration with Migrate Tools? It do, other thank the extra values from the "weblinks" table does everything else come across correctly?
I think it could be worth collaborating on the necessary plumbing to make this work as expected on a new 1.0.x branch, to have both migration plugins for converting the "url" field from the custom table, and otherwise make sure that the content type is migrated with the rest of the normal migration.
- π³π±Netherlands Summit
Hi Damien, because there is now Weblinks module in D8-10, it is not picked up I assume? Shouldn't there be a contenttype as Weblinks in D8-10 then?
It would be great to get this to work to migrate to D8-10 to native Link module.
Greetings and thanks for quick reply Martijn
- πΊπΈUnited States DamienMcKenna NH, USA
Here's what I propose:
1. Build a barebones D7 site with the Weblinks module installed and see what migrates to D9/10 using just Migrate Drupal UI; review the migrated data, work out a list of what is migrated and what is not. Document the setup so tests can be built.
2. Probably needed: a source plugin that extends the core D7 node source plugin and adds the fields from the "weblinks" table so they can be made available for migrations.
3. Based on #1, build additional plugins as necessary.
3. Add the necessary logic so that the new plugin(s) are used when migrating with Migrate Drupal.
4. Document how to migrate the data for sites that are not using Migrate Drupal.It looks like parts of this have been built, it just will take someone to start compiling the pieces in one place.
- π³π±Netherlands Summit
Hi,
I will start with one! Next week. Thanks!
greetings, - π³π±Netherlands Summit
Hi, I did the following
1) Build a latest Drupal 7 site from scratch; version 7.95.
2) Add Weblinks module 7.x-1.1
3) Add one Weblinks node as content. No other content in the site.4) Build the latest Drupal 10 site from scratch, version 10.0.5
5) Enabled the three Migrate modules from core.6) Run the upgrading process. No content is being transferred unfortunately.
I got this screen from modules which are not updated. Off course Weblinks, because there is no Weblinks in D10.
How to proceed please? Do you want to see the logs of upgrading?Greetings, and thanks for your help in advance,
- πΊπΈUnited States DamienMcKenna NH, USA
Out of interest did you check the node tables in the database?
- πΊπΈUnited States DamienMcKenna NH, USA
I added a plan to the issue summary.
The first thing would be to build a fixture that shows what the data looks like in D7.
- π³π±Netherlands Summit
Hi,
Yes I checked the node table: " MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 seconds.)"
Sorry to report this.
Greetings, - π³π±Netherlands Summit
Hi,
I tried to follow these instructions: https://www.drupal.org/docs/drupal-apis/migrate-api/generating-database-... β
Make the changes and export to the changes to the fixture file
1. Make the desired changes on your Drupal 6 / Drupal 7 test site that are needed for your additional test coverage.
==> I installed the weblinks 1.1 module on drupal 7 testsite.
Then I run:php core/scripts/db-tools.php dump --database fixture_connection > core/modules/migrate_drupal/tests/fixtures/drupal7.php
2. Export your changes to the fixture file. Make sure that you are now working in the git branch of your patch.
==> How to build and export the fixture file for weblinks?
greetings, - π³π±Netherlands Summit
Hi Damian,
Is this what you are looking for as Fixture, the test file?
It is after a long search, standard in the weblinks module!
See attached file (weblinks_test). I found it by enabling SImpletest_fixture module
Greetings, - π³π±Netherlands Summit
Hi, can anyone help with this?
Greetings and thanks in advance! - π³π±Netherlands Summit
Hi, I think I build fixture with
Then one is completed right: 1) Build a test fixture that adds the necessary D7 source data;
With https://www.drupal.org/files/issues/2023-04-01/weblinks.test β ?
Now I think next step is to do 2) Probably needed: a source plugin that extends the core D7 node source plugin and adds the fields from the "weblinks" table so they can be made available for migrations.How to build the source plugin for this please? I see this source, but I am not a good enough programmer to get this working: https://www.drupal.org/docs/8/api/migrate-api/migrate-source-plugins/ove... β How to begin please? Weblinks module is a Drupal 7 module with links embedded, but not as a field like linkfield?
greetings,
- π³π±Netherlands Summit
Based on this https://www.drupaleasy.com/blogs/ultimike/2016/03/drupal-6-drupal-80x-cu...
I wil try first step. - π³π±Netherlands Summit
first step on Migration script of whole nodetype weblinks here: https://www.drupal.org/files/issues/2023-04-11/weblinks-listing-D7-D10-m... β
first step on Migration script, just standard nodetype weblinks here: weblinks-clean-D7-D10-migratescript.txtI think most important is this peace:
url: - plugin: field_link uri_scheme: 'https://' source: url process: field_link: url
Will this work? based on https://api.drupal.org/api/drupal/core%21modules%21link%21src%21Plugin%2...
Greetings,
- π³π±Netherlands Summit
Hi,
I made a specific issue for the Migration scenario using Drupal 10 Migrate modules based on https://evolvingweb.com/blog/drupal-8-migration-migrating-basic-data-part-1 https://www.drupal.org/project/weblinks/issues/3353910 π¬ An upgrade solution is needed to migrate data from the Weblinks structures on D7 to D10. Active
So I end this issue for now to try to get Weblinks nodes migrated through Migration Modules support with you all.
First shot of Weblinks-migrate module attached to that issue.
Greetings, - Status changed to Closed: duplicate
over 1 year ago 2:23pm 18 April 2023