• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Minimum count of repeat group not taken into account

jfquestiaux

Well-Known Member
Hi,
About 2 weeks ago, I updated Fabrik from the latest gitHub and since then I have the following problem:

In a form (with tab templates), I have 2 repeatable groups, with "repeat mini" set to 0, as I don't want them showing on load.

After the update, I see that now I have 1 group showing instead of 0, which is bad because there is a validation on one of the field and the form does not submit anymore, except if you remove the 2 groups.

So it seems that "repeat mini" does not work anymore.
 
Is it also with the bootstrap template?
Do you get a JS error ? (there's always one group created and then deleted if min=0)
 
Well there is something strange: on load, there is no JS error, nor if you delete the group that is present.
However, if you add a second group, then delete it, you get a JS error:


jquery.min.js?cbf0d375c9067dc2b3de8435b466c825:2 Uncaught Error: Syntax error, unrecognized expression: input[name=fabrik_deletedimages[17]]
at Function.fa.error (jquery.min.js?cbf0d375c9067dc2b3de8435b466c825:2)
at fa.tokenize (jquery.min.js?cbf0d375c9067dc2b3de8435b466c825:2)
at Function.fa (jquery.min.js?cbf0d375c9067dc2b3de8435b466c825:2)
at Function.a.find (jquery-migrate.min.js?cbf0d375c9067dc2b3de8435b466c825:2)
at a.fn.init.find (jquery.min.js?cbf0d375c9067dc2b3de8435b466c825:2)
at a.fn.init.a.fn.find (jquery-migrate.min.js?cbf0d375c9067dc2b3de8435b466c825:2)
at CloneObject.decloned (fileupload-min.js:3)
at CloneObject.e.extend.$owner (mootools-core.js?cbf0d375c9067dc2b3de8435b466c825:38)
at Object.<anonymous> (form.js:3)
at Function.<anonymous> (mootools-core.js?cbf0d375c9067dc2b3de8435b466c825:9)

It's a custom template. I will check later with the bootstrap one (this is a live site and they are working now).
 
You can test locally by appending &layout=bootstrap (at least if there's no template set in the menu item)

I justed tested, there's a strange thing with repeat group min=0 and validations (tested in the backend with bootstrap and bootstrap_tabs):
If you add one group and then save with a validation error (somewhere in the form, not necessarily in this repeat group) the group is showing up and then deleted ("no data").
It's ok if there are at least 2 group entries.

Edit: which is an old issue
http://fabrikar.com/forums/index.ph...h-min-0-is-deleted-on-validation-error.45380/
 
Last edited:
I tested it with the bootstrap template and I have the same result : 1 group showing on load and no JS error - adding and deleting a second group is causing a JS error.
 
Following your error messages:
Is there a fileupload in the repeat group? standard, ajax upload?
Anything else like form in a popup, ajax validation, ...?
 
Tbh, I think that fabrik_deletedimages thing isn't needed any more. I can't find any other reference to that input name anywhere, except in the decloned() method (which is where it's erroring out in your site) ... so at some point it was looking for an input of that name when deleting a group, and adding whatever was in it to the fabrik_fileupload_deletedfile[] input ... which is where we put filenames after the "confirm you want to hard delete this file from the server" prompt ... but as far as I can tell, 'fabrik_deletedimages' just doesn't exist and isn't used anywhere any more.

However, that seems to be a separate problem to the one Troester is describing with the min=0 and validations.

I'll see if I can replicate that.

-- hugh
 
@troester
There are only a normal fileupload (no ajax, but storage on S3, although I don't think it's related). and a basic field element.
However, these groups (there are 2 of them on the form) are joined repeated groups (left join) from other lists. Maybe this has a relation.
So to be clear, I have:
List A, with group A)
List B, with group B)
List C, with group C, group A repeatable, group B repeatable

It the form C that has the issue.
 
I don't seem to be able to replicate this, can you point me at your form, and enable Fabrik debug so I can get uncompressed JS.

-- hugh
 
Hi,

I had the same problem, even with 0 as minimum for a repeated group, after a 'Save', a record was created in this group!
It was happening only on a specific group, it was working for others ( on other forms)!
I deleted the join on the list and created it again and now, with 0 as minimu, no more record created in the group, it works again!

Nicolas
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top