| Project: | Media Mover |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Thanks for getting this out here Arthur!
I'm having some database related issues. Upon enabling the three modules included in the CVS repository, I get the following error:
user warning: Key column 'mm_id' doesn't exist in table query: CREATE TABLE media_mover_files ( `nid` int(11) default NULL, `fid` int(11) NOT NULL default '0', `cid` int(11) default NULL, `harvest_module` varchar(225) default NULL, `harvest_action` varchar(128) default NULL, `harvest_file` varchar(128) default NULL, `process_module` varchar(128) default NULL, `process_action` varchar(128) default NULL, `process_file` varchar(128) default NULL, `storage_module` varchar(128) default NULL, `storage_action` varchar(128) default NULL, `storage_file` varchar(128) default NULL, `url` varchar(255) NOT NULL default '', `status` int(11) NOT NULL default '0', PRIMARY KEY (`fid`), KEY `nid` (`nid`), KEY `mm_id` (`mm_id`) ) ; in /var/www/html/includes/database.mysql.inc on line 121.
Two other SQL errors I'm getting are, on admin/media_mover/files:
* user warning: Table 'drupal.media_mover_files' doesn't exist query: SELECT COUNT(*) FROM media_mover_files in /var/www/html/includes/database.mysql.inc on line 121.
* user warning: Table 'drupal.media_mover_files' doesn't exist query: SELECT * FROM media_mover_files ORDER BY status LIMIT 0, 10 in /var/www/html/includes/database.mysql.inc on line 121....and when I attach a video to a page using upload.module, this error appears when I view the page:
user warning: Table 'drupal.media_mover_files' doesn't exist query: SELECT * FROM media_mover_files WHERE nid= 1 in /var/www/html/includes/database.mysql.inc on line 121.
Perhaps the media_mover.install file is out of date?
Comments
#1
yep, looks like I forgot to change the index to cid. That's fixed. You'll need to reinstall to get the tables right again. Sorry about that!
#2
#3
i got almost the same with 6.x-2.x-dev
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' fid (cid, fid) ) /*!40100 DEFAULT CHARACTER SET utf8 */' at line 19 query: CREATE TABLE media_mover_files ( `mmfid` INT auto_increment DEFAULT NULL, `nid` INT unsigned DEFAULT NULL, `fid` INT unsigned DEFAULT NULL, `cid` VARCHAR(255) DEFAULT '', `step_order` INT unsigned DEFAULT NULL, `source_filepath` MEDIUMTEXT DEFAULT NULL, `filepath` MEDIUMTEXT DEFAULT NULL, `filesize` INT unsigned DEFAULT NULL, `status` VARCHAR(255) DEFAULT NULL, `date` INT NOT NULL DEFAULT 0, `lock_date` INT NOT NULL DEFAULT 0, `data` LONGTEXT DEFAULT NULL, PRIMARY KEY (mmfid), INDEX mmfid (mmfid), INDEX nid (nid), INDEX cid (cid), INDEX fid (fid), INDEX cid, fid (cid, fid) ) /*!40100 DEFAULT CHARACTER SET utf8 */ in C:\xampp\htdocs\ferrero\includes\database.inc on line 550.
#4
active
#5
i'm not sure, but by phpmyadmin and looking other sqls from drupal modules, the correct would be below, no?
media_mover_api.install line 87:
'cid, fid' => array('cid', 'fid'),
change to:
'cid_fid' => array('cid', 'fid'),
Am i worng or you can't have two words separeted by comma as a index name?
Resulting sql:
CREATE TABLE media_mover_files ( `mmfid` INT auto_increment DEFAULT NULL, `nid` INT unsigned DEFAULT NULL, `fid` INT unsigned DEFAULT NULL, `cid` VARCHAR(255) DEFAULT '', `step_order` INT unsigned DEFAULT NULL, `source_filepath` MEDIUMTEXT DEFAULT NULL, `filepath` MEDIUMTEXT DEFAULT NULL, `filesize` INT unsigned DEFAULT NULL, `status` VARCHAR(255) DEFAULT NULL, `date` INT NOT NULL DEFAULT 0, `lock_date` INT NOT NULL DEFAULT 0, `data` LONGTEXT DEFAULT NULL, PRIMARY KEY (mmfid), INDEX mmfid (mmfid), INDEX nid (nid), INDEX cid (cid), INDEX fid (fid), INDEX cid_fid (cid, fid) )
#6
I think you're right, and since the line below is used to index cid, I believe this should be 'fid' => array('fid') only.
#7
When i changed it worked, but i didn't test too much.
I gave up from this module because Video module fits best my situation.
#8
Bug is there in 6.x-1.x, attached is the obvious patch.
#9
the 6x 2x dev version still has the typo. Therefore upon enabling the API table files is not created until indexes cid, fid is changed to cid_fid
#10
futhermore until at least one configuration is added the landing UI is wsod. Because error in logs: Missing argument 1 for mm_cck_media_mover() in .../sites/all/modules/media_mover/contrib/mm_cck/mm_cck.module on line 84.
#11
and now the files table exists but cck is not working. Could you please let me know if you are able to reproduce on fresh install by just installing the latest dev?
#12
Confirming: having the same issues in both 6.x-2.x-dev and 6.x-1.x-dev installs. Thanks for the great work on this. Hope you find the fixes soon enough.
#13
Any news on a possible release with a fix? I'd love to start using this module on my website. Thanks so much. :)
#14
Patch #8 works for me. Still an issue..