Validation on an element, the values on fileupload disappeared after validation

Borox

Member
Hi,

I put a php validation on an element of a repeated group, the validation works but no more values in the fieds:

before:
upload_2017-9-1_17-56-8.png

after:
upload_2017-9-1_17-56-44.png

It seems that only the values of the element fileupload are missing.

Thanks for your help.
 
Hi,

Is someone else experiment the same problem? no matter what validation I use ( even a simple 'isnotempty'), if the validation occurs, all the fileupload element disappeared.
If I don't pay attention I lose all the files and photos.

Thanks.
 
I just saw that even if there is no repeated group there is the same problem on fileupload elements
 
Sorry about the delay, I just hadn't had time to look at it, I was travelling in the UK visiting with family, then got caught by hurricane Irma just as I got home.

I'll take a look now.

-- hugh
 
No problem Hugh, I hope your family is safe and sound

Yeah, we're fine. I live well outside of the path Irma took, but while I was away I had left my dogs with a friend who lives near the cost in South Carolina. I got home on Friday, drove down there on Saturday, and Irma then made landfall between me and home. So I had to ride it out down there. Got some pretty impressive wind (gusting about 70mph) and torrential rain, but nothing close to real hurricane force, as even down there I was about 100 miles from the eye.

-- hugh
 
Hi Hugh,

I've done a github update and I just tested, it's better by some ways but there's a big problem with repeated group.

We don't lose anymore the file names in case of a fail validation (a isnotempty and so on), that's good, but:

Small problem:
When I use for a file upload element 'Maximum File Size', an error occurs if the file is too big, but in this case the tab (I'm using the tab template) doesn't turn red:

upload_2017-9-27_17-15-55.png
Big problem:
When I had a new group:
upload_2017-9-27_17-17-26.png
The value from the first record are copied in the elements ( that's something I've already saw when I modify 'Pre-filters' in a menu).

Let's say I don't care and I upload a new file, but this one exceed the value of 'Maximum File Size', I will have an error ( without the red tab) but this record can be saved, but I will get an old file.

Then, it's about to become an OMG issue because after saving such a record some records seem to be duplicated ( the file part, not the description part). And as records seems a bit mixed up I'm not sure I didn't lose records.
I'm going to do a more detailed test but there's something wrong around fileupload/'Maximum File Size'/Validation

I hope that you can have a look to that because there's a strange behavior.

Thanks.
 
I've done a new test, and unfortunatly I confirm the OMG problem ( even if we don't use any validation):

Fresh new record and nothing in my repeated group, I add a file:
upload_2017-9-27_17-54-29.png
I save and go back to the list, no problem I have my file and the description.

I add a new group to add a new file an a new description:
upload_2017-9-27_17-55-51.png

The value are duplicated from the first record, but ok, I modify them:
upload_2017-9-27_17-56-35.png
And I save, I'm supposed to have :
files1 fichier1.txt
file2 fichier2.txt

But instead I have:
upload_2017-9-27_17-57-33.png

So it doesn't work anymore.

Sorry I remember we had such problem a year ago with repeated group. If other are using repeated group and fileupload they might have the same issue. I'm gonna check if it's only with fileupload or with all the repeated groups (checked, it only happens with fileupload).

I hope you can do something about it.

Thanks.
 
Last edited:
OK, I just committed something to github which should fix the issue I was able to replicate, whereby if you fail a validation after deleting a group, the files got shuffled into the wrong repeats.

-- hugh
 
Thanks Hugh, the screencast was pretty much what I was doing, but strangely in my case even without a validation there was a problem.
I test the last github update and I let you know.
 
Nope, same error on my side.
Here is a screencast of my test:
https://www.screencast.com/t/PSdFAaMMClJ

In PhpMyAdmin we can see that the 2nd record replace the first one...

Well, I don't know what to do, there is perhaps something wrong with my setup but it was working before the github update I've done yesterday, there was only a problem with the validation.

Thanks
 
Last edited:
I still can't replicate that behavior. At this point, all I can really do is install a copy of your site locally, and debug it.

Is this your "Suivi copro" site, and do you have Akeeba installed?

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

Thank you.

Members online

Back
Top