FileUpload - fabrikDateEmpty / Access Image

Status
Not open for further replies.

wezetel

Active Member
The fileupload element always has the class fabrikDataEmpty, even if a file was uploaded. Usually I have a css rule display:none for this class (ok, I can override this for specific forms/elements), but nonetheless I'm wondering why this happens.

In addition the access image setting in the Downloads settings doesn't have an effect. For non-script version the filename is displayed, for script version a download button is displayed, but in no case the selected image is shown.
 
class fabrikDataEmpty: Where? I can't see this.

Display: Ajax or standard fileupload?

With download script = no I think all other options are ignorede, the display settings are used (Media in form is also Media in details).
"Access image" is working here (tested with standard fileupload) (which is an improvement to F3 ;) )
"No access image" is ignored (as in F3)
 
class fabrikDataEmpty: Where? I can't see this.
upload_2023-4-11_20-54-3.png

This is an example of a download-script element w/o Ajax upload, but in fact the fabrikDateEmpty class is always asigned to the fabrikElementContainer independent of Ajax-Upload/Downloadscript
The according download settings are following:
upload_2023-4-11_20-59-46.png

As you see the access image is ignored
 
Ok, I see. The rendering is totally different in frontend (my test) and backend.
I have to find out why.
 
And I didn't have a look at the frontened yet :)
The access image is working in frontend.
Small remark: the tipp text of the access image tells me, if no image is selected the filepath is shown. But with the script version a download-button is displayed instead (which is better than the path)
 
I think there are still several issues with fileupload also with e.g. deleting files and some are already in F3 (e.g. non-download image).

It has a bunch of layout files (and /element/ and /models/ stuff)
If you are interested in digging deeper: e.g. plugins\fabrik_element\fileupload\layouts\fabrik-element-fileupload-downloadlink.php
 
I need to improve my understanding of php (alternative) control structures, but will give it a try....
 
Images should be fixed with zip files (unzip into plugins\fabrik_element\fileupload\layouts resp. plugins\fabrik_element\fileupload )

DataConsideredEmpty seems to be always true in backend, always false in frontend (maybe also in F3, I didn't test so far).

Edit: fileupload.zip deleted because of debug code
 

Attachments

  • fabrik-element-fileupload-downloadlink.zip
    721 bytes · Views: 49
Last edited:
As far as I can see, now the fabrikElementContainer gets the fabrikDataEmpty class assigned correct in front- and backend (but not 100% sure yet..need to do some further checking and remove the dump code).
Also the selected picture is displayed now in backend! Great!
 
I didn't test with Ajax upload. With download script enabled class fabrikDataEmpty is assigned correct to the fabrikElementContainer, but if the download script is disabled the class is not assigned at all (both in back- and frontend).
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top