Closed (fixed)
Project:
Media Mover
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2013 at 15:20 UTC
Updated:
25 Feb 2013 at 02:22 UTC
Jump to comment: Most recent file
Media Mover core has been converted to D7. Passing coder upgrade on D6 version and comparing to D7 I found a number of API differences that were not addressed in D7. There are also coding conventions changes.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | media_mover_core_menurouter-1920280-13.patch | 14.46 KB | iva2k |
| #20 | media_mover_runtime_warnings_misc-1920280-20.patch | 3.98 KB | iva2k |
| #19 | media_mover_coder_upgr-1920280-19.patch | 17.06 KB | iva2k |
| #18 | media_mover_cache_set_misc_fixes-1920280-18.patch | 4.28 KB | iva2k |
| #17 | media_mover_db_api_misc_fixes_1920280-17.patch | 13.61 KB | iva2k |
Comments
Comment #1
arthurf commentedAny work at this point should only focus on D7.
Comment #2
iva2k commentedCore patch (copy from #52 #987000: [META] D7 port of media_mover module
The following changes are included:
Comment #3
iva2k commentedThis patch is from #53 for submodules mentioned in #48 #987000: [META] D7 port of media_mover module (mm_dir, mm_antiword, mm_ffmpeg, mm_compress)
It is mostly coding conventions, plus use MMA_CONFIG_PATH throughout and fix some inconsistent paths.
Comment #4
iva2k commentedThis patch is from #55 for other submodules that were not converted to D7 yet (mm_export, mm_ftp, mm_getid3, mm_imageache, mm_mailhandler, mm_s3, mm_token, mm_views).
Comment #5
iva2k commentedThis patch is from #54 #987000: [META] D7 port of media_mover module for mm_node and mm_utilities. It has a lot of API updates and bugfixes, but does not make them work yet. Posting here so if there is a redesign of these modules, it goes from a better starting point that is in sync with the core.
Comment #6
arthurf commentedPatch on #2 passes all of the existing tests. I'll start digging through this by hand in the next bit.
Comment #7
iva2k commented@arthurf
I made another big effort towards getting Field API support. I made a submodule that takes files from file field and puts results of conversion back into (another) file field. It just made first successful end-to-end conversion. In the process I found and fixed some other issues in the core. So I have two pieces of new code: 1. additional fixes to the core, 2. new submodule.
Question: how do you want me to proceed?
A. I can file separate issues on every bug I find.
(there could be quite a number of those and I'm afraid it will slow me down as I will have to wait for review-commit cycle)
B. I can keep posting one big patch here for core, but that will probably delay your review of it.
C. Other approach?
Comment #8
arthurf commented@iva2k Thanks again for all your work here. I think the way to proceed is to break out new functionality into new issues (eg: file field stuff) and have one thread for core fixes. You've clearly done lots of work and I just want to get a chance to go through it as I'm surprised to hear that you're finding so many issues.
It would also be good to break code style issues from bug fixes- maybe leave what you've done thus far but in the future break them out- this will make it faster for me to get things committed.
Comment #9
arthurf commentedI committed most of #2 along with some changes that I had in my sandbox. I ran the simple tests and did some quick tests of the UI and things looked good. I'll go back through with coder and try to get things more cleaned up later today.
Comment #10
iva2k commented@arthurf
Re #8
For the code style fixes - I generally think it should be done once, before any other changes so everybody's life is easier. Unfortunately I did not have an opportunity to do that as I needed to get to the functionality in a short time window that I have.
BTW, did you know that you can use drupal testbot to do the style checks? you can enable the testbot for the project and then run the tests on qa.drupal.org. There will be a separate report of coding style issues. Also every submitted patch (if marked 'needs review') will be automatically tested.
Re #9
Great, I will pull git and see if I can roll incremental core patch.
As to the issues, I'm finding them, also code that looks like remnants of old APIs and old functionality. E.g. there is a function media_mover_api_dir_path1() in media_mover_api.module, but there are calls in some submodules to media_mover_api_dir_path() that does not exist. I'm finding use of $file->step in class_media_mover_file and media_mover_api.module, but no code that ever sets it.
I will work on cleaning up the new node/entity interface today (most of the day is planned for that).
API question:
Table {media_mover_files} has 'nid' column. I want to change it to two columns - 'entity_type', 'entity_id' (so any entity can be managed). There are searches needed on those, that's why I don't want to put those into 'data' blob. I can add all appropriate code: hook_update, new methods in class_media_mover_file, etc. Do you agree with the proposal?
[UPDATE] hook_update will populate entity_id = 'node' for all 'nid' set, and convert nid into entity_id.
Comment #11
iva2k commentedI also recommend committing #3 and #4 as they mostly contain cleanup and sync to the core changes. #5 does not need to be committed as mm_node is completely reworked (I think it should be named mm_field) and mm_utilities needs some major work which I'm not planning to undertake.
[UPDATE] I noticed your commit renamed MMA_CONFIG_PATH to MMA_MENU_PATH - do you want me to re-roll patches #3 and #4? There are few inconsistencies in the paths (meaning bugs) that I fixed with the replacement.
Comment #12
iva2k commentedHere's a patch for whitespace, coding style and some of the inconsistent comments fixed. It is for the whole tree including submodules to facilitate any further patches.
Comment #13
iva2k commentedHere's a patch for core menu router that:
Comment #14
iva2k commentedHere's a patch that applies MMA_MENU_PATH to all submodules (and fixes all found path inconsistencies). Sorry I think it belongs to core issue as it cannot be committed independently (it depends on #13).
Comment #15
iva2k commentedHere's a patch that fixes 2 core bugs:
media_mover_api_file_load() renamed to media_mover_api_mmfile_load() to avoid collision with core hook_file_load().
Comment #16
iva2k commentedHere's a patch that fixes all found issues in theme and form API (as suggested by coder upgrade and code grepping and some UI tests). It covers core and submodules since it is small and fixes straightforward bugs.
Comment #17
iva2k commentedHere's a patch that fixes few issues:
Comment #18
iva2k commentedHere's a patch that fixes bugs with incorrectly set cache in media_mover_api_configuration_machine_name_exists() and media_mover_api_step_machine_name_exists(). Also media_mover_api_configuration_code_validate() had a bug comparing $step to $step.
Comment #19
iva2k commentedHere's a patch with various fixes based on coder upgrade suggestions.
Comment #20
iva2k commentedSqueezing out last bits: patch that addresses various runtime warnings, misc typos, cleanup.
Comment #21
arthurf commentedWorking through this thread slowly.... #3 is committed in full.
Comment #23
arthurf commentedI just committed the mm_utilities portion of #5 and have deleted mm_node entirely. I just opened #1926420 which will help pull the two actions out of mm_utilities.
Comment #24
arthurf commentedI committed #12 to all the active modules.
Comment #25
arthurf commented#13 is committed, though I changed MMA_MENU_PATH_LEN to MMA_MENU_PATH_LENGTH for readability
Comment #26
arthurf commentedThank you for the catch on hook_file_load. #14 and #15 are committed with the static reset on file save.
Comment #27
arthurf commented#16 is committed with some style changes.
Comment #28
arthurf commentedFrom #19 I only applied the changes to mm_views. I think it's ok to not comment why time() is being used in class_media_mover_file.
Comment #29
arthurf commentedOk- all of these have been applied. There maybe a few things I missed where I selectively took some of the changes. I'm closing this issue and lets open a new one for any specific issues that come up from here.
Thanks!
Comment #30
iva2k commentedImpressive speed! Thanks!