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

Status:active» postponed (maintainer needs more info)

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 created mytheme_theme_private_upload_attachments. It is the same thing for mytheme_upload_form_current, mytheme_theme_private_upload_form should be used instead. Then my changes are used after the ones of Private upload.

Morthylla

#4

Assigned to:Anonymous» iva2k
Status:postponed (maintainer needs more info)» active

It may be trivial to redirect private_upload theme hooks to existing iTweak Upload hooks... I will look into that.

#5

Assigned to:iva2k» Anonymous
Status:active» needs work

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

Assigned to:Anonymous» iva2k
Status:needs work» active

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

Component:User interface» Code
Status:active» fixed

Issue fixed in iTweak Upload 6.x-2.x-dev as of Feb 20 2010.

#8

Version:6.x-2.2» 6.x-2.x-dev
Status:fixed» needs work

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

Status:needs work» needs review

@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

Status:needs review» fixed

Every thing seem to work correctly now ;)

Thanks again

#11

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here