Posted by Laurent_ on October 2, 2009 at 12:35pm
Jump to:
| Project: | iTweak Upload |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | iva2k |
| Status: | closed (fixed) |
Issue Summary
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
#1
Without 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.
#2
Thanks 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
#3
Hi 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
#4
It may be trivial to redirect private_upload theme hooks to existing iTweak Upload hooks... I will look into that.
#5
I 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.
#6
Update: 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.
#7
Issue fixed in iTweak Upload 6.x-2.x-dev as of Feb 20 2010.
#8
First 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
#9
@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.
#10
Every thing seem to work correctly now ;)
Thanks again
#11
Automatically closed -- issue fixed for 2 weeks with no activity.