Problem/Motivation

When migrating a node of type page, the UID does not get set during the migration. On a Drupal 6 site I have a node where the the uid is set to some number greater than 1. When migrating the node the migrated copy gets a UID of 1 instead of the same value as the D6 site. The user I am using as my test case exists in both systems and the UID is the same in both cases.

It seems this can happen if an admin creates a node and sets the author to someone.

Proposed resolution

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vendion’s picture

ultimike’s picture

ultimike’s picture

@vendion,

If you ran this test using the D6Manifest-Node.yml file, then users were not migrated, only nodes. You can retest this by combining the .yml from #2224001: Manual testing (D6->D8): User and User Profile with the D6Manifest-Node.yml and I think you'll have better luck.

Let me know.

Thanks,
-mike

benjy’s picture

I tested this with the following manifest file and still had the error reported in the issue. @ultimike, did you have this work at some point?

- d6_user
- d6_user_profile_field
- d6_user_profile_field_instance
- d6_user_profile_entity_display
- d6_user_profile_entity_form_display
- d6_profile_values:user
- d6_filter_format
- d6_user_role
- d6_user_picture_entity_display
- d6_user_picture_entity_form_display
- d6_user_picture_file
- d6_user_picture_field
- d6_user_picture_field_instance

- d6_node
- d6_node_revision
- d6_node_type
- d6_view_modes
- d6_filter_format
- d6_field_instance_per_form_display
- d6_field_instance_widget_settings
- d6_field_formatter_settings
- d6_field_instance
- d6_field
- d6_field_settings
- d6_node_settings
- d6_cck_field_values:*
- d6_cck_field_revision:*
Anonymous’s picture

This is still an issue, even with both manifests merged.

Anonymous’s picture

Status: Active » Needs review
FileSize
566 bytes

I tracked down the source of the error and I have rolled a patch.

It seems in D6 that if User 1 creates a post and specifies another user as author of that node (let's say uid = 3) in the database it will be:

node.uid = 3
node_revisions.uid = 1

So this was previously working if the user authored the content themself, but D6 will only display what is in the node table, completely ignoring what is in the node_revisions table. Thus, I have moved the UID mapping from node_revisions to node table.

Status: Needs review » Needs work
Anonymous’s picture

Status: Needs work » Needs review
FileSize
1.32 KB

Reroll: Test should no longer expect to see uid returned from node_revisions query.

Anonymous’s picture

This patch affects only the test dumps, adding uid to the node context.

Status: Needs review » Needs work

The last submitted patch, 9: drupal-author-information-test-dumps-2281591-9.patch, failed testing.

chx’s picture

Issue summary: View changes
Anonymous’s picture

Status: Needs work » Needs review
FileSize
1.58 KB

Updated per chx's comments... tests are still going to fail though (passes in phpunit, fails in simpletest). I've finally got my head wrapped around most of the testing things but I'm on client projects for the next few days if someone else wants to pick this up, please do. :)

My suspicion is that since we are trying to test for a different uid in node and node_revisions tables, that the NodeRevision tests need to deal with uid = 2 somehow. Feedback welcome. Feeling like I'm close figuring this out but just short on time...

Status: Needs review » Needs work

The last submitted patch, 12: drupal-author-information-test-dumps-2281591-12.patch, failed testing.

benjy’s picture

Status: Needs work » Needs review
FileSize
1.67 KB
563 bytes

There was a fatal error in the creation of the tables so i've re-rolled the patch and fixed that once issue. Lets see what the bot says now.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Drupal 6, ouch! Thanks for fixing this.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

  • webchick committed bf7e5e2 on 8.0.x
    Issue #2281591 by benjy, Ryan Weal, vendion: Author information does not...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.