Migrate the image styles to preserv the images.
Also, it was added the following things in the settings file to allow the inline images: $config['image.settings']['suppress_itok_output'] = TRUE; $config['image.settings']['allow_insecure_derivatives'] = TRUE;
This commit is contained in:
parent
f72f24277a
commit
d82b83eebb
3 changed files with 55 additions and 31 deletions
|
@ -0,0 +1,37 @@
|
|||
uuid: 477a3fef-10c8-43e9-8e89-707878735663
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: upgrade_d7_image_styles
|
||||
class: Drupal\migrate\Plugin\Migration
|
||||
field_plugin_method: null
|
||||
cck_plugin_method: null
|
||||
migration_tags:
|
||||
- 'Drupal 7'
|
||||
- Configuration
|
||||
migration_group: migrate_drupal_7
|
||||
label: 'Image styles'
|
||||
source:
|
||||
plugin: d7_image_styles
|
||||
process:
|
||||
name:
|
||||
-
|
||||
plugin: get
|
||||
source: name
|
||||
label:
|
||||
-
|
||||
plugin: get
|
||||
source: label
|
||||
effects:
|
||||
-
|
||||
plugin: sub_process
|
||||
source: effects
|
||||
process:
|
||||
id: name
|
||||
weight: weight
|
||||
data: data
|
||||
destination:
|
||||
plugin: 'entity:image_style'
|
||||
migration_dependencies:
|
||||
required: { }
|
||||
optional: { }
|
|
@ -1,12 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* #ddev-generated: Automatically generated Drupal settings file.
|
||||
* ddev manages this file and may delete or overwrite the file unless this
|
||||
* comment is removed.
|
||||
*/
|
||||
|
||||
$host = "db";
|
||||
$port = 3306;
|
||||
|
||||
|
@ -27,6 +20,16 @@ $databases['default']['default'] = array(
|
|||
'prefix' => "",
|
||||
);
|
||||
|
||||
$databases['drupal7']['default'] = [
|
||||
'database' => "drupal7",
|
||||
'username' => "db",
|
||||
'password' => "db",
|
||||
'host' => $host,
|
||||
'driver' => "mysql",
|
||||
'port' => $port,
|
||||
'prefix' => "",
|
||||
];
|
||||
|
||||
ini_set('session.gc_probability', 1);
|
||||
ini_set('session.gc_divisor', 100);
|
||||
ini_set('session.gc_maxlifetime', 200000);
|
||||
|
@ -50,3 +53,11 @@ $settings['trusted_host_patterns'] = ['.*'];
|
|||
// better performance.
|
||||
$settings['class_loader_auto_detect'] = FALSE;
|
||||
|
||||
$config['image.settings']['suppress_itok_output'] = TRUE;
|
||||
$config['image.settings']['allow_insecure_derivatives'] = TRUE;
|
||||
|
||||
|
||||
// This specifies the default configuration sync directory.
|
||||
if (empty($config_directories[CONFIG_SYNC_DIRECTORY])) {
|
||||
$config_directories[CONFIG_SYNC_DIRECTORY] = '../config/sync';
|
||||
}
|
||||
|
|
|
@ -4,27 +4,3 @@
|
|||
if (file_exists($app_root . '/' . $site_path . '/settings.ddev.php')) {
|
||||
include $app_root . '/' . $site_path . '/settings.ddev.php';
|
||||
}
|
||||
$host = "db";
|
||||
$port = 3306;
|
||||
|
||||
// If DDEV_PHP_VERSION is not set, it means we're running on the host,
|
||||
// so use the host-side bind port on docker IP
|
||||
if (empty(getenv('DDEV_PHP_VERSION'))) {
|
||||
$host = "127.0.0.1";
|
||||
$port = 32768;
|
||||
}
|
||||
|
||||
$databases['drupal7']['default'] = [
|
||||
'database' => "drupal7",
|
||||
'username' => "db",
|
||||
'password' => "db",
|
||||
'host' => $host,
|
||||
'driver' => "mysql",
|
||||
'port' => $port,
|
||||
'prefix' => "",
|
||||
];
|
||||
|
||||
// This specifies the default configuration sync directory.
|
||||
if (empty($config_directories[CONFIG_SYNC_DIRECTORY])) {
|
||||
$config_directories[CONFIG_SYNC_DIRECTORY] = '../config/sync';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue