[Resolved] For password reset, submitting email triggers 502 error

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.

This topic contains 14 replies, has 2 voices.

Last updated by Beda 3 weeks, 3 days ago.

Assigned support staff: Beda.

Author
Posts
#1451879

I am trying to: I am trying to submit an Email address via the Password Reset Method

Link to a page where the issue can be seen: hidden link

I expected to see: Thank You for submitting your email

Instead, I got: 502 error

NOTE: THE SFTP PORT NUMER 2222 NOT 22

#1452645

Beda
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

I can see that something tries to redirect to the WordPress Core login/password reset page, instead of the redirect you have set (same page).

I tested this locally and it works fine, I can see on your site only that it is unusually slow, meaning it could be that a timeout is happening when submitting the form
Can you activate WP Debug and repeat the process to see what errors are produced or logged?
https://codex.wordpress.org/WP_DEBUG

Please also ensure that - before you repeat the tests - all 23 updates are performed which are pending here hidden link
Even, I would suggest to try this out with Toolset alone, and a native WordPress theme, to see if maybe a conflict arises with any of the other (or outdated) software.

Finally, I see that you use an incomplete, and invalid URL on the password reset:
[wpv-forgot-password-form reset_password_url='/reset-password/']

This cannot be inserted like this using the GUI, because the GUI will ensure you add a valid URL, using https:// format or http:// format.
Please add a valid URL to the form, so it can redirect to a valid address.

#1460295

Please keep this ticket open. I'm going through each step.

#1460471

I fixed the 502 Error. It was a permissions issue on the server side. I'm now getting an "Unknown Error" notification. Your thoughts?

#1460493

So the issue was entirely on the server-side. Now, I have a new issue. The /reset-password/ page blank and I was expecting a form.

hidden link

What shortcode do I add here?

#1461389

Beda
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

The issue is as well the URL as I mentioned, in the ShortCode.
I see you did not amend the changes I recommended, and hence, the shortcode can't work.

You'll need to use a real URL at [wpv-forgot-password-form reset_password_url='/reset-password/']
If you actually try to add that ShortCode with the GUI, you will see it asks to add a real URL, not a partial.

In fact, if you submit the form on hidden link it will only redirect to hidden link

To have a functioning Password Reset mechanism you need a page that holds [wpv-forgot-password-form] and if you set a redirect URL on success, it must be a full URL within your website.
You can read more about the functions and how to use it here
https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-forgot-password-form
https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-reset-password-form

Please let me know if afterwards the issues persist.

#1463139

Sorry. I am moved over to the production site. I did add your recommendations.

I tested and received a notification with the following link:

hidden link

However, on the reset page, there is no form although the shortcode is added. The shortcode used is:

[wpv-reset-password-form redirect_url='/my-account/']

#1463455

Beda
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Well, I can see above that you use the truncated URL:
redirect_url='/my-account/']

That won't work, as explained.
This is why your email link redirects to hidden link
, which is the same page as the forgot password form is inserted to (which then sends you the reset link)

I am sure that redirects there because the actual redirect URL is not correct.
If it is, then you just need to insert the reset form, on that page, so you can use it to reset the password.
But you will need to be sure to be logged out, as otherwise, you won't see that form.

Please adjust the redirect URLs or insert both in that same page, if you do not want to redirect anywhere else.

If this needs more attention on the live site, I need access details for that as well, or, we can proceed on the testing site you provided.

#1469977

What you are saying does not make any sense. The /lost-password-page/ contains the initial forget-password form. The /reset-password/ page contains the form that "resets the password" and redirects to /my-account/ when done. The URL hidden link is the correct page. What's not triggering is the form (the shortcode has been added) on the /reset-password/ page. I AM getting a JavaScript error on that form as the attached image shows. It's an undefined "$" as if the function is not encased in "jQuery(document).ready(function(){ });" in which the jQuery is not ready.

I am going to copy the site back over hidden link. Please take a look again.

#1470537

Beda
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

The [wpv-reset-password-form] shortcode should be used in combination with [wpv-forgot-password-form] shortcode, in order to produce a page that users can reset their password properly.

The steps you need to follow are:
1. Create a page and insert reset password shortcode: [wpv-reset-password-form]. You can also redirect this on success, using the ShortCode attributes.
2. Copy the URL of the page on the frontend
3. Create a new page and insert the forgot password shortcode [wpv-forgot-password-form], passing as argument the URL of the reset password page: [wpv-forgot-password-form reset_password_url='hidden link;

This way, (logged-out) users can use this forgot page to insert their email or username and they will receive an email, including a link to the reset password page.

That's how it is supposed to work and be used.
You inserted truncated parts of the URL which I mentioned will not work.
Please use the full URLs.

Unfortunately, I cannot access the testing site, as an error happens: "Unknown username. Check again or try your email address."
However I can see the form on hidden link, now, if that form is inserted properly with the shortcode and redirect, as shown above, it should send an email, and that email should hold a link leading to the URL you specify in the Shortcode (it should be hidden link).

Can you try adding the full URLs to the ShortCode?

#1473401

I gave you the ability to access the testing site again. Please check the private message for access details.

The scenario is that I am receiving the email notification with the redirection URL. When I land on the reset page, the shortcode form is not activating. You can use hidden link for testing.

#1474487
#1477051

Thanks. Please stand by as I review.

#1477819

Beda
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi

I am not sure if I miss a message in the thread, I received an email that you could not see my reply (I this question being answered?)
But I can't find that message here in the forum, hence I suspect you did initially not see the green hidden area to unfold and since updated your last reply, is this correct?

I apologize - I should have mentioned that the hidden (private) area is to find on the bottom right hand of the last reply and can only be seen if logged in, and "SHOW PRIVATE MESSAGE" is clicked.

Please let me know once you changed the email (if it remains necessary) for us to test again.

#1481675

I did realize. Thanks. Please stand by.