hellocoop / wordpress

A login and registration WordPress plugin for the Hellō service.
4 stars 2 forks source link

initiating sign-in from a blog post lands you in admin instead of back at the post #91

Closed mscurtescu closed 1 year ago

mscurtescu commented 1 year ago

Describe the bug You are taken to admin interface after sign-in instead of being taken back to the page or post where you started from with the intent to leave a comment.

To Reproduce Steps to reproduce the behavior:

  1. Open any post while in signed out state.
  2. Scroll to bottom and click on "logged in" link below "leave a reply" heading.
  3. Note that the redirect_to in the query params is the link of the post you were on. Upon clicking "Continue with Hellō", the link being forwarded to is: /?hello-login=start&redirect_to_path=%2Fwp-admin%2F&_cc=1675792290.3
    1. Notice the redirect_to_path is /wp-admin when it should be the post of the link.

Screenshots

image

In order to require login for comments make sure that "Users must be registered and logged in to comment" is selected under Settings / Discussion.

image

Expected behavior After signing in you are returned to the blog post where you started so you can comment.

mscurtescu commented 1 year ago

https://github.com/hellocoop/wordpress/commit/350f6718c3ca66b6d2eee3df2dc8e5835968bf27