1. Fabrik 3.8.1 has been released. It is mostly bug fixes and feature enhancements, but does include two new plugins (push notifications, and the sequence element). As usual we strongly recommend testing the new release on a sandbox if your application is mission critical, and always do an Akeeba backup before updating.
    Dismiss Notice

Fileupload default image still showing

Discussion in 'Standard Support' started by aijosh, Jul 10, 2018.

  1. aijosh

    aijosh Member

    Level: Standard
    Hello,

    I have uploaded an image file but the default image still shows alongside the image I uploaded.
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    In what view? Form, list or details?

    I can't replicate this at all.

    Can you point us at an example list / form.

    -- hugh
     
  3. aijosh

    aijosh Member

    Level: Standard
    Last edited: Jul 10, 2018
  4. troester

    troester Administrator Staff Member

    Level: Community
    I can't replicate either.

    Are you running original Fabrik code, original Fabrik templates, no overrides?
    Lists handled only via Fabrik (without custom php plugins inserting or modifying records, inserting/updating via upsert etc)?

    Are you sure the "default image" is coming from the element setting and you didn't upload this image?

    Your form link is not working (going to /detail, too).
     
  5. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    If you want to add a backend login at http://fabrikar.com/you/my-sites, I'll take a look at your exact element settings, and see if I can replicate.

    -- hugh
     
  6. aijosh

    aijosh Member

    Level: Standard

    Yes. I didn't modify anything. Sorry about the form URL issue. I dont know what went wrong. I see the url's link is the same as that of the detail view. Please copy and paste.

    Yes the default image is from the element. (The green image). I uploaded the face using the form on the frontend.

    I'm sure I've done everything correctly.

    I've added the credentials
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Oh yeah ... sorry, I was getting threads confused. I check on 'meet a josh', thought it didn't have the elements were were talking about, but that's a different thread.

    I'll check.

    -- hugh
     
  8. aijosh

    aijosh Member

    Level: Standard
    Hello,
    Any progress on this?
     
  9. troester

    troester Administrator Staff Member

    Level: Community
    Ok, it's replicatable with ajax upload, Max files =1 and default image set.

    Max files = 1 is a sort of corner case and it seems in this case is doesn't handle the default image correctly.
     
  10. aijosh

    aijosh Member

    Level: Standard
    hello.
    what next pls
     
  11. troester

    troester Administrator Staff Member

    Level: Community
    Do you need exactly ajax upload with max files=1?
    Normal upload or ajax with max files >1 are working.
     
  12. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Weird, I can't replicate this even with an AJAX upload with max files 1. Although the test form I have it on has 5 upload elements, with a mix of settings, and a repeat group, although the AJAX/1 isn't in the repeat.

    @troester - what's your test setup like?

    -- hugh
     
  13. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
  14. aijosh

    aijosh Member

    Level: Standard
    Yes please. Just one.
    Its a profile picture. It can only be one at a time.

    Secondly, what is the best way to implement an image upload.
    The fileupload only uploads from the local pc and the image element is providing a list of files on the server.
    Is there no way for the users to be able to choose whether its the PC or server they want to upload from?

    Thirdly, I notice now that for some element, the detail view shows the default and image uploaded at the same time. While other elements show only the default image even after another image has been uploaded.
     
  15. aijosh

    aijosh Member

    Level: Standard
    Fixed for elements with both default and uploaded image.

    I still have elements that refuse to recognize the uploaded image.
     
  16. aijosh

    aijosh Member

    Level: Standard
    Should I open another thread for this or it would be answered here?

    After tinkering around I see this is a permission issue. I really cannot figure out how to make it work. Other elements work ok with the same permission configuration.

    My best guess is the element refuses to acknowledge the userid
     
  17. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    The upload and image elements are indeed separate. One Of These Days When I Have A Few Days To Spare (<tm>), I'd like to merge them, so it's a single element that allows you to choose between uploading a new file, or selecting an existing file. But that's probably not going to happen any time soon.

    I haven't managed to replicate an issue with it showing the default and the uploaded image. You'll have to give me exact steps to replicate, ie. exactly what permissions to set on it.

    I still suspect that problems you are seeing when using "or use field" may be to do with permissions on the userid element itself. I was able to replicate similar problems if the user doesn't have access to the userid I use in a "or use field" permission, in a Catch 22 (need access to the userid element to determine access to another element, don't have access to the userid element).

    -- hugh
     
  18. aijosh

    aijosh Member

    Level: Standard
    I'll still hope this comes soon
    This has been solved as I mentioned in the previous reply.

    This is the persistent issue.

    Let me try providing as much detail.

    I copied the fileupload element(eleA) that works ok from the registration form (listA) to some other listB as eleB.

    Note permissions::::
    Permission on listA | Permission on listB
    Add Record - Guest | Add Record - SuperUser
    Edit Record - SuperUser or Userid | Edit Record - SuperUser or Userid

    Permission on eleA | Permission on eleB
    Form Add - Registered | Form Add - SuperUser
    Form Edit - SuperUser or Userid | Form Edit - SuperUser or Userid

    Add/Edit on Form A works ok Add/Edit on Form B finnicky

    Note: all userid element are public and hidden

    What works for eleB
    Form Add - AccessLvlB (But I dont want form add at all - AND NO WORKAROUND :()
    Form Edit - AccessLvlB (But I want only user edit record - CANEDIT ROW WORKAROUND)

    I haven't really wrapped my head around this permission issue. I just noticed there are cases where the information view or add leaks so I decided to add permissions to all elements, list, groups to be on the safe side.
    I dont know if I'm just being paranoid and causing more issues for myself by setting permissions everywhere.
     
    Last edited: Jul 18, 2018

Share This Page