I just found a conflict with this extension (which I love) and Solspace’s onSubmit extension (which I kinda need).
I haven’t seen anyone report this yet, so I figured it might prove helpful. This is the first time I’ve experienced a conflict with extensions.
The Behavior:
As soon as the onSubmit extension is enabled, the LG SAEF File Upload extension fails to do anything on the form—the hidden fields and enctype are missing. This is even if onSubmit is not being used on that SAEF form. The form still submits and the data saves, but no file uploads and the custom field will only show the filename, no path var.
I’m not sure what the conflict is exactly…that’ll have to wait.
[edit]
I found that by modifying the priority of the onSubmit extension to 9, it can co-exist with the LG SAEF File Upload extension.
I haven’t checked out Solspaces extension but I would hesitate to guess that it is not checking to see if anyone is modifying the data before the hook is executing the extension method.
Heres an example of my code:
/** * Modify the $data parameters before they are processed by the user side form creator * * @param array $data The form data * @return array The form data * @since Version 1.0.0 * @see http://expressionengine.com/developers/extension_hooks/form_declaration_modify_data/ */ function form_declaration_modify_data($data) { global $EXT, $TMPL; // -- Check if we're not the only one using this hook if($EXT->last_call !== FALSE) $data = $EXT->last_call;
// check if the $TMPL is an object // on the traditional member pages this hook is called but there are no templates. if(is_object($TMPL) === TRUE && $TMPL->fetch_param('lg_saef_file_upload') == 'y') { $data['enctype']='multi'; $data['hidden_fields']['lg_saef_file_upload'] = 'y'; $data['hidden_fields']['lg_saef_file_upload_dir_id'] = $TMPL->fetch_param('lg_saef_file_upload_dir_id'); } return $data; }
You can see that I am checking if anyone else is using the hook first. If they are I’m using their data as a base for my extension. You may be able to modify Solspaces extension to do something similar.
I’m having the same issue as this one. The directory tag is showing. Seems to have something to do with Mark Hout’s File field which I’m using. I’ve tried switching to a regular text field with no formatting, but it shows in the SAEF, where this doesn’t for some reason.
Is there any way to get the Edit part of this working in the Admin Panel as well?
I’m using this for a weblog where data is entered via the SAEF, but edited via the normal control panel. And at the moment in the control panel, my SAEF file field just shows up as a text box, with no way to re-upload a file. It’d be great if this had the same functionality in the SAEF as in the control panel!
Is there any way to get the Edit part of this working in the Admin Panel as well?
I’m using this for a weblog where data is entered via the SAEF, but edited via the normal control panel. And at the moment in the control panel, my SAEF file field just shows up as a text box, with no way to re-upload a file. It’d be great if this had the same functionality in the SAEF as in the control panel!
At the moment there are no plans to add this functionality to the backend CP. Generally I just use the normal file upload which works well although it does not provide a preview. :(
For some reason, the “browse” button (or my form “submit” button, for that matter) isn’t clickable in Firefox 2 for Windows. I haven’t been able to test on a Mac, but FF3 works fine. Has anyone else experienced this or have a clue what the fix might be?
BUG: If a user doesn’t supply a required field or the title the file uploads anyway and then the form throws out an error. So then the user fills the required field and the file gets duplicated on the server again when they click submit. This is a problem for me because i’m using this to upload fairly large files.
Let me first say that I really love this extension. I first implemented it several weeks ago, and it has been working great except for this little problem…
If a user uploads a file with a space in it, such as “My File.doc”, EE converts the filename to “My_File.doc” but the extension still saves “My File.doc” to the database. Is there anyway to get the data saved to the database by the extension to go through the same filename encoding as the actual file that was uploaded?
Let me first say that I really love this extension. I first implemented it several weeks ago, and it has been working great except for this little problem…
If a user uploads a file with a space in it, such as “My File.doc”, EE converts the filename to “My_File.doc” but the extension still saves “My File.doc” to the database. Is there anyway to get the data saved to the database by the extension to go through the same filename encoding as the actual file that was uploaded?
If i upload “my file.xyz” through a SAEF the extension saves it as “my_file.xyz” to the server, and in the database/weblog field it’s stored as “{filedir_1}my_file.xyz”.
What a brilliant extension, as you already know, delete is the killer extra feature. Incidentally what is the expected behavior if you choose to upload a new file, will this be uploaded using the same file name as the original upload (thus helping to reduce the number of orphan files in the upload directory) or will it just ignore the previously uploaded file and upload the new file and change the string in the DB?
It would be nice to have an option to have the files renamed with a unique file name that relates to the entry id and custom field id.
Has anyone had problems with this since 1.6.6? I don’t know about 1.6.5 because I went from 1.6.4 direct to 1.6.6.
My symptom is that since the upgrade, the files do not upload, but the upload field is populated. This has just been noticed, so I have not had time to trace further.
If anyone can replicate, I would be obliged.
Edit: Sorry, not correct, it does upload, but something has changed affecting my downstream code since I upgraded. Please ignore while I trace further.
I have traced this problem down to where tags are appearing around the contents of the upload field. The field type is set to text and the format is set to “None”
This is not the only field affected, the same thing is happening in textareas with format set to “None”
So this has nothing to do with LG SAEF Upload - I will report to tech support.