ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Safecracker file field - can't delete a file

April 14, 2011 7:48pm

Subscribe [7]
  • #1 / Apr 14, 2011 7:48pm

    kellypacker

    138 posts

    Hello,
    I have a safecracker file field to upload docs. It works great, but when you click on the little black x in the grey circle to delete an uploaded file, it shoots you to the top of the page instead of deleting the file. So you can’t delete a file and upload another. Seems like a javascript issue. Is it a bug?

    ee 2.1.3
    Build:  20110411
    Safecracker 2.0

    Thanks, Kelly

  • #2 / Apr 14, 2011 7:55pm

    kellypacker

    138 posts

    I should add it works in the cp, but not in the safecracker form on the front-end of the site. Which you could probably tell from the screenshot, but just to be clear.

  • #3 / Apr 15, 2011 10:28am

    W3care

    54 posts

    I am using safecracker and safecracker file add-on to enable image upload from the front end.

    I have noticed a bug in the add-on. first time file upload is working fine. when we go to edit the uploaded image file it does not get saved into the cms. While if we do this via EE backend, it works well.

    Do you have an idea of this?

    here are the versions
    EE 2.1.3
    Build:  20101220
    SafeCracker : 1.0.3
    SafeCracker File : 1.0.3

  • #4 / Apr 15, 2011 11:10am

    kellypacker

    138 posts

    So you can delete an uploaded file, upload a new one and it reverts to the original uploaded file?

  • #5 / Apr 15, 2011 11:43am

    W3care

    54 posts

    Yes, you are right. It’s happening that way.

    Any news?

  • #6 / Apr 15, 2011 11:51am

    kellypacker

    138 posts

    Sounds like we are having different issues. I cannot delete a file on the front-end, once it has been uploaded. If you can do that, then we are having different issues and my issue is not a bug, it might be more specific to my install. But I did just check it in Firefox, Chrome and Safari and can’t delete a file in any of those browsers.

    You might want to open a new topic for your issue. You might get better feedback that way.

  • #7 / Apr 15, 2011 11:57am

    W3care

    54 posts

    when I simply delete the file and click on submit. Original file still get reverted. means files are not being deleted in real. its the js which hide the file when I click on remove.

  • #8 / Apr 15, 2011 12:00pm

    kellypacker

    138 posts

    When I click on the X to delete the uploaded file, it does not revert back to a browse file input field. I assume when you delete a file it does revert to an browse input field because you said you uploaded another file. Correct?

  • #9 / Apr 15, 2011 12:06pm

    W3care

    54 posts

    you are right. when I click on -X then current file gets hidden and choose image icon comes.
    I have attached the image for reference. this is what comes initially.

  • #10 / Apr 15, 2011 12:07pm

    W3care

    54 posts

    This is 2nd image which comes after I have clicked on -x.

  • #11 / Apr 15, 2011 12:12pm

    kellypacker

    138 posts

    That’s why we are having separate issues, because the Choose File field does not come back when I try to delete a file. It shoots me to the top of the page and when I scroll to the field, the file is still there with the little X. The Choose File field does not come back.

    Maybe it leads to the same end problem, but our fields are doing 2 different things 😊

  • #12 / Apr 16, 2011 9:48am

    Greg Salt

    3988 posts

    Hi Kelly and Satya,

    Okay, I think we’ll keep these issues together since they do seem to be related. Firstly, can you both please replicate your SC forms on clean templates i.e. no other markup apart from doctype etc., CSS or JS and confirm that this same issue occurs?

    Cheers

    Greg

  • #13 / Apr 16, 2011 1:58pm

    W3care

    54 posts

    I have tested safecraker in a clean file. Title is editable but the image still remains uneffected.

  • #14 / Apr 19, 2011 6:17pm

    Greg Salt

    3988 posts

    Hi Satya,

    I can’t replicate this issue on my local installation I’m afraid. Clicking to remove an existing image from an entry and then saving that entry does indeed remove the file. Which other 3rd party fieldtypes are you using in the channel that is displaying this issue? Can you please create a new test channel and put only a Safecracker file field into a fieldgroup for that test channel. Does the issue still occur?

    @Kelly, did you have a chance to test this on a stripped down template?

    Cheers

    Greg

  • #15 / Apr 19, 2011 7:11pm

    kellypacker

    138 posts

    Sorry, just got around to debugging this further. When I delete the [removed][removed] call at the end of my page, the file upload field works as it should: it deletes the file. So it looks like it’s a javascript conflict. I am using Matrix to display the File upload fields, so maybe it is something within that.

    Thanks for checking into it. Kelly

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases