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.
Created from #1775842: [meta] Convert all variables to state and/or config systems.
file_default_scheme file.inc
file_description_length file.field.inc
file_description_type file.field.inc
file_icon_directory file.field.inc
Comments
Comment #1
simeHere goes!
Comment #2
simeMoved file_default_schema to [1799504]
Comment #3
simeUnassigning, as I got caught up on the #1799504: Convert system file related variables to CMI.
Comment #4
Albert Volkman CreditAttribution: Albert Volkman commentedFirst pass at this.
Comment #6
Albert Volkman CreditAttribution: Albert Volkman commented#4: file_module_variables_cmi-1804394-4.patch queued for re-testing.
Comment #7
aspilicious CreditAttribution: aspilicious commentedWe should move length and type under description.
description:
- type
- length
icon directory needs to be in here too. And that one probably needs the same structure as above.
Comment #8
Albert Volkman CreditAttribution: Albert Volkman commentedHow's this?
Comment #9
aspilicious CreditAttribution: aspilicious commentedI think you forgot to add the update function?
Comment #10
ruth_delattre CreditAttribution: ruth_delattre commentedComment #11
ruth_delattre CreditAttribution: ruth_delattre commentedAdded hook_update_N
Comment #13
ruth_delattre CreditAttribution: ruth_delattre commentedComment #14
ruth_delattre CreditAttribution: ruth_delattre commentedComment #15
ruth_delattre CreditAttribution: ruth_delattre commentedadded config-file
Comment #16
ruth_delattre CreditAttribution: ruth_delattre commentedComment #18
ruth_delattre CreditAttribution: ruth_delattre commentedFixed spelling and indentation errors in yml file
Comment #19
aspilicious CreditAttribution: aspilicious commented"=drupal" needs an extra space. Same for "e').'/'"
Comment #20
ruth_delattre CreditAttribution: ruth_delattre commentedadded spaces:
changed
$icon_directory =drupal_get_path('module', 'file').'/'.config('file.settings')->get('icon.directory');
to
$icon_directory = drupal_get_path('module', 'file') .'/'. config('file.settings')->get('icon.directory');
Comment #21
ruth_delattre CreditAttribution: ruth_delattre commentedadded even more spaces :-/
$icon_directory = drupal_get_path('module', 'file') .'/'. config('file.settings')->get('icon.directory');
is now:
$icon_directory = drupal_get_path('module', 'file') . '/' . config('file.settings')->get('icon.directory');
Comment #22
penyaskitoRTBC for me.
Comment #23
penyaskitoOops...
Comment #24
aspilicious CreditAttribution: aspilicious commentedI missed this in my previous review.
Now we have to hack core if we want a different icon directory that is NOT located in the file module. The correct solution is to hardcode the path in the yml file. Something like "core/modules/file/icons".
Comment #25
ruth_delattre CreditAttribution: ruth_delattre commentedthanx! I wasnt sure which is the better practice but your comment makes complete and utter sense!
Here is the patch with the new path
Comment #26
penyaskitoYou added the core/modules/file/config/file.settings.yml~ file by accident.
Otherwise, looks fine to me.
Comment #27
ruth_delattre CreditAttribution: ruth_delattre commentedOops, sorry. Thought I had removed it, but it snug back in. Now, its clean.
Comment #28
ruth_delattre CreditAttribution: ruth_delattre commentedComment #29
catchWhile we're looking at this, does anyone know what these two variables actually exist for?
This isn't related to converting them to CMI, but I'm not sure why they exist at all.
Comment #30
catchPosted a new issue to ask about the variables. Committed/pushed the patch here to 8.x. Thanks!
Comment #31.0
(not verified) CreditAttribution: commentedMoved to 1799504