Commit 560db5b3 authored by webchick's avatar webchick

Issue #2558931 by phenaproxima, quietone: link_default plugin does not exist (d6)

parent bcf90b17
......@@ -212,8 +212,22 @@ public function load() {
'visibility' => '2',
'autocomplete' => '0',
'options' => '',
))->values(array(
'fid' => '16',
'title' => 'Blog',
'name' => 'profile_blog',
'explanation' => 'Paste the full URL, including http://, of your personal blog.',
'category' => 'Personal information',
'page' => '',
'type' => 'url',
'weight' => '3',
'required' => '0',
'register' => '0',
'visibility' => '3',
'autocomplete' => '0',
'options' => '',
))->execute();
}
}
#59b9afb9195888ed98c5b2dc0c35305c
#f403976a12145f09209b3a2781684305
......@@ -27,7 +27,7 @@ process:
selection: list_default
textfield: text_default
textarea: text_default
url: link_default
url: link
options: 'constants/options'
'options/type': @type
hidden:
......@@ -39,3 +39,6 @@ process:
4: true # PROFILE_HIDDEN
destination:
plugin: component_entity_display
migration_dependencies:
required:
- user_profile_field_instance
......@@ -7,7 +7,6 @@
namespace Drupal\user\Tests\Migrate;
use Drupal\Core\Database\Database;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
......@@ -29,66 +28,8 @@ class MigrateUserProfileEntityDisplayTest extends MigrateDrupal6TestBase {
*/
protected function setUp() {
parent::setUp();
// Create some fields so the data gets stored.
entity_create('field_storage_config', array(
'entity_type' => 'user',
'field_name' => 'profile_color',
'type' => 'text',
))->save();
entity_create('field_storage_config', array(
'entity_type' => 'user',
'field_name' => 'profile_biography',
'type' => 'text_long',
))->save();
entity_create('field_storage_config', array(
'entity_type' => 'user',
'field_name' => 'profile_sell_address',
'type' => 'boolean',
))->save();
entity_create('field_storage_config', array(
'entity_type' => 'user',
'field_name' => 'profile_sold_to',
'type' => 'list_string',
))->save();
entity_create('field_storage_config', array(
'entity_type' => 'user',
'field_name' => 'profile_bands',
'type' => 'text',
'cardinality' => -1,
))->save();
entity_create('field_storage_config', array(
'entity_type' => 'user',
'field_name' => 'profile_blog',
'type' => 'link',
))->save();
entity_create('field_storage_config', array(
'entity_type' => 'user',
'field_name' => 'profile_birthdate',
'type' => 'datetime',
))->save();
entity_create('field_storage_config', array(
'entity_type' => 'user',
'field_name' => 'profile_love_migrations',
'type' => 'boolean',
))->save();
$field_data = Database::getConnection('default', 'migrate')
->select('profile_fields', 'u')
->fields('u')
->execute()
->fetchAll();
foreach ($field_data as $field) {
entity_create('field_config', array(
'label' => $field->title,
'description' => '',
'field_name' => $field->name,
'entity_type' => 'user',
'bundle' => 'user',
'required' => 1,
))->save();
}
$this->executeMigration('user_profile_field');
$this->executeMigration('user_profile_field_instance');
$this->executeMigration('user_profile_entity_display');
}
......
......@@ -64,12 +64,10 @@ public function testUserProfileFields() {
$this->assertIdentical('Favorite bands', $field->label());
$this->assertIdentical("Enter your favorite bands. When you've saved your profile, you'll be able to find other people with the same favorites.", $field->getDescription());
/*
// Migrated URL field.
$field = FieldConfig::load('user.user.profile_blog');
$this->assertIdentical('Your blog', $field->label());
$this->assertIdentical("Paste the full URL, $field->getDescription(), including http://, of your personal blog.");
*/
$this->assertIdentical('Blog', $field->label());
$this->assertIdentical("Paste the full URL, including http://, of your personal blog.", $field->getDescription());
// Migrated date field.
$field = FieldConfig::load('user.user.profile_birthdate');
......
......@@ -64,11 +64,9 @@ public function testUserProfileFields() {
$this->assertIdentical('text', $field_storage->getType(), 'Field type is text.');
$this->assertIdentical(-1, $field_storage->getCardinality(), 'List field has correct cardinality');
/*
// Migrated URL field.
$field_storage = FieldStorageConfig::load('user.profile_blog');
$this->assertIdentical('link', $field_storage->getType(), 'Field type is link.');
*/
// Migrated date field.
$field_storage = FieldStorageConfig::load('user.profile_birthdate');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment