I have used this module to successfully migrate 2 of my 3 cp-types to p2 but one cp-type is producing an error on drush cp2p2-migrate which is attached.
I have looked closely at the error and at the cp-type fields but cannot see where the problem is. Two cp-nodes have actually been migrated before the error is generated.
Can anyone help me to debug this please as I am stuck?
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | cp2p2-n1916174-7.patch | 1.2 KB | damienmckenna |
Comments
Comment #1
damienmckennaThe table giving the errors is file_usage which tracks the locations that files are being used, which can help prevent files from being removed if they are used in multiple locations. This sounds like a file field is not converted properly.
Comment #2
gerontas commentedThanks Damien
I had looked at that but the only fields that could qualify are image fields and they have migrated successfully in my other cp-types. I will look again to see if there is a problem with them.
Comment #3
gerontas commentedI have been away from this for a while but I am still getting this error and I also get it when using the method from here http://www.freelock.com/blog/john-locke/2012-08/migrating-content-profil...
The content-profile that is causing the errors has two image fields and some are empty. I have looked around ( searching on...
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'fid' cannot be nulland there are several similar problems where an empty file/image field will not save. I am having trouble understanding the posts but I don't think it's necessarily something in my set-up as I can see nothing amiss, except that some image fields are empty.
Any advice please?
Comment #4
shabbir commentedtrying going through this forum https://drupal.org/node/1627860 ..the patch in comment #15 worked for me. :)
Comment #5
grzesag commentedHi
I am in the process of upgrading D6 Content Profile nodes to Profile 2. I am using beta release of CP2P2 and all fields have been converted fine from Content Profile to Profiles 2 fields. When Migrating data using CP2P2 drush I have problem with field that on D6 is upload field (allows user to upload/attach files such as pdf, jpg etc).
This is what I did:
- upgraded D6 to D7 core modules
- installed CCK migrate and updated/migrated data
- installed CP2P2 etc and converted and migrated data
I see that files attached to the profiles on the D6 are not shown. I notices that this is due to the fact that in the field_usage, field_data_upload there is incorrect entry - it is entry for node id that was storing this information and not to the current user profile2 entity_id (as per profile table mapping uid -> entity_id)
I would appreciate any help with this.
just wondering if I am doing something in wrong order or there is a bug in the CP2P2 code
Thank you for your help
Greg
Comment #6
grzesag commentedlooking further at this I found solution
cp2p2.drush.inc line 379 assumes that all fields are name as field_{somethinghere} which is not true for upload field (Drupal 6 enabled Upload files to the content profile type) The name of that field is "upload" so I had to change the line 379 in cp2p.drush.inc into this one:
if (strpos($key, 'field_') === 0 || strpos($key, 'upload') === 0) {and attached files migrated fine
Hope you will find this comment useful
Greg
Comment #7
damienmckennaWhich module provides fields starting with "upload"? The Image module or something?
Comment #9
damienmckenna