Closed (outdated)
Project:
AudioField
Version:
7.x-1.0-beta7
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2012 at 00:47 UTC
Updated:
17 Oct 2016 at 12:05 UTC
Jump to comment: Most recent
Comments
Comment #1
ronline commentedAll of my missing content is sitting in content_type_audio table. I think that this are residual data of d6 audio_file module. It looks the table was supposed to be deleted and the content split into new d7 structure @maintainer could you please confirm?
I have moved residual data of one audio content to following tables: field_data_field_audio, file_usage, field_revision_field_audio, file_managed. It does the trick and the file is back to its corresponding audio node.
Comment #2
ronline commentedThe final fix :
Get all necessary data from content_type_audio and store them in a csv file.
SELECT cnt.vid, cnt.nid, cnt.field_audio_fid, fl.timestamp, fl.fid, fl.uid, fl.filename, fl.filepath, fl.filemime, fl.filesize
INTO OUTFILE '/tmp/content_type_audio.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM content_type_audio cnt, files fl
WHERE cnt.field_audio_fid = fl.fid AND cnt.nid BETWEEN 36 AND 120 ORDER BY cnt.nid;
Open the csv file in excel or soffice calc and copy corresponding columns in four following files:
field_data_field_audio.csv, field_revision_field_audio.csv, file_usage.csv, file_managed.csv
Load the data from csv files into database via terminal or phpMyAdmin with following sql commands.
LOAD DATA LOCAL INFILE '/server/path/field_data_field_audio.csv' INTO TABLE your_db_name.field_data_field_audio fields TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n';
LOAD DATA LOCAL INFILE '/server/path/field_revision_field_audio.csv' INTO TABLE your_db_name.field_revision_field_audio fields TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n';
LOAD DATA LOCAL INFILE '/server/path/file_usage.csv' INTO TABLE your_db_name.file_usage fields TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n';
LOAD DATA LOCAL INFILE '/server/path/file_managed.csv' INTO TABLE your_db_name.file_managed fields TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n';
The files are back now ...
Comment #3
ronline commentedComment #5
jenlamptonThis issue is definitely not fixed.
I ran into the same problem when upgrading a D6 site with audiofield content to D7. The problem occurs as all CCK fields are migrated from the old D6 CCK-style fields to the D7 core-style fields. CCK provides a module that does the migration for you (Content migrate) but audiofields are apparently un-migratable. CCK throws the following error:
Other file fields like images and PDFs get migrated smoothy, but for some reason the audiofields do not work the same way.
Comment #6
tamerzg commentedHave you tried switching your widget type to filefield file upload in D6, and then do the migration. When done you can easily change widget type to audio upload.
Comment #7
jenlamptonYes, the solution was to do a manual database query to update both the widget type to 'filefield_widget' and module to filefield, as per #1295286: Migration of filefield fields reports that this requires filefield module, even though its functionality was moved into core!
Comment #8
captaingeek commentedcould i get some help with this im running audio fields and am lost after upgrade.
Comment #9
captaingeek commentedI tried putting this in a php file and running from the web server and am getting http 500 error. Lil help?
Comment #11
ws.agency commented