1. Hugh (cheesegrits) here. Thank you for all the good wishes. My back surgery was a success, post-op recovery is going well, and I'm getting stronger and feeling better every day. I hope to be getting back in the saddle and working support again over the next few days.
  2. IMPORTANT NOTE - we have made some changes in our github branch naming. The 'master' branch no longer exists, and is now called 'joomla25' (which is Fabrik 3.0). The 'joomla3' branch (which is Fabrik 3.2) remains unchanged. We have also removed all the other testing branches which had accuulated over the last few years. I have posted a thread in the Community forum for 3.0 with some more information, feel free to as questions there.

juser "synchronize" creating 2 entries per user

Discussion in 'Fabrik 3.x Testing' started by rackem, Apr 28, 2012.

  1. rackem Well-Known Member

    Level: Community
    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?

    Attached Files:

  2. rackem Well-Known Member

    Level: Community
    Another issue: my "user group" field is not being filled in on any of my users.
  3. cheesegrits Support Gopher

    Level: Community
    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
  4. rackem Well-Known Member

    Level: Community
    *friendly bump*
  5. cheesegrits Support Gopher

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

    -- hugh
  6. rackem Well-Known Member

    Level: Community
    Thanks for the update Hugh. Just wanted to add the following.

    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.
  7. cheesegrits Support Gopher

    Level: Community
    I haven't committed any changes yet.

    -- hugh
  8. rackem Well-Known Member

    Level: Community
    *friendly bump* Hugh, are you recovered from your road trip to New Orleans? ;)

    Yes, I understood that part, was just adding more observations from my original setup.
  9. rackem Well-Known Member

    Level: Community
    *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).
  10. rackem Well-Known Member

    Level: Community
    *friendly bump*
  11. cheesegrits Support Gopher

    Level: Community
    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
  12. cheesegrits Support Gopher

    Level: Community
    OK, i solved the "miltiple rows" thing.

    Working on the default group thing.

    -- hugh
  13. cheesegrits Support Gopher

    Level: Community
    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
    1 person likes this.
  14. cheesegrits Support Gopher

    Level: Community
    OBTW, I committed the fix for the 'multiple rows' thing.

    -- hugh
  15. rackem Well-Known Member

    Level: Community
    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!
  16. cheesegrits Support Gopher

    Level: Community
    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
    1 person likes this.
  17. rackem Well-Known Member

    Level: Community
    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).
  18. troester Well-Known Member

    Level: Standard
    Check your form settings, "Save partially completed multi-page forms" should be NO.
  19. rackem Well-Known Member

    Level: Community
    It is set to No.
  20. cheesegrits Support Gopher

    Level: Community
    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

Share This Page