Skip Navigation

[Resolved] User form allways creates 'customer' role

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 21 replies, has 3 voices.

Last updated by Minesh 6 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#922591
users.PNG
forms.PNG

I am trying to: Get people to sign up for a membership site. After payment they should be assigned to the correct user role. However they all get the same 'Customer role' even though it is set to create an other role.

Link to a page where the issue can be seen:
hidden link and then follow the checkout procedure.

I expected to see:
A user with the role set in the Cred form.

Instead, I got: a user with 'customer' role. (See John Doe in the users screenshot)

#922792

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - as you said the new user always have been assigned with 'customer' role. I suspect that the user role is overridden by the WooCommerce Memberships plugin.

Do you see 'customer' role is set with the plugin WooCommerce Memberships settings?

I need to have access details in order to check further so that I can guide you in right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#923029

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - what if you try to use Toolset Form's hook: cred_commerce_after_order_completed

This hook will give you the user ID in function argument variable $data. And based on this user ID - try to update the role for the user.

Something like this - to add new role to user:
=> https://toolset.com/forums/topic/need-to-change-roles-via-creds-there-is-no-role-field-in-toolset-cred/#post-920310

More info:
=> https://toolset.com/documentation/programmer-reference/cred-commerce-api/#cred_commerce_after_order_completed

#924714

Hi Minesh,

we got it working. We could not use the hook you suggested, since that one does not seem to fire. We used a standard woocommerce hook, to set the user type.

I do have an other problem now. Once the user has created an account he should be able to create his own profile page.

This can be done through this cred form: hidden link

However i seem to have problems with saving the form data. I t used to work well, but somehow it is not working properly anymore. If i fill in a complete form, i get a file not found. However if i save only part of the form it does sometimes save the form and shows the created post(example: hidden link )

I do not get any error messages in the form so i don't really know what is causing the problem in the form. What is als weird is that the edit form of this post type does not seem to have the same problem. And the event form is also working properly, so it seems to be something form specific.

You Should be able to make a test account here to see what i mean: hidden link

I hope you can help me solve this bug. Kind regards,

Glenn Windhouwer

#924719

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Glad to know that you made it working using the standard Woocommerce hook.

Regarding the another issue, we just publish new version of Types 3.0.4 Which should fix that issue.

Could you please make sure that ALL Toolset plugins are updated to it's latest official release version.

*** Please make a FULL BACKUP of your database and website.***
You can download latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/

After update, if your issue still persist, please feel free contact me here.

#948351

Hi Minesh,

i have updated all the plugins. Alas, the problem is not fixed yet.

You can make your own testuser here
http:://testversie-site.nl/boerenfluitjes/lid-worden

And than create a profile on this page:
hidden link

When you submit this profile is when you get redirected to a page not found page.

Kind regards,

Glenn Windhouwer

#949011

Hello,

Minesh isn't available, I will take care of this thread.

For the problem:
If i fill in a complete form, i get a file not found

The problem is abnormal, in case it is a compatibility problem, please try these:
1) Deactivate other plugins and switch to wordpress default theme 2017, and test again

2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below "private detail box", I need to duplicate same problem and debug it in my localhost, thanks.

#950018
form-setting2.JPG
form-setting.JPG

I have tried the database dump file you provided with a fresh wordpress installation, Toolset plugins + Woocommerce plugin.

I assume we are talking about the Toolset form "Verwerkers profiel"(ID 3263), in section "Settings", I see there is not a specific post setting in option "What to show after submitting the form", see screenshot: form-setting.JPG

Then I have changed it to "go to a page" -> "home" page, see screenshot form-setting-2.JPG

Then test it again, it works fine

#950282
active-plugins.PNG
screen_1.PNG

Hi Luo,

i have already tried your solution. It did not work back then. But i tried it again today.

Reverted to the basic 2017 theme and disabled all plugins(see screenshots) except toolset and woocommerce. However i still get a page not found error.

So the problem still persists.

#950286

Also, just to be sure, did you fill in all the fields of the form? Because the form does sometimes save if i do not fill in all fields.

#951060

Yes, I filled all fields, then submitted the form, it works fine

It should be a server/compatibility problem, please provide a test site with the same problem, I need a live website to test and debug. thanks

#952004

I have tried the credentials you provided above, but get this error:
Not available.

Please check it, make sure it is valid to login. thanks

#953522

Hi Luo,

i saw the admin url was not correct. I edited it.

I also checked all credentials, the all work so you should now be able to gain access.

Kind regards,

Glenn

New threads created by Minesh and linked to this one are listed below:

https://toolset.com/forums/topic/split-user-form-allways-creates-customer-role-form-redirect-not-working/

#954302

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

This issue is really strange.

I need duplicator package of your install. Could you please send me 1:1 copy of your site using duplicator package.

More info:
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#954419

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I see following error message on browser's console once I submit the form on your install:

Failed to load resource: the server responded with a status of 404 (Not Found) ?_tt=1532433672:1

Could you please check with your hosting or with another server why the request is failed?