Fileupload issue

arie

Member
Hi,

I have a form with 2 groups and several elements. on the first group several elements are unpublished except one (field). On the second group there is only a fileupload element.
I made that just for separation.

Once I upload an image and submit the form, everything works well.
However, when I just re-submit the form with no update => the link image is removed from the db.

Follow to the link below and just submit the form, you will see the image deleted:
index.php?option=com_fabrik&view=form&formid=33&Itemid=235
 
That link doesn't have a host on it, and appending it to your My Sites host name doesn't work (403 error).

Testing locally to see if I can replicate this.

Is this regular form upload, not an AJAX?

-- hugh
 
hi Arie

Did you cross-post with Hugh - or is his fix not working?

Cheers
Rob
 
I think Rob mistook a message from you for one from me.

I'm still trying to replicate this locally. i see it happening on your site, but can't really tell why unless I can get it to do the same here.

Can you post a shot of your upload element settings?

-- hugh
 
Here is the element settings sceenshot
 

Attachments

  • Capture d’écran 2013-07-17 à 11.46.22.png
    Capture d’écran 2013-07-17 à 11.46.22.png
    71 KB · Views: 246
  • Capture d’écran 2013-07-17 à 11.46.46.png
    Capture d’écran 2013-07-17 à 11.46.46.png
    74.6 KB · Views: 254
Perhaps this might help.........

Hugh, I have noticed that if for some reason, the actual file is deleted or moved from the server via other means, then it is not shown in the list or form, and also the label disappears.

I was planning to lodge this request to fix the label display issue.

The data label assigned for the element should be displayed irrespective if the image is in fact located or not on the upload location.

I use the fileupload to upload files, but like to move them around via php, but I still want the label and url details to show in lists and forms. Obviously images/thumbs are dependent on finding the image.

So in arie's case, it might occur that the file is uploaded to a location somewhere on the server, but not in the correct path as defined in the element. When you post the record, all details are in the record, but when you reload the form, it loses it's current session, pulls from the db, but image is not in location it should be.

Paul
 
Hi Paul
That makes complete sense, I think I have fixed it so that the title is used as the image alt text (previously it was the image filename)
 
Does that form with the upload on it use the rowid=-1 / usekey thing on the Menu item, so it loads one record per user?

If so, then I just submitted a fix for the "emptying on editing" thing.

Rob - I thought we used to have a fix for this elsewhere, but I ended up having to tweak setOrigData, to unset the usekey request if the menu item rowid is -1, as the submitted rowid is already the 'native' rowid of the form's table, not the userid, so we end up trying to load the wrong row as the orig data.

https://github.com/Fabrik/fabrik/commit/eb98177e4d713fca97075f8118ad702985c39676

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top