Simple Membership Plugin › Forums › Simple Membership Plugin › Redirect after login fails with no "punctuation"
- This topic has 11 replies, 3 voices, and was last updated 8 years, 5 months ago by
mbrsolution.
-
AuthorPosts
-
October 5, 2017 at 8:43 am #12097
bobgarrett
ParticipantI have a problem whereby when a user logs in and we have it set to redirect them to the previous page then the URL they are sent to excludes the ‘punctuation’ e.g. httpswww.mysite.org.ukmember-list.
Can you suggest why this is and how to fix it?October 5, 2017 at 10:09 am #12098mbrsolution
ModeratorHi, please try the following documentation first. Let me know how you go.
What is your permalink structure in your website?
Regards
October 5, 2017 at 10:18 am #12100bobgarrett
ParticipantThe Permalink structure is by post-name.
I will do the plugin and theme tests but one other clue might be that I am told it did once work – perhaps before we made the site more secure with SSL. But it could be that some other update has had an effect.October 5, 2017 at 10:39 am #12101bobgarrett
ParticipantLooking at the plugins I note that plugin for simple-membership-after-login-redirect is not tested with the most recent version of WordPress?
October 5, 2017 at 3:26 pm #12103bobgarrett
ParticipantFurther testing shows what I believe is an error in swpm-after-login-redirection.php
The valued returned by SwpmMiscUtils::get_current_page_url() is a correct URL.
However, by the time the content is processed for return in the variable $login_url the “punctuation” has been converted to https%253A%252F%252Fwww.mysite.org.uk%252Fmember-list%252F.
The %figures are then ignored in the redirect so “punctuation is removed”.Maybe the WordPress function urlencode has changed so needing a change in the plugin?
October 5, 2017 at 9:29 pm #12105mbrsolution
ModeratorThank you for reporting this issue. I have submitted a message to the plugin developers to investigate further your findings.
Kind regards
October 6, 2017 at 6:43 am #12110admin
KeymasterRedirect after login is working fine. I just tested it on my site.
This is likely a site specific issue. What is the exact URL that you are using in your configuration (to redirect the user to)?
Please do the following test to make sure another plugin is not messing this up on your site:
https://simple-membership-plugin.com/forums/topic/test-for-plugin-and-theme-conflict-before-posting-an-issue-or-a-bug/October 6, 2017 at 7:47 am #12111bobgarrett
ParticipantThe exact URL would depend on what the visitor’s last page was.
Your reply suggests you tested the redirect to a standard page defined by user group. Did you test redirect to last page?
Did you test it on the latest version of WordPress?November 8, 2017 at 2:41 pm #12397bobgarrett
ParticipantThis is still not working and you have not responded to whether your own tests were like my problem i.e. redirect to lst page NOT redirect to a standard page.
Can you confirm please.November 9, 2017 at 6:51 am #12413admin
KeymasterYes I tested with the “Enable Redirect to Last Page” feature enabled. I just tested it now with the latest version of everything and it works fine. Remember this plugin is used on many thousands of sites so I would know if a critical feature like this stopped working (as many users will face the issue). Something specific to this site is causing the URL to be broken.
The addon uses the following sanitation function on the URL to make sure the URL is safe (for security reasons)
esc_url_rawThis is a WordPress function that you are suppose to use on a URL to make sure it can’t be used to create a security hole. So if your URL has weird/strange characters that is not suppose to be present in a URL then its not going to work. That sanitization function of WordPress will remove the invalid characters to make the URL safe. We can’t make our plugin unsafe by removing the sanitization. If this is the case, you will need to edit the URL and make it a valid URL that passes the sanitization check.
November 10, 2017 at 3:01 pm #12432bobgarrett
ParticipantThe latest version seems to have fixed the problem.
ThanksNovember 11, 2017 at 5:34 am #12435mbrsolution
ModeratorI am happy to hear that your issue is resolved.
Enjoy the plugin.
-
AuthorPosts
- You must be logged in to reply to this topic.