Deleting File from fileupload field on edit leads to error

ontarget

Active Member
Using J4.2.6 Fabrik Beta4B
Fileupload element / ajax upload = yes
Validation = notempty on Both

Multigroup form with pagination

When I create a new form entry the validation check on the fileupload fields works and I cannot proceed to the next page in the form without uploading a file.

When I edit the same form record and delete the file via the ajax uploader X icon next to the element, I can continue through the pagination and submit the form even though the fileupload field has a validation of notempty on Both (New and Edit) - Any ideas why it's not validating on Edit?
Also after the form submission if I try to edit the same form record again I get the following error:

count(): Argument #1 ($value) must be of type Countable|array, string given

I'm wondering if this is a simple element setting I'm missing?
 
There are still issues with the fileupload.
But
  • Fabrik 4.0Gamma is out
  • Error: Can you enable Joomla's System Debug to get an error stack?
  • There is a critical security issue with J! <4.2.8, you should update
Is this behaviour different from Fabrik 3?
 
@troester thank you as always for the fast response.
I will complete those updates.
Sorry IDK with F3 if this is the same.
When looking at the db entry for a file upload it goes from a populated array to an empty array when deleted using the ajax upload element

[{"file":"\/images\/uploads\/1003\/somefile.pdf","params":"{}"}]

to

[]

This would probably explain the count error - I would suggest the delete action would set a Null value instead if that's possible?
It might also fix the validation because technically an empty list is not notempty!
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top