We're starting with these issues, which were postponed from D6 as they're present in D7 only:

  1. Find an Active, unassigned "Variable to config:" issue
  2. Assign it to yourself when you start work on it
  3. Convert it, write a test and submit

#2130307: Variable to config: language.negotiation [d7]
#2130577: Variable to config: system.authorize [d7]
#2132207: Variable to config: tracker.settings [d7]
#2132221: Variable to config: user.flood [d7]
#2130609: Variable to config: system.mail [d7]
#2130583: Variable to config: system.menu [d7]
#2130283: Variable to config: image.settings [d7] Assigned to: samhassell
#2130277: Variable to config: filter.settings [D7 only]

To elaborate:

  1. Your guidelines are config/migrate.migration.d6_system_site.yml, lib/Drupal/migrate/Tests/MigrateSystemConfigsTest.php, lib/Drupal/migrate/Tests/Dump/Drupal6SystemSite.php

    Note: There's a not-quite-finished D7 example patch at #2130609: Variable to config: system.mail [d7]. Note: The drupal6_variable source plugin is being re-used, so the script will create a file that says:

    source:
      plugin: drupal6_variable
        variables:
        - mail_system

    That drupal6 label is correct.

    You'll also re-use Drupal6DumpCommon so:

    Drupal6DumpCommon::createVariable($database);
     

    correctly references Drupal6.

  2. Copy paste the update_variables_to_config call into the provided converter script and run it from your Drupal root. It will create the migration entity for you.
  3. Create your Dump class based on the source variables and any values you like. It's preferred to use the default values for the variables from D7 but if that's too much work, we are good with any values.
  4. If your module does not already have a MigrateModuleNameConfigsTest.php, create it. Now add a method for this specific config file based on the testSystemSite method which should be self explanatory: you need to change:
    • the second argument of the entity_load to the id found in the yaml (both file name and inside as id:),
    • the dump path,
    • the name of the config()
    • all the asserts
  5. Note that the test you are writing is a simpletest; full integration tests can't be done in phpunit (or not well). To execute simpletests from the command line, see https://drupal.org/node/645286

CommentFileSizeAuthor
#9 convert.php__8.txt631 bytesjoshtaylor
#8 convert.php__8.txt621 bytesbenjy
#4 convert.php_.txt624 byteseliza411
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eliza411’s picture

Issue summary: View changes
eliza411’s picture

Issue summary: View changes
eliza411’s picture

Issue summary: View changes
eliza411’s picture

Issue summary: View changes
FileSize
624 bytes
eliza411’s picture

Issue summary: View changes
eliza411’s picture

Issue summary: View changes
eliza411’s picture

Issue summary: View changes
benjy’s picture

FileSize
621 bytes

New version of the convert script attached with the new config plugin id.

joshtaylor’s picture

FileSize
631 bytes

Fixed issue where it was outputting 4 line spaces instead of 2.

benjy’s picture

Hidden mine so it doesn't confuse anyone since they're both named the same.

samhassell’s picture

Issue summary: View changes
chx’s picture

The current task is to ensure that the IMP sandbox contains a migration for all variables in update_variables_to_config calls in e373ebee3490120b13fb4062f37b9565e3b2474d^ or so.

An example:

  update_variables_to_config('aggregator.settings', array(
    'aggregator_fetcher' => 'fetcher',
    'aggregator_parser' => 'parser',
    'aggregator_processors' => 'processors',
    'aggregator_allowed_html_tags' => 'items.allowed_html',
    'aggregator_teaser_length' => 'items.teaser_length',
    'aggregator_clear' => 'items.expire',
    'aggregator_summary_items' => 'source.list_max',
  ));

compare to core/modules/migrate_drupal/config/install/migrate.migration.d6_aggregator_settings.yml (some might be d7 only as seen in the issue summary but most will be in the D6 files):

  variables:
    - aggregator_fetcher
    - aggregator_parser
    - aggregator_processors
    - aggregator_allowed_html_tags
    - aggregator_teaser_length
    - aggregator_clear
    - aggregator_summary_items

That's good, none are missing. If one would be missing ==> file an issue.

ksenzee’s picture

Here's a list of variables I found no migration for. There are enough that I wonder if I'm looking in the right place. I checked core/modules/migrate_drupal/config/install on the 8.x branch (which appears to have had the drupal7 branch merged into it). It would be good to get a reality check on this list before filing issues.

locale_translate_file_directory
menu_main_links_source
tracker_batch_size
taxonomy_maintain_index_table
cron_safe_threshold
feed_description
feed_item_length
maintenance_mode_message
cache
page_cache_maximum_age
page_compression
stale_file_threshold
menu_default_active_menus
site_default_country
date_first_day
date_default_timezone
configurable_timezones
empty_timezone_message
user_default_timezone
css_gzip_compression
js_gzip_compression
fast_404_html
fast_404_paths
fast_404_paths_exclude
allow_insecure_uploads
file_default_scheme
file_chmod_directory
file_chmod_file
file_private_path
file_temporary_path
mail_system
language_interface
language_content
language_url
filter_fallback_format
image_style_preview_image
default_nodes_main
forum_nav_vocabulary
forum_block_num_active
forum_block_num_new
update_check_disabled
update_check_frequency
update_max_fetch_time
anonymous
user_admin_role
user_register
user_signatures
user_cancel_method
user_mail_status_activated_notify
user_mail_status_blocked_notify
user_mail_status_cancelled_notify
user_email_verification
user_password_reset_timeout
register_admin_created_subject
register_admin_created_body
register_pending_approval_subject
register_pending_approval_body
register_pending_approval_admin_body
register_pending_approval_admin_subject
register_no_approval_required_subject
register_no_approval_required_body
password_reset_subject
password_reset_body
status_activated_subject
status_activated_body
status_blocked_subject
status_blocked_body
cancel_confirm_subject
cancel_confirm_body
status_canceled_subject
status_canceled_body
syslog_format
contact_threshold_limit
contact_threshold_window

chx’s picture

Fantastic! Here's a list that need to be deleted:

Everything _body and _subject . These need a separate issue if not yet done to migrate user mail things. And I believe these were bugs, the lot of them because https://api.drupal.org/api/drupal/modules%21user%21user.module/function/... they need to be prefixed by user_mail_

locale_translate_file_directory -- this was added to D8 only and removed since.

fast_404_paths
fast_404_paths_exclude
user_mail_status_cancelled_notify -- these three according to log only ever existed in update_variables_to_config. There is no other mention of it. I even Googled fast_404_paths hoping for a contrib, a blog post or something. Nada.

language_interface -- this got removed from d7 in #282191: TF #1: Allow different interface language for the same path before release.
language_url -- ??? that never existed as a variable as far as I know. I emailed plach and Gabor Hojtsy.

Here's a list that appears in D6 too:

allow_insecure_uploads
anonymous
configurable_timezones
contact_threshold_window
date_default_timezone
date_first_day
default_nodes_main
feed_item_length
forum_nav_vocabulary
language_content
page_compression
update_check_frequency
user_email_verification
user_register
user_signatures
user_mail_status_activated_notify
user_mail_status_blocked_notify

Seems like we made a shoddy work. Thanks ksenzee!

chx’s picture

Edit: sorry double post.

jcost’s picture

Project: IMP » Drupal core
Version: » 8.0.x-dev
Component: Code » migration system

Moving this from sandbox to Core.

nuwe’s picture

Hello @jcost I would like you to clarify if the tests should be written in 8.0.x-dev or in d7 but according to the author with these words "We're starting with these issues, which were postponed from D6 as they're present in D7 only:" I was thinking the tag "8.0.x-dev" should be changed

benjy’s picture

8.0.x-dev is the correct tag. These are the D7 to D8 migrations and the code will go into the 8.0.x branch

nuwe’s picture

Thanks @benjy so that means D6 to D7 migrations are not what we are working on

phenaproxima’s picture

webchick’s picture

A few of these have gone in now in the past few days:

Not 100% sure where that leaves us, though, since the issue summary is mostly pointing to "won't fix" issues atm.

webchick’s picture

Status: Active » Closed (duplicate)

According to @phenaproxima, #2456259: [META] Drupal 7 to Drupal 8 Migration path is a more up-to-date list of the remaining tasks, and it includes variable to config migrations.

Therefore, closing this one out as a duplicate.