Closed (fixed)
Project:
Drupal core
Version:
8.3.x-dev
Component:
migration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Nov 2015 at 03:10 UTC
Updated:
5 Dec 2016 at 13:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
quietone commentedAnd a patch.
Comment #3
benjy commentedWhy do we need a custom destination here? Can we not use the config destination?
Comment #4
quietone commentedThe existing method, theme_settings_convert_to_config seems a more robust option. It was written specifically for converting D7 theme settings to config. It was likely looked at by those who know theming better than me and it does some minor checking of the data that would not be done if using the config destination.
Comment #5
hussainwebI think
$config->save();was being called twice. I fixed that here and also return an id in consistency withConfigdestination base.Comment #6
hussainwebI am thinking that we could still do this with just the config plugin. I saw the theme_settings_convert_to_config and don't see it doing any checks, but just translating the keys to D8 equivalents (and skipping logo_upload. I commented out logo_upload in the yml for that reason. Let's see what the tests say.
Comment #7
quietone commentedComment #9
benjy commentedLooks good.
Comment #10
catchWhy is this commented out?
Comment #11
hussainweb@catch: I don't exactly remember why. I checked the theme settings again and don't see a logo/upload setting.
I am not sure if logo/url is the same as logo/upload. I'll have to check that in detail which I could do later. But someone else is welcome to pick it up now. I am not sure if I will get time this week.
Comment #12
mikeryanResurrecting, submitted an 8.2.x test. Given the last patch was 8.0.x, this will almost certainly need a reroll, at least for the fixture.
Comment #14
mikeryanSurprisingly, the patch still applies - it needs to add the new migration ID to the list in MigrateUpgradeForm, though.
Comment #15
quietone commentedAdd this migration to MigrateUpgradeForm.
I did a test to see how logo_upload is used. Before uploading an logo file these are the values in the variable.
After uploading an image the values are:
So, no change at all. And as pointed out in #6 logo_upload isn't converted in theme_settings_convert_to_config.
I didn't dive into the D6 code.
Comment #17
quietone commentedMoved the test to Drupal\Tests\system\Kernel\Migrate\d7.
Comment #18
phenaproximaI'm not seeing any red flags here...
Comment #19
phenaproximaComment #21
svendecabooterThe failing test seems unrelated:
cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Testing again against 8.x-3.x
Comment #22
kekkisPatch #17 applies with offset.
Comment #23
kekkisPatch rerolled.
Comment #24
phenaproximaUse assertSame(), not assertIdentical(). Once this is fixed, it's RTBC.
Comment #25
yogeshmpawarRerolled the patch against #24, also posted a interdiff.
Comment #26
yogeshmpawarComment #27
phenaproximaExcellent.
Comment #28
alexpottThe functionality looks great - just one very minor thing.
This needs explaining why it is commented out - is it the same reason as the others? I think it is good to include these to explain what is not migrated.
Comment #29
jofitzMoved commented line because, as expected, it is not migrated.
Comment #30
phenaproximaI think this looks OK.
Comment #33
catchCommitted/pushed to 8.3.x and cherry-picked to 8.2.x. Thanks!