Closed (fixed)
Project:
FileField
Version:
6.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2011 at 18:25 UTC
Updated:
4 Mar 2011 at 21:51 UTC
I would like to override the theme_filefield_widget_preview() function, but it seems to work only after submitting the form: right after the uploading process always the default preview shows up irrespective of the modifications.
Right now I need to change this theme function in filefield_widget.inc to make it work, but of course I don't want to do that.
Any ideas why this doesn't work?
Comments
Comment #1
quicksketchI'm going to go ahead and mark this fixed since I'm almost positive this will be the correct answer: You use an admin-theme that is different from your front-end theme. You need to override the template in BOTH the front-end and back-end theme, since during the AJAX request the front-end theme is used, not the back-end. This is because the AJAX upload path is not under /admin. You'll have a similar issue with any other modules that use AJAX and you override the admin output.
Comment #2
sgabe commentedThanks Nathan, you're right. I don't know why didn't I think of this.