1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Ajax fileupload in Repeat Group

Discussion in 'Standard Support' started by sunnyjey, Aug 28, 2018.

  1. sunnyjey

    sunnyjey Active Member

    Level: Community
    I know the Ajax fileupload do not work in repeat groups. Just want to know, is there any solution or progress to fix it ? How much would approximate hours cost to fix this issue, in case if it is fixable ?
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    It was working last time I tried it, although there may still be some lurking issues.

    Have you actually tried it and had problems?

    -- hugh
     
  3. sunnyjey

    sunnyjey Active Member

    Level: Community
    Yes. I tried multiple files on my existing list. In fact got frustrated. Then I browsed Fabrik Forum and found the Fileupload element has some issues in Repeat Groups. Ref:
    1. http://fabrikar.com/forums/index.php?threads/problem-with-file-upload-ajax-and-repeat-group.43085/
    2. http://fabrikar.com/forums/index.php?threads/numerous-issues-with-repeat-group.44721/#post-229911
    Error 1:
    To check, I just created fresh TEST list with a single FileUpload element and placed it into the Repeatable Group. When I tried to upload two photos, it creates two List entries !! :(

    Error 2:
    If I delete one of the Photo and Save the Form, it deletes the additionally created List

    I guess, Fabrik is not merging the List instead creating the additional row for each new Photo.

    Please check and confirm.
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Which exact Fabrik and Joomla version?

    BTW: you are posting in Fabrik3.0/J!2.5 forum
     
  5. sunnyjey

    sunnyjey Active Member

    Level: Community
    F! 3.8.1 and J! 3.8.8

    Oh! I didn't notice this. Sorry for that!
     
  6. sunnyjey

    sunnyjey Active Member

    Level: Community
    When you select FileUpload Ajax Method, and upload multiple photos, all photos get uploaded, but Detail/List view shows just single photo. No issues with Non-Ajax photo uploads. I tested it by creating an entirely new list with just Fileupload Element set to the Ajax Mode.

    To me, it looks like a bug. Please test at your end.
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
  8. sunnyjey

    sunnyjey Active Member

    Level: Community
    Thank you very much.

    Before GitHUB update:
    After GitHUB update: This is working. I can see all (multiple) uploaded photos now.

    BUT

    1. When I try to delete / remove of one or multiple uploaded Photos, I get a warning Pop up 'Do you want to delete this File from the server' and photo gets deleted. But when I SAVE and open the Detail View of the Row, I dont see deleted photo, but I can see the filename of photo (photo.jpg) with blank in the SlideShow View.

    2. When I click to add more photos in another Repeat group by clicking on +, all uploaded photos in first group are copied into the second Repeat group and I cannot delete or add photos in second repeat group. (PS : I have set 'copy values to NO in repeat group setting').

    Also getting following errors, If I empty the List /Rows and try to create a new Form:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

    Notice: Undefined offset: 1 in /mypath/plugins/fabrik_element/fileupload/fileupload.php on line 402

    Notice: Undefined offset: 1 in /mypath/plugins/fabrik_element/fileupload/fileupload.php on line 418

    In short deleting uploaded File is not working completely. Secondly adding of new photos in second repeat group not working.
     
  9. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    As I don't need the ability to delete or have a second repeat group in the project I'm working on, this won't get fixed immediately. We're at the point with Fabrik where non-trivial work gets done when it's funded. So when we get a client who needs these features, they'll get worked on.

    -- hugh
     
  10. sunnyjey

    sunnyjey Active Member

    Level: Community
    Totally understand.

    Please let me know how much hours of work is needed to fix this delete and have a Ajax fileupload on second repeat group ? If it is within my budget, I would happily fund it.

    Regards & Thanks
     
  11. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Well, that's part of the problem. I don't know how long. If I understood the issues well enough to give an accurate estimate, I probably would have fixed it by now. All I can really say is that in my experience of working on the upload element, or any of the other "many to many" elements that involve having that automatically created junction table (like tags, or checkbox joins, etc), in repeat groups, is that the time is usually measured in days rather than hours.

    As you may have noticed, another user just contributed some code that might help, although I haven't looked at it yet.

    -- hugh
     
  12. sunnyjey

    sunnyjey Active Member

    Level: Community
    Oh... In that case, I will keep this on hold ATM and get back to you, if needed.

    Yes! I tried the plugin and template contributed by @skyrun but somehow it is not working on my server.

    Thank you again. Also thanks to @skyrun for his contribution.
     

Share This Page