• 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.

juser "synchronize" creating 2 entries per user

rackem

Well-Known Member
I set up the juser form plugin (see attached settings) for the 1st time on a test platform based on what I could figure out from the tooltips and the forum posts. When I load the form for the first time, I receive the message that my users were successfully synchronized from #__users. However there are two entries for each of my users. Is this a problem with my setup?
 

Attachments

  • juser.png
    juser.png
    34.2 KB · Views: 297
Looking at that now. I've added the user group handling (that's now in a separate table that needs joining, in J! 2.x), and testing trying to see why you might be getting two copies of each.

More news when I've got it fixed and committed.

-- hugh
 
I'm still working on this one. I've managed to duplicate the "double entries", just not why it's happening.

-- hugh
 
Thanks for the update Hugh. Just wanted to add the following.

Looking at that now. I've added the user group handling (that's now in a separate table that needs joining, in J! 2.x), and testing trying to see why you might be getting two copies of each.

Not sure if my settings are wrong or perhaps the user group handling you mentioned will address this: any new users I create through my Fabrik form are not being assigned to my default user group. The id is always 0.
 
*friendly bump* Hugh, are you recovered from your road trip to New Orleans? ;)

I haven't committed any changes yet.
Yes, I understood that part, was just adding more observations from my original setup.
 
*friendly bump* The issue with the duplicate entries is not that big of a deal as it is a one-time problem that can be overcome with some housekeeping afterwards.

However, I am stuck on the issue where any new users created from the Fabrik form are not being assigned to my default user group or anything for that matter. The user group is always set to 0 or null. Then when the user tries to edit their settings they do not have the proper user group to edit. Has anyone else experienced this?

My settings are in the 1st post. The User Group field is a "field" element set as integer but have also tried text. ACL is at the default which is "public" I believe (it's not in front of me at the moment).
 
Oh yeah ... poop ... forgot about this one.

I was half way through making some changes, need to get my head round what I was doing again.

Working on it now.

-- hugh
 
OK, I can't duplicate your issue with the Group field

What value do you have your field set to? And I presume it is hidden?

Can you double check the Access on that field?

BTW, I don't typically recommend using that, unless you have a very specific need to be able to set the group membership on a per-submission basis, rather than just using the static 'default group' setting on the plugin.

The only wrinkle there is you need it if you do the "syncronize users" thing, i.e. for populating your Fabrik table from the #__users table on first load. But you can get rid of it after you've done that, if you don't need it.

The reason being, it kind of adds a potential vector for hacking, by taking group membership from submitted data (although we do have code to hopefully prevent people from making themselves admins, or elevating their group membership when editing an existing form). So although we think it's safe, there is always the possibility we haven't coded defensively enough.

So I usually recommend leaving that blank, and using the static default instead.

Anyway ... looks like I'll have to debug your site, as I can't replicate this. Catch me on Skype ('cheesegrits'), and we'll have have look.

-- hugh
 
I will update and test the duplicate row fix.

Thanks for the explanation on the group setting. My concern was based on my perception it was needed for the proper operation of the plugin. I do not need to do anything fancy like you've described; just wanted a fabrik-based login form so I could add some custom user settings. Sorry that wasn't clear to me. The default setting should be sufficient.

So I do not need this after my initial user import. Does that mean I can delete my "group_id" list element or just clear the setting in the form plugin?

This was all on a local test copy of my site just to figure out how it would work and iron out any issues. I will test further and let you know how it goes. This is really neat, I am really looking forward to getting this on my site!
 
Yes, you can remove your group_id element once the first import is done, clear that setting on the form, and just use the static 'default group' setting instead.

Let me know how it goes. I'm still stuck trying to figure out what the problem could be, as that code is very straight forward, and as long as that element exists on the form, and has a default value ... we should see and use that value. The only way I could see it not working would be if it was in a repeated group, which would obviously be an issue.

Anyway ... let me know if the latest github solves the 'multiple rows' issue, and that things work OK with the static group default setting.

-- hugh
 
OK, the duplicate record issue is fixed. :)

There is more funny business going on in the form view when I edit a user's info, save it, and then re-edit. The username is populated with the original username instead of the one I just changed it to. Strange because it shows up properly in the list view and in the J! user list. It does not happen if I log off and then back in before re-editing.

I think I figured out the group ID issue. I correctly or incorrectly assumed based on the tooltips that the default user group in the juser settings was applied to the field. However your language here hinted otherwise. I set a default value in my field element and then it seemed to work OK. If this was my misunderstanding perhaps you could add some language to the tooltip to explain this to :confused: people like me. I didn't do any further testing because as we discussed, this element is best removed in my case.

Other than that it seems to be functioning great! BTW I did remove the "groupID" as you described. That was fun ;) so I also removed the "block user", "datetime", and "name" fields too (after setting J! name = F! username in the plugin settings).
 
The username is populated with the original username instead of the one I just changed it to. Strange because it shows up properly in the list view and in the J! user list. It does not happen if I log off and then back in before re-editing
Check your form settings, "Save partially completed multi-page forms" should be NO.
 
So just to make sure I understand you setup, so I can alter mine to match ... you now have both the J! 'username' and 'name' fields mapped to the 'username' element on your F! form?

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

Thank you.

Members online

Back
Top