10 years ago
8
Topic
Hello SEBLODers,

I recently purchased the SD Field Concat plugin to assign users to user groups upon registration as described in the old forum here http://bit.ly/1i94o55. Have been unable to get successful results however, because I can't get SD Field Concat to get the next auto-increment value from the users table.

When configuring the field for the front end (Site form), I set the List of Fields as <users> and Storage as Standard>Free>user_usergroup_map>user_id
I have another field for the User Group, containing a default value for the group I want to assign. Its Storage is set to Standard>Free>user_usergroup_map>group_id.

When the form is submitted, a new row is created in user_usergroup_map as I expect. The group_id value is correct, but the value of the user_id is always "0". I can't figure out why anytime I try to retrieve the next auto-increment value from the users table, I always get "0". I have already spent hours searching the forum and other resources, trying alternate configurations, etc. but have been unable to determine what I'm doing wrong. It can't be this difficult, so I assume I'm missing something.

Any ideas? Like everyone else here, I'm on a deadline, so I'll be very grateful for any help sorting it out.

Environment is:
Joomla 3.2.3
PHP 5.5.10
SEBLOD 3.3.3
SD Field Concat 2.5.3

Thanks!
Denver

Get a VIP membership
10 years ago
1
Level 1
HI Denver,

As a test: if you save the SD Field Concat results to some other destination, does it still come up as "0"?  Just wondering if you're having trouble retrieving the next ID value, or if the trouble comes when you try to save it to the user_id field.
10 years ago
0
Level 2
Hi kwoychesko,

I considered that yesterday and when I tested that theory I got the same results. Doesn’t necessarily eliminate the possibility that the problem is in storing the value, and not retrieving it, so I remain open to ideas related to that possibility as well.

Thanks,
Denver
10 years ago
5
Level 1
Hi Denver, 

Can you please post for me your fields concat value? In other words, your list of fields from the SD Concat field settings screen? We'll get this sorted ;)

Simon
10 years ago
4
Level 2
Hi Simon,

Thanks for your quick response. Here are the values I’ve used to configure Construction and Storage of the field:

Construction

List of Fields: <users>
Value Separator: blank/default
Date Format: blank/default
Enable JText? No
Text or Value: value
Process on edit? Yes

Storage

Format/Object: Standard > Free > user_id
Parameters: user_usergroup_map

Results

On submitting the form, a new user is created and the user_usergroup_map table is updated with 2 new rows. One contains the new user_id with a group_id ‘2’ (Registered, Joomla default). The other contains user_id ‘0’ with a group_id ’18’ (my custom group). So it appears that writing to the user_usergroup_map table is successful, including adding my custom group (18), but the user_id always is ‘0’.

Thank you,
Denver
10 years ago
3
Level 3
Hi Denver, 

Give me a short while to dig into this and see what I can do. I am going to try my best to reproduce your problem, and I will get back to you with a solution.

Kind regards,
Simon
10 years ago
2
Level 4
Please give me a few hours, I am leaving the office soon and need to grab the latest version of the plugin from my home based development machine.

Thanks!
10 years ago
1
Level 5
No worries, Simon. Glad to have your help. If it helps, I can also deploy a development instance of the site for your access. That will also take a little time for me to setup, but I'm happy to do it. Give me a little lead time if you want that, and I'll make it happen.
10 years ago
0
Level 6
Great, let me first see what I can reproduce. If I can execute this successfully then it is likely that you do not have the required user rights on your MySQL username to make the necessary table call when getting the next auto increment, but let's not jump the gun ;)

I'll be in touch again soon. If you want to add me on Skype you can so long, simondowdles is my Skype handle.

Regards,
Simon
Get a VIP membership