Skip Navigation

[Resolved] CRED User Edit form is printing the error message: “User does not exist” in a age that contains a post form

This thread is resolved. Here is a description of the problem and solution.

Problem:
- I have a CRED user form and a CRED post form in the same page
- I got "User does not exist" error message while trying to submit the form.

Solution:
Currently, CRED 1.6.1 doesn't support adding user form along with post form in the same page.

But this is added to our to-do list and would be implemented in the future.

This support ticket is created 7 years, 11 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.

Our next available supporter will start replying to tickets in about 1.37 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 10 replies, has 3 voices.

Last updated by MiquelC1907 7 years, 10 months ago.

Assisted by: Mohammed.

Author
Posts
#385409
UserDoesNot Exist.png
CRED form.png

Hi,

I think it started to happen after the last update of the Toolset plugins.

When submitting an edit user form, the message "User does not exist" is printed.
Of course the user does exist. See screnshots of the message, and for the form itself.

Thanks,

Miquel

#386081

Dear Miquel,

Could you describe detail steps to duplicate same problem?
How do you setup the CRED form?
Where do you put the CRED form shortcode? is it in a user view loop or user archive page?

I need detail steps to duplicate same problem, thanks

#386309
FormsAfterSubmit.png
FormsBeforeSubmit.png
PageAdminScreen.png
EditUserForm.png
CustomPostCreateContentForm.png

Dear Lou,

To make it easy for you to replicate, I've digged down to what's the minimum content making the issue to happen. My original content was included in a Woocommerce product, but the issue is happening in a normal page too.

It has come down to a basic page with 2 CRED forms:

1 - Custom Post (called "Houses") content creation form (screenshot enclosed)
2- User edit form (see screenshot)

Both CRED forms are siimplified versions of my original ones, but with them the issue is happening too. There is olnly one submit button, belonging to the edit user form.

I'm attaching screnshoots for the page content and frontend forms before and after submitting the form.

Of course, the user custom fields are not updated when submitting.

Thanks,
Miquel

#387300

Thanks for the details, I can see you put the CRED form for editing user in a nornal wordpress page, but there is a problem:
Which user are you going to edit?
For example it is the post author of current page/post
You can specific the user's ID like this:
[cred-user-form form="Edit User" post="[wpv-post-author format="meta" meta="ID"]"]

More help:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred-user-form
Parameters:
‘post’ => [optional] User ID of user to edit with this form (if form is an edit form, if user is omitted and form is an edit form, then current user_id will be used, for example inside Loop)

#387821
CurrentUserShortcode.png
CurrentUserFrontedAfterSubmit.png
CurrentUserFronted.png

The user I want to edit is the logged in user (current_user).

I've tried this:

[cred_user_form form="Edit USer" post="[wpv-current-user info='id']"], but the same error happens.

Ive also tried to se what's the output of [wpv-current-user info='id'], and it doens't matter what the info attributte is set to, the output is the "display-name". Ths name printed is OK (my nickname).

Enclosed screenshots of the admin and frontend.

Thanks,

Miquel

#389155

I can not duplicate same problem, see below test site:
hidden link
admin user: xgren/111111
subscriber user: xgrentest/123456

Here is my steps, please correct me if there is anything missing:
1) Create a CRED form for editing user:
hidden link

2) In access settings:
hidden link
Dashboard-> Toolset-> Access Control-> Custom Fields, enable option "Edit Own Custom User with CRED Form ..." for user role subscriber

3) put above CRED form into page/post:
hidden link

I have tried both admin user and subscriber user, but it works fine, could you duplicate same problem in above test site?

If you can not too, please try this in your own website:
Deactivate other plugins and switch to wordpress default theme and test again.

#389471

i've done changes in the test site, adding a post form before the user form, in the single post page.

Now you can not submit the user form.
The message error is not the same I'm getting in my site, so the behaviour is not identical in both sites (don't know why??), but still you can test what I think it's an unwanted behaviour, which maybe related to what's going on my site.

#389821

Thanks for the details, I can see the problem: when there is another post form, submit the user form will trigger an error:
The user was not saved because of the following problem:
You can edit only users with following roles: administrator, editor, author, contributor, subscriber

But I still can not see the problem you mentioned above:
"User does not exist"

I put it into our to-do list, our developers will take care of it. currently, I suggest you put the CRED form for editing user into another single page, and display edit link in the problem page.

#390478

Thanks to you.
The link option you suggested is not a good alternative for the site, so I've done some more tests and find a workaround that works for me. I write details here in case it can help your development team.

Trying to fix the issue, I decided to move the CRED form type, from "user form" to "post form".
In advance of doing it, I had to create two custom fields (Types) and asigned them to an existing Types CPT (Houses). Those newly created custom fields are the ones the new post form would be editing.

When testing with these 2 forms in the same page, still the data was not submmitted. I was only able to submit it when both forms were setup to "create" (not edit) posts (Houses CPTs).

As right now I was only interested in the notification email, and not in keeping the entered data in the database, this workaround of creating posts is OK for me.
As a final step I'm intercepting the saving of then newly created draft posts ( by the mean of the "wp_insert_post_empty_content" hook), to avoid creating rubbbish posts in the database. The notification email is sent OK.

A question for you to help me taking further decisions when adding forms to my site:
Is it the expected bahaviour of CRED?
Can it only print and submit one form per page or more ? What are the restrictions?
Is it the expected behaviour to submit data only when both forms in the page are of the same kind (both forms are post creation forms for the same CPT)?

Thanks,

Miquel

#395396

Hello Miquel,

I’m Mohammed Toolset support second tier and I have been escalated to this thread. I’ll give my best to help you to achieve your needs through Toolset components.

After checking this issue with the development team, they informed me that we don't support this behaviour.

It means that adding a user form along with a post form is not supported by CRED yet.
But, I've added this as a feature request on our to-do list so that the development team can check and take the appropriate decision.

Please let me know if you need further assistance.

Thanks.

#395844

OK. keep me informed.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.