Closed (fixed)
Project:
iTweak Upload
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Oct 2009 at 12:35 UTC
Updated:
21 Mar 2010 at 19:10 UTC
Hi,
For my specific purpose, I need to use private_upload which affect also file attachement display.
Unfortunately, this module overrides itweak display on both node edit form and node view. Whatever the itweak display settings, I get the standard Drupal attachment display.
Any idea how could we fix this ?
Thanks
Laurent
Comments
Comment #1
iva2k commentedWithout reviewing the code of private_upload, I would try changing the weight of iTweak Upload module (by the way, 6.x-2.x-dev has a patch that sets ITU weight to 10). That should run ITU module after all regular weight modules (assuming that private_upload weight is 0). I don't have high hopes for that, but its simple and worth a try.
Comment #2
agence web coheractio commentedThanks iva2k
I've tested with the dev version and results is unfortunately the same (private_upload's weight is 1 and itweak_upload's weight is 10).
I think the issue is in the way private_upload modify the upload form. I'll investigate this.
Laurent
Comment #3
morthylla commentedHi Laurent_
I used this page in order to manually modify the appareance of the upload form.
I found the same conflict with the Private Upload module and the solution was quite simple (but I don't know if it will be easily portable to the iTweak module): instead of
mytheme_theme_upload_attachments, I createdmytheme_theme_private_upload_attachments. It is the same thing formytheme_upload_form_current,mytheme_theme_private_upload_formshould be used instead. Then my changes are used after the ones of Private upload.Morthylla
Comment #4
iva2k commentedIt may be trivial to redirect private_upload theme hooks to existing iTweak Upload hooks... I will look into that.
Comment #5
iva2k commentedI looked into the use cases, and lowered my priority on private_upload compatibility. It is unlikely that I will find a good use for private_upload, so no hope that I will get to fixing this issue.
Will review any submitted patches though.
Comment #6
iva2k commentedUpdate: I've done some redesign of how re-theming works in iTweak Upload, which removes problems with theming and conflicts to other modules. With that in place I have a very small change to iTweak Upload which makes private_upload.module fully functional, but applies iTweak Upload theming. Check-in will soon follow.
Comment #7
iva2k commentedIssue fixed in iTweak Upload 6.x-2.x-dev as of Feb 20 2010.
Comment #8
niteman commentedFirst of all sorry about my bad english.
Tested against 2.x-dev:
URL generation is not correct for private files (module gets file path instead of /system/ path).
There is a quick and dirty fix changing "$href = file_create_url($file->filepath);" to "$href =_private_upload_create_url($file);" twice in the module, but I guess there is a better way of achieving the same.
Thanks for a very nice module.
Best Regards
Comment #9
iva2k commented@NITEMAN
Thanks for the report. I wrapped the code conditionally calling _private_upload_create_url() into _itweak_upload_file_create_url().
Committed into 6.x-2.x-dev. Should show up in releases within 12 hours. Please verify and report here if it resolves the issue.
Comment #10
niteman commentedEvery thing seem to work correctly now ;)
Thanks again