trying to fix flaglist migration too long ids
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user