diff --git a/web/modules/custom/materio_migrate/src/Plugin/migrate/source/D7FlagListsMaterio.php b/web/modules/custom/materio_migrate/src/Plugin/migrate/source/D7FlagListsMaterio.php index b5dddf3..020eeb9 100644 --- a/web/modules/custom/materio_migrate/src/Plugin/migrate/source/D7FlagListsMaterio.php +++ b/web/modules/custom/materio_migrate/src/Plugin/migrate/source/D7FlagListsMaterio.php @@ -116,8 +116,12 @@ class D7FlagListsMaterio extends SqlBase { // limit folder name to 32 characters (32 bytes, special chars like é use 2 bytes) $title = $row->getSourceProperty('title'); $title = $this->remove_accents($title); + $title = preg_replace("/\s+/", " ", $title); if (mb_strlen($title) > 32) { - $title = mb_strcut($title, 0 , 28).'...'; + // drush_print('long ' . $title); + + $title = mb_strcut($title, 0 , 25).'…'; + // drush_print('short' . $title); } $row->setSourceProperty('title', $title); diff --git a/web/modules/custom/materio_migrate/src/Plugin/migrate/source/D7UcRolesLicense.php b/web/modules/custom/materio_migrate/src/Plugin/migrate/source/D7UcRolesLicense.php index 823aed4..5a35ae6 100644 --- a/web/modules/custom/materio_migrate/src/Plugin/migrate/source/D7UcRolesLicense.php +++ b/web/modules/custom/materio_migrate/src/Plugin/migrate/source/D7UcRolesLicense.php @@ -150,7 +150,7 @@ class D7UcRolesLicense extends DrupalSqlBase { $last_order = $first_order; } - drush_print(print_r($last_order, true)); + // drush_print(print_r($last_order, true)); // put the right product variation web OR web-showroom switch($last_order['model']){ case "abo01-A": @@ -163,7 +163,7 @@ class D7UcRolesLicense extends DrupalSqlBase { } if(isset($product_variation_id)){ - drush_print($row->getSourceProperty('mail').' product_variation_id: '.$product_variation_id); + // drush_print($row->getSourceProperty('mail').' product_variation_id: '.$product_variation_id); $row->setSourceProperty('product_variation_id', $product_variation_id); } }