Numerous issues with repeat group

Bauer

Well-Known Member
This problem is from the same list/form mentioned in these threads...
Delete attachment in repeat group not working.
notempty plugin error if fileupload plugin is also used

What I decided to do last week was create a list for tracking my project status and discussing and archiving problems, bugs, or feature requests among admins - rather than the haphazard mess we have using emails.

The list has a repeat group which will contain the responses to each new issue/subject raised. Look at the attachments for examples - it's pretty basic.

However, it's not as 'simple' as I thought it would be. I thought all was well until I started adding repeat groups. There are numerous issues (in addition to 2 linked above) - as I have explained in the attachments.

This is all using the standard templates (protostar and bootstrap) - on Joomla 3.6 with php v.7.0.9 and a Fabrik Github update on 07/25/2016.
 

Attachments

  • list.png
    list.png
    58.1 KB · Views: 251
  • beforeAdd.png
    beforeAdd.png
    40.1 KB · Views: 245
  • afterAdd_1.png
    afterAdd_1.png
    58.6 KB · Views: 245
  • afterAdd_2.png
    afterAdd_2.png
    58.4 KB · Views: 246
Which errors remain if you don't use the WYSIWYG editor?

I can't say much about PHP7 and JS but as far as I can remember there have been principal problems with WYSIWYG in repeated groups because of editors creating "random" ids.
 
Thanks for the reply troester.
Switching off the WYSIWYG editor 'fixes' the textarea weirdness. I guess we can live with that.

But the date and fileupload are still being copied from the last group values. (And yes I have Clone values set to 'No' in the group configuration.)

The fileupload problems are my biggest concern. I'll spend some time seeing if I can't at least find where/why it happens.
 
To followup...
After the delete confirmation is clicked, there is a javascript error
jQuery.js returns fatal error: [] operator not supported for strings

Googling around, I found this...
http://stackoverflow.com/questions/...l-error-operator-not-supported-for-strings-in
You get this error when attempting to use the short array push syntax on a string.
For example, this
$foo ='foo';
$foo[]='bar';// ERROR!

So that's a start. But finding where that might be occurring could be a day's work in itself.

I did notice and question, where the hidden input field is created, at approx. line 252 of plugins/fabrik_element/fileupload/fileupload.js...

'name' : 'fabrik_fileupload_deletedfile[' + groupId + '][]',

Shouldn't that [] contain a repeatCounter? Not the repeat group id (because that is already the 1st array key) - but what if there is more than one fileupload element in the same group/form? Maybe there is code that 'takes care of' (or is supposed to 'take care of') this elsewhere - and that's where/why the error gets triggered - or why it doesn't work in repeat groups? I'm just guessing here.

Anyhow, it looks like fileupload doesn't work too well in repeat groups.
You cannot delete an uploaded file - though an overwrite of a new upload works.
I suppose I can live with that.

But I wanted to allow multiple uploads anyhow. So I tried using 'Ajax uploads' feature but that doesn't work at all in a repeat group. (It seems to uploads all the files OK, but doesn't save/show them in the form when re-edited.)

But 'Ajax uploads' works fine in the parent form (both adds and deletes). So for now I'm just going to allow multiple uploads in the parent form and unpublish the fileupload element in the repeat group.

The only thing that is 'not right' when using Ajax uploads is that the 'preview' popup is very small and doesn't resize to fit to the images - and there is no way to resize or even scroll the modal window. So the preview feature is pretty much useless.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top