trying to fix flaglist migration too long ids

This commit is contained in:
Bachir Soussi Chiadmi 2021-08-01 08:53:25 +02:00
parent 780a545cae
commit 5c4facf0ea
2 changed files with 7 additions and 3 deletions

View File

@ -116,8 +116,12 @@ class D7FlagListsMaterio extends SqlBase {
// limit folder name to 32 characters (32 bytes, special chars like é use 2 bytes) // limit folder name to 32 characters (32 bytes, special chars like é use 2 bytes)
$title = $row->getSourceProperty('title'); $title = $row->getSourceProperty('title');
$title = $this->remove_accents($title); $title = $this->remove_accents($title);
$title = preg_replace("/\s+/", " ", $title);
if (mb_strlen($title) > 32) { 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); $row->setSourceProperty('title', $title);

View File

@ -150,7 +150,7 @@ class D7UcRolesLicense extends DrupalSqlBase {
$last_order = $first_order; $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 // put the right product variation web OR web-showroom
switch($last_order['model']){ switch($last_order['model']){
case "abo01-A": case "abo01-A":
@ -163,7 +163,7 @@ class D7UcRolesLicense extends DrupalSqlBase {
} }
if(isset($product_variation_id)){ 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); $row->setSourceProperty('product_variation_id', $product_variation_id);
} }
} }