Problem using JUser Form Plugin

agkata

New Member
I've tried to use JUser plugin, and I have had a similar problem this thread http://fabrikar.com/forums/showthread.php?t=25875&highlight=Duplicate+entry (I have no permissions to quote this, sorry about the link).

It was my steps:
1. Created and saved a List linked to ##_users (Joomla users)
2. Set up JUser plugin for the form
3. I set up a default user group and I don't know if it is associated with the problem.

Problem:
When I try to insert a new register using the form, I get the error message:
"Store row failed:
Duplicate entry '0-10' for key 1 SQL=INSERT INTO `#_user_usergroup_map` ( `group_id` ) VALUES ( '10' )"


Can someone help me?

Regards,
 
Hi!

Thanks for the response rob!

I used the following configurations:

Name field => Nome
(...)
User ID field => ID
User group field => -
Default user group => -- Corretor // this is a new group created at J! administrator by me - registered with ID 10.
Delete Users => No
Bypass Activation => Yes
Bypass Registration => Yes
Bypass Joomla's Account details email => No
Auto Login => No
Synchronize Users => No
Sync on Edit => No

I don't know if I'm right about your question, is this the expected response ?

Thanks!
 
hi Rob, I tried your suggestion, but it didn't works =(

Today I tested another things to resolve my problem...

My configuration "groups" (in my Form configuration) is:
Corretor
Corretor -[#_user_usergroup_map]

In my list configuration, I made a Join to #_user_usergroup_map table to get just registers of "Corretor" group in my list.

When I remove Corretor -[#_user_usergroup_map] in form configuration or remove my join in list configuration, I don't get the error anymore (Store row failed...) , but my list brings me all the user registers and I want to get just registers from an especific group.

Is there another way to bring the records belonging to a particular group without make a join?

Thanks!
 
Ah, you didn't mention having a join to the usergroup map table in your original post. And as the uergroup map doesn't have a simple numeric primary key, it's a little difficult to handle as a joined table in Fabrik.

However, you shouldn't need to join it. You can do what you need with a pre-filter, using a subquery.

WHERE
Field: id
Condition: IN
Value: SELECT user_id FROM #__user_usergroup_map WHERE group_id = '123'
Type: Query
Apply to: (whatever access level you need the filter to apply to)

And obviously change '123' to whatever the ID of the group you want to restrict access to is.

-- hugh
 
sorry, I really had not mentioned other settings in my original post.

so, I used the subquery as you suggested me, and it worked!

Thanks!!! :D
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top