Migrate edit link settings permission to edit linkchecker link settings.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | Migrate_edit_link_settings_permission-3023171-22.patch | 46.88 KB | yash.rode |
Migrate edit link settings permission to edit linkchecker link settings.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | Migrate_edit_link_settings_permission-3023171-22.patch | 46.88 KB | yash.rode |
Comments
Comment #2
hass commentedComment #3
hass commentedAn migration example can be found in
core/modules/user/migrations/d7_user_role.ymlComment #4
yash.rode commentedmigration for "edit link settings" permission.
Comment #5
wim leerss/Drupal9/Drupal 9/
Should have 2 leading spaces. There's 4 here.
Comment #6
yash.rode commentedmigrate linkchecker settings from node to respective fields.
Comment #7
yash.rode commentedComment #8
narendrarGetting error on applying patch because of missing use statements.
Missing use statements 😊
Coding standard issue. Description should start with capital letter
Coding standard issues:
1. Line missing before function.
2. 1 Space after if statement
3. 1 Space after closing braces
4. true => TRUE
Comment #9
yash.rode commentedfollow up for #8.
Comment #10
narendrarPermissions and configurations seems to be migrating correctly.
It would be great if we can prove a test coverage for migration of node settings to field settings.
Also found some coding standard issues:
Missing blank line.
Probably we want to add a comment here to explain what we are trying to achieve here.
Coding standard issue. 1 Space after if is required.
Comment #11
yash.rode commentedAdded test coverage and made suggested changes.
Comment #12
yash.rode commentedfixed coding standards.
Comment #13
narendrarTested manually and found:
Filename can be more descriptive eg: LinkcheckerMigrationTest.php
Comma missing from end at 2 places.
Comment #14
yash.rode commentedfix to migrate comment settings and follow-up for #13.
Comment #15
narendrarTested manually and issue raised in #13 is fixed.
Small textual change, but apart from that good for rtbc:
Mapped "edit link settings" to edit "linkchecker link settings" => Mapped "edit link settings" to edit "edit linkchecker link settings"
Comment #16
huzookaOnly a few nits:
Before you do this, you should ensure that the
d7_user_rolemigration exists and also verify that the first process plugin config in itspermissionsdestination property is astatic_mapplugin.If you added a unique migration tag here, it would be enough to search for that tag in the beginning of the migrate prepare row hook (to do an early return).
I would prefer an
in_array()function here:in_array()?If you set the expected
['scan' => TRUE, 'extractor' => 'html_link_extractor']array here as value, you would not need thelinkchecker_configprocess plugin.A: It would be more straightforward checking the field config entity here:
B: Since you already have a pretty neat test, it would be a good idea to check the text fields of the other entity types as well (the body field of the
pagenode type, or thecomment_bodyfields of the migrated comment types.Comment #17
yash.rode commentedfollow up#16.
Comment #18
huzooka"Adds third party settings migration process pipeline to field migrations to migrate linkchecker settings."
I don't think there is a patch that would break up user role migrations (like #3097336: Improve the DX for migrating content entities: view modes, fields, formatters, widgets etc should be migrated per entity type + bundle), so it is safe to check and modify only
d7_user_role:This violates coding standard. Could you please replace this with
"Tests linkchecker migrations."
You can execute this migrations in one step:
Could you please fix these array indentation errors? (My editor does the same thing if I copy-paste, but it's wrong.)
Comment #19
elberComment #20
yash.rode commentedfollow up for #18
Comment #21
huzookaRe #20:
This should be removed. We shoudn't touch preexisiting CS violations, mostly because it is less likely that the actual patch conflits with an another one.
Wrong indentation here.
Comment #22
yash.rode commentedComment #23
huzooka#22 is perfect!
@elber, we're very sorry, we had to wrap up this ASAP.
Comment #25
eiriksmComment #26
eiriksmThanks. Just released a new beta right before this one, totally forgot I wanted to include it (it was kind of the point).
Just going to tag another beta with only this commit.
Thanks everyone for working on this!