Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443205
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443205
Commits
abbeb3c9
Commit
abbeb3c9
authored
9 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2588421
by neclimdul: CckLinks double unserialized attributes array
parent
829415ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/link/src/Plugin/migrate/process/d6/CckLink.php
+5
-2
5 additions, 2 deletions
core/modules/link/src/Plugin/migrate/process/d6/CckLink.php
core/modules/migrate_drupal/tests/fixtures/drupal6.php
+80
-0
80 additions, 0 deletions
core/modules/migrate_drupal/tests/fixtures/drupal6.php
with
85 additions
and
2 deletions
core/modules/link/src/Plugin/migrate/process/d6/CckLink.php
+
5
−
2
View file @
abbeb3c9
...
...
@@ -45,8 +45,11 @@ public static function create(ContainerInterface $container, array $configuratio
* {@inheritdoc}
*/
public
function
transform
(
$value
,
MigrateExecutableInterface
$migrate_executable
,
Row
$row
,
$destination_property
)
{
// Drupal 6 link attributes are double serialized.
$attributes
=
unserialize
(
unserialize
(
$value
[
'attributes'
]));
$attributes
=
unserialize
(
$value
[
'attributes'
]);
// Drupal 6 link attributes might be double serialized.
if
(
!
is_array
(
$attributes
))
{
$attributes
=
unserialize
(
$attributes
);
}
// Massage the values into the correct form for the link.
$route
[
'uri'
]
=
$value
[
'url'
];
...
...
This diff is collapsed.
Click to expand it.
core/modules/migrate_drupal/tests/fixtures/drupal6.php
+
80
−
0
View file @
abbeb3c9
...
...
@@ -2021,6 +2021,12 @@
'field_test_value' => NULL,
'field_test_format' => NULL,
))
->values(array(
'vid' => '12',
'nid' => '9',
'field_test_value' => 'text for default value',
'field_test_format' => '1',
))
->execute();
$connection->schema()->createTable('content_field_test_text_single_checkbox', array(
...
...
@@ -2077,6 +2083,11 @@
'nid' => '2',
'field_test_text_single_checkbox_value' => NULL,
))
->values(array(
'vid' => '12',
'nid' => '9',
'field_test_text_single_checkbox_value' => '0',
))
->execute();
$connection->schema()->createTable('content_field_test_two', array(
...
...
@@ -2146,6 +2157,12 @@
'delta' => '0',
'field_test_two_value' => NULL,
))
->values(array(
'vid' => '12',
'nid' => '9',
'delta' => '0',
'field_test_two_value' => NULL,
))
->values(array(
'vid' => '1',
'nid' => '1',
...
...
@@ -3233,6 +3250,34 @@
'field_test_imagefield_list' => NULL,
'field_test_imagefield_data' => NULL,
))
->values(array(
'nid' => '9',
'vid' => '12',
'uid' => '0',
'field_test_three_value' => '101.00',
'field_test_identical1_value' => NULL,
'field_test_identical2_value' => NULL,
'field_test_link_url' => 'http://www.example.com/buy-one-upon-a-time',
'field_test_link_title' => 'Buy it now',
'field_test_link_attributes' => 'a:1:{s:6:"target";s:6:"_blank";}',
'field_test_date_value' => NULL,
'field_test_datestamp_value' => NULL,
'field_test_datetime_value' => NULL,
'field_test_email_email' => NULL,
'field_test_filefield_fid' => NULL,
'field_test_filefield_list' => NULL,
'field_test_filefield_data' => NULL,
'field_test_four_value' => '101',
'field_test_integer_selectlist_value' => NULL,
'field_test_float_single_checkbox_value' => '3',
'field_test_decimal_radio_buttons_value' => NULL,
'field_test_phone_value' => NULL,
'field_test_exclude_unset_value' => 'text for default value',
'field_test_exclude_unset_format' => '1',
'field_test_imagefield_fid' => NULL,
'field_test_imagefield_list' => NULL,
'field_test_imagefield_data' => NULL,
))
->execute();
$connection->schema()->createTable('content_type_test_page', array(
...
...
@@ -21406,6 +21451,23 @@
'tnid' => '0',
'translate' => '0',
))
->values(array(
'nid' => '9',
'vid' => '12',
'type' => 'story',
'language' => '',
'title' => 'Once upon a time',
'uid' => '1',
'status' => '1',
'created' => '1444671588',
'changed' => '1444671588',
'comment' => '2',
'promote' => '1',
'moderate' => '0',
'sticky' => '0',
'tnid' => '0',
'translate' => '0',
))
->execute();
$connection->schema()->createTable('node_access', array(
...
...
@@ -21541,6 +21603,13 @@
'last_comment_uid' => '1',
'comment_count' => '0',
))
->values(array(
'nid' => '9',
'last_comment_timestamp' => '1444671588',
'last_comment_name' => NULL,
'last_comment_uid' => '1',
'comment_count' => '0',
))
->execute();
$connection->schema()->createTable('node_counter', array(
...
...
@@ -21773,6 +21842,17 @@
'timestamp' => '1390095701',
'format' => '1',
))
->values(array(
'nid' => '9',
'vid' => '12',
'uid' => '1',
'title' => 'Once upon a time',
'body' => 'Come on kid, go to sleep.',
'teaser' => 'Come on kid, go to sleep.',
'log' => '',
'timestamp' => '1444671588',
'format' => '1',
))
->execute();
$connection->schema()->createTable('node_type', array(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment