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.
See parent issue #2181257: [meta] Variables to config migration [d7] for instructions.
Comment | File | Size | Author |
---|---|---|---|
#68 | variable_to_config-2409453-68.patch | 3.68 KB | hussainweb |
#68 | interdiff-64-68.txt | 667 bytes | hussainweb |
#57 | tests.results.txt | 130.14 KB | vprocessor |
#54 | Variable_to_config_statistics_settings-2409453-54.patch | 3.75 KB | vprocessor |
#54 | Variable_to_config_statistics_settings-2409453-54.interdiff.txt | 665 bytes | vprocessor |
Comments
Comment #1
hosef CreditAttribution: hosef commentedAttached is the YAML for this issue, from the patch in #2382117: Migration Files for Drupal 7 Variables.
Test(s) (and maybe a dump file) still need to be written.
Comment #2
miguelc303 CreditAttribution: miguelc303 at Anexus commentedAdded organization support to Anexus IT
Comment #3
jcost CreditAttribution: jcost commentedWill need to be submitted again to Core since moving from sandbox.
Comment #4
phenaproximaComment #5
phenaproximaAdded a test and removed the migration settings for the popular block, since they don't seem to live in the statistics.settings config object anymore.
Comment #6
phenaproximaRe-rolled. No interdiff due to conflicts with the {variable} dump.
Comment #7
chx CreditAttribution: chx commentedSix variables as source and only three has process and test. statistics_flush_accesslog_timer is an integer (the default integer) in D6 but a string in D7 and somehow it doesn't blow up here? What happened to the famous config schema? At least assertIdentical please.
Comment #8
phenaproximaRe-rolled, but also changed -- thanks to @chx I noticed that a few statistics-related variables belong in a different config object, so I wrote a separate migration and test for that. I also noticed that the statistics.settings migration is identical in D6 and D7, so I condensed them into a single one (the test of which uses the Drupal 6 source data).
Unfortunately, I can't provide an interdiff due to conflicts with the variable.php dump file.
Comment #9
phenaproximaOn second thought...looks like D6 maintains the same exact set of Statistics-related variables that D7 does. So I've generalized both Statistics migrations.
Comment #12
phenaproximaHm. Well, this one, at least, passes on my local machine.
Comment #13
mikeryansharing++
Comment #15
webchickOk awesome, onward!
Committed and pushed to 8.0.x. Thanks!
Comment #17
webchickThis apparently broke #2541800-32: Some config do not inherit from config_object, so locale_system_set_config_langcodes() results in schema errors, so rolling this one back.
Comment #21
quietone CreditAttribution: quietone commentedReroll.
Comment #23
quietone CreditAttribution: quietone commentedI updated the d6 dumps not the d7 dumps and missed that. Sigh.
There will still be a failure with the schema.
Comment #27
quietone CreditAttribution: quietone commentedEnabled statistics and the popular block and D8 and discovered that this is saving to the wrong configuration. It should be saving to an array, settings, in block.block.popular.content not block.settings.statistics_popular_block. Fixed that up and the test now fails on ConfigSchemaChecker , 'No schema for block.block.popularcontent'. Fine, that makes sense. Unfortunately, installing the block config doesn't install block.block.popularcontent.
Looked at the block migration and see that the statistics block is not migrated in that test. So no quick answer there.
How do we handle this case?
Comment #28
quietone CreditAttribution: quietone commentedComment #31
quietone CreditAttribution: quietone commentedPut a langcode entry in the schema and the tests passed locally. But, not convinced this is correct, don't really know enough about the config system. And puzzled by the relevance of the comment in StatisticsReportsTest.php that " statistics.module doesn't use node entities, prevent the node language from being added to the options.".
Comment #34
quietone CreditAttribution: quietone commentedForgot to build the dump files.
Comment #37
quietone CreditAttribution: quietone commentedSimply a reroll.
Comment #38
quietone CreditAttribution: quietone commentedThis patch has actually 2 parts, one is migrating statistics variables and the other is migrating the statistics block variables. The first part is straight forward and working fine but the second isn't. It will require more work and an better understanding of block migrations than I have. It makes better sense to me to move that statistics block work to a new issue. At minimum a new issue title will better identify what need to be done.
The attached patch removes everything related to the statistics block variables.
Comment #39
quietone CreditAttribution: quietone commentedComment #40
mikeryanThis belongs with the separated-out block issue, no? If it belongs in a migration patch at all...
This is just going to run for D6, we should also test on D7 (i.e., keep the d6 test and make a dupe-except-for-the-base-class in the d7 directory).
Comment #41
quietone CreditAttribution: quietone commented1. Wow that was an oversight
2. D7 test file created.
Thx, mikeryan.
Comment #43
quietone CreditAttribution: quietone as a volunteer commentedComment #44
benjy CreditAttribution: benjy at PreviousNext commentedThe last patch looks good but I note that previous patches had changes to the dumps, did something change there?
Comment #45
quietone CreditAttribution: quietone as a volunteer commentedThe changes to the dumps were about the statistics block settings. That work was moved to #2613870: Variable to config: statistics block settings [d7] because they have a different config destination. Looks like that happened in #38.
Comment #48
quietone CreditAttribution: quietone as a volunteer commentedComment #49
vprocessor CreditAttribution: vprocessor at Skilld commentedComment #50
vprocessor CreditAttribution: vprocessor at Skilld commentedrerolled
Comment #51
vprocessor CreditAttribution: vprocessor at Skilld commentedComment #53
vprocessor CreditAttribution: vprocessor at Skilld commentedComment #54
vprocessor CreditAttribution: vprocessor at Skilld commentedfixed
Comment #56
vprocessor CreditAttribution: vprocessor at Skilld commentedComment #57
vprocessor CreditAttribution: vprocessor at Skilld commentedSorry guys, don't understand this issue.
On my local all tests passed
Console command: php core/scripts/run-tests.sh --color --concurrency 2 --verbose --sqlite ~/tmpfs/drupal/test.sqlite --url http://d8.lc/ --class '\Drupal\migrate_drupal_ui\Tests\d7\MigrateUpgrade7Test'
Please, check results in attached file
Code which generated this issue: $this->assertText(t('Congratulations, you upgraded Drupal!'));
Comment #58
quietone CreditAttribution: quietone as a volunteer commented@vprocessor, thanks for working on this. I don't know why that test is failing, maybe the testbot had a hiccup.
Just two items,
This should be in tests/src/Kernel/Migrated/d7, similar to d6/MigrateStatisticsConfigtsTest.php
This isn't needed. See the d6/MigrateStatisticsConfigtsTest.php for an example.
Comment #59
vprocessor CreditAttribution: vprocessor at Skilld commentedComment #60
vprocessor CreditAttribution: vprocessor at Skilld commentedComment #61
mikeryan@vprocessor - did you mean to upload a new patch responding to @quietone's comments?
Comment #64
hussainwebOne of those issues where the interdiff is harder to create than the patch.
Addressing comments in #58.
Comment #65
hussainwebI was sure I had uploaded the interdiff. Anyway, here it is...
Comment #68
hussainwebComment #69
vprocessor CreditAttribution: vprocessor at Skilld commentedComment #70
hussainwebI requeued the patch for testing and it still passes.
Comment #72
phenaproximaSeems pretty straightforward.
Comment #73
phenaproximaComment #74
alexpottCommitted and pushed 3fff17d to 8.3.x and 5817330 to 8.2.x. Thanks!