Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
I discovered that schema for drupal6-related sources is placed in migrate module: 'drupal8-core/core/modules/migrate/config/schema/migrate.source.schema.yml'. Think it should be in 'drupal8-core/core/modules/migrate_drupal/config/schema/migrate.source.schema.yml'
Proposed resolution
Provide patch for that
Remaining tasks
No.
User interface changes
No.
API changes
No.
Comment | File | Size | Author |
---|---|---|---|
#32 | 2312385-32.patch | 10.67 KB | benjy |
#32 | interdiff.txt | 1.52 KB | benjy |
#29 | 2312385-29.patch | 17 KB | svendecabooter |
#24 | 2312385-24.patch | 16.95 KB | svendecabooter |
#20 | 2312385-20.patch | 16.9 KB | ultimike |
Comments
Comment #2
benjy CreditAttribution: benjy commentedTagging for "Avoid commit conflicts" since this will need re-rolling for quite a lot of migrate issues.
Comment #3
benjy CreditAttribution: benjy commentedTagging for "Avoid commit conflicts" since this will need re-rolling for quite a lot of migrate issues.
Comment #4
estoyausenteRerolled.
Comment #5
estoyausenteComment #7
estoyausenteOh, I made a backwuard patch -.-"
Comment #8
estoyausenteComment #11
olav CreditAttribution: olav commentedI have reviewd and applied the patch from #7.
I have uninstalled (using drush) & re-enabled (using the UI) the migrate_drupal module.
The patch looks good.
Comment #13
Rade CreditAttribution: Rade commentedThe patch did not remove the old file. Here is an updated patch.
Comment #14
olav CreditAttribution: olav commentedOh, good point. I applied patch #13 again. Now it not just adds the file in the new location, but actually moves it across from the old to new location.
Comment #15
benjy CreditAttribution: benjy commentedSorry back to NW, the Empty source needs to stay in the migrate module as it's provided by migrate.
Comment #16
estoyausenteSomething like this? (I just change the header comment of the file too, we had forgotten it.
Comment #18
ultimikeThis is my first time working with these schema files, so I'm not sure if I'm doing it correctly, but I figured I'd give it a shot...
Updated patch attached, that _might_ fix the failing tests.
One thing I noticed that I'm wondering about is on line 5 of /core/modules/migrate/config/schema/migrate.source.schema.yml:
label: 'Drupal 6 field formatter'
This doesn't seem correct. Should it be something like:
label: 'Drupal 6 empty source'
-mike
Comment #20
ultimikeGood golly, this one seems like it should be easy, but I still can't get it to work...
The issues are with the d6_user_picture_field and d6_upload_field schemas - both of which are a little odd because they contain a "plugin" source variable (which I can't seem to figure out how to properly list in the schema file).
Updated patch attached.
-mike
Comment #21
andyceo CreditAttribution: andyceo commentedComment #23
svendecabooterThe tests seem to fail because the "migrate.source.empty" definition is still in the migrate module schema yml.
If I move it locally to the migrate_drupal schema yml file, the DefaultConfigTest passes.
So I'm assuming that's the cause of the problem.
Now we need to find a way to solve it :)
Comment #24
svendecabooterThis was probably caused by the fact that both files had the name "migrate.source.schema.yml".
I renamed the one in migrate_drupal to "migrate_drupal.source.schema.yml", and this seems to work locally.
Unless I'm missing something here, since I'm no expert on the schema files...
Attaching a new version of ultimike's patch to see if this works...
Comment #25
ultimike@svendecabooter - Holy cow, I hope that's it. I would have never figured that out on my own...
I don't think I'm qualified to review this patch, but benjy indicated he'll have some time this weekend to review patches.
Thanks,
-mike
Comment #26
benjy CreditAttribution: benjy commentedYep, looks good.
Comment #27
alexpottStuff is changing on the copy...
For example:
This patch should be generated with the following in the git config file
As it makes this possible to spot. For more on a recommended git config see https://www.drupal.org/documentation/git/configure
Comment #28
benjy CreditAttribution: benjy commentedwow, good catch. What the heck causes that to be renamed?
Comment #29
svendecabooterI continued from ultimike's patch, but that seemed to have been an attempt to fix the failed tests.
New patch in attachment which just moves the appropriate schema entries over, without changing them.
Comment #30
benjy CreditAttribution: benjy commentedOK, chx showed me that `git diff -C HEAD` gives a much better view of what has changed when a file has been moved.
New patch looks much better.
Comment #31
alexpottPretty certain this still belongs in the migrate module and not migrate_drupal
Is this D6 only?
The label looks incorrect. This does not look d6 specific.
This does not look d6 specific
Comment #32
benjy CreditAttribution: benjy commentedMaybe the issue title made is why you mentioned D6 specific? Updated.
Comment #33
chx CreditAttribution: chx commentedWhether migrate_entity_constant is reusable for non - migrate_drupal migrations, who knows? Maybe yes, maybe no, more likely no than yes. But who care? It's just rather meaningless schema. There's nothing fancy there, no new types, tricky references, nothing. Your constants will likely be slightly different, write your own scheme.
Comment #35
alexpottCommitted 2c2e2ce and pushed to 8.0.x. Thanks!
Interesting label - can someone file a followup issue to fix.
Comment #36
ultimikeFollowup issue filed: #2365891: Incorrect schema label.
-mike