PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Success Attribute not working?

s2Member Plugin. A Membership plugin for WordPress®.

Success Attribute not working?

Postby slyhands » December 9th, 2011, 8:33 pm

Hello -

I am utilizing s2Member PRO and everything works great. However, I need to redirect the user to a specific page upon successful subscription creation (I only have one level that I am selling).

I've attempted to insert the success="" attribute into the form, but s2member appears to completely ignore this and sends the user right back to the sign-up form upon completing registration (account is created successfully, it just places a box on the screen that instructs them to click on the "login" link to login to their account).

Here is what my form looks like:

Code: Select all
[s2Member-Pro-PayPal-Form level="1" ccaps="wall_of_heroes" desc="100% Goes To Projects!  See you at the bottom!" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="doingmypart.com" ta="0" tp="0" tt="D" ra="3.00" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" success="https://doingmypart.com/dmp/welcome-to-doing-my-part/?user_id=%%user_id%%" /]


As I mentioned before....everything works, except the user is not redirected upon successful signup. I tried looking up the source code for the form on the page expecting to see a hidden field that was created, but no such field exists.

The registration page can be viewed here:
https://doingmypart.com/dmp/select-donation-amount

Am I missing something here, or is this just not functioning properly?

Thanks,
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Raam Dev » December 9th, 2011, 11:32 pm

Hi Steve,

It sounds like your PayPal PDT/Auto-Return Integration may not be configured properly. Can you double check the settings in WP Admin -> s2Member -> PayPal Options -> PayPal PDT/Auto-Return Integration to make sure they're correct?

You'll also want to turn on Logging (WP Admin -> s2Member -> PayPal Options -> PayPal Account Details -> Enable Logging Routines?) and then look at your paypal-ipn.log after testing the form.

Inside paypal-ipn.log, look for the details about your test transaction and then search for s2member_paypal_proxy_return_url; it should point to the URL you specified with the success= attribute.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Success Attribute not working?

Postby slyhands » December 10th, 2011, 3:21 pm

Heya Raam -

Thanks for the response/suggestions.

I made sure all the settings inside paypal are correct (they were...the system is accepting payments and creating the accounts just fine).

I setup the logs, and it appears the "success" attribute is being set successfully. Inspection of the logs shows the line you referenced:

's2member_paypal_proxy_return_url' => 'https://doingmypart.com/dmp/welcome-to-doing-my-part/?user_id=54'

However...still no redirect on the test.

Implementation seems pretty straightforward...which is why I'm stumped.

Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Raam Dev » December 10th, 2011, 5:10 pm

Hey Steve,

Could you share the contents of your wp-content/mu-plugins/s2-hacks.php file (if you've customized the behavior of s2Member at all in this way)?

Also, to get some more debugging data, could you create this directory and file:
/wp-content/mu-plugins/s2-debug.php
Code: Select all
<?php
add_filter 
("wp_redirect", "s2_debug");
function s2_debug ($v)
    {
        file_put_contents (WP_CONTENT_DIR . "/s2-debug.log", var_export (debug_backtrace (), true)."\n\n\n", FILE_APPEND);
        
return $v
;
    }
?>


Once that's done, please conduct a test signup where the redirect should happen and then share the contents of the s2-debug.php here (please X-out any private data).
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Success Attribute not working?

Postby slyhands » December 10th, 2011, 7:42 pm

Heya Raam -

No hacks in place.

I do not currently have a "mu-plugins" directory. (Just a "plugins" directory). Shall I use the "plugins" directory (where everything is), or indeed create a "mu-plugins" dir?

Thanks!
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Cristián Lávaque » December 11th, 2011, 2:05 am

You can create the /wp-content/mu-plugins/ directory if you don't have it yet (MU: must use).
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Success Attribute not working?

Postby slyhands » December 12th, 2011, 3:14 pm

Heya guys -

Attached is the resulting log file as instructed. The only thing I XXXX'd out was the absolute path on the server.

Thanks!
Steve
Attachments
s2-debug.log
(3.26 KiB) Downloaded 19 times
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Raam Dev » December 13th, 2011, 11:07 pm

Hey Steve,

Did you conduct a test signup while the debugging was turned on? As in, did you turn debugging on, do a test signup, then attach the s2-debug.log file here?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Success Attribute not working?

Postby slyhands » December 13th, 2011, 11:31 pm

That is correct. I created the file as indicated and ran a transaction through, which resulted in the file I attached here.

Thanks!
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby slyhands » December 17th, 2011, 5:55 pm

Heya guys...just curious if the logs revealed anything?

This redirect is literally the only thing holding me up from completing this project. I have the page that is supposed to be redirected to all setup with additional functions that fire upon sign-up....I just need to get the new member there upon sign-up.

I'm guessing this is a functionality issue within s2member. However, at this point, it doesn't matter to me if I need to hack-it to make it to work....I just need the member to get to that page immediately after the successful transaction.

Any clue as to why it is not working, or any direction/help on how I can manually force them to that page upon successful transaction?

I really appreciate your help. I'm trying to wrap this up for the client asap.

Thanks again in advance,
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Cristián Lávaque » December 17th, 2011, 9:00 pm

I'm not sure from what I see in that log.

Is the confirmation email being sent by s2Member after checkout? Are these new members or upgrades of existing accounts? Could you post the entries with this problem from the logs in /wp-content/plugins/s2member-logs/

Also, it is possible that another plugin is causing this problem. Could you, as a test, deactivate other plugins one by one? See if the problem goes away with one of them.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Success Attribute not working?

Postby slyhands » December 18th, 2011, 6:12 pm

Is the confirmation email being sent by s2Member after checkout?

Yes. Everything else is working perfectly. (Emails, Mailchimp list sign-up, account creation, etc.). Only the redirect seems to be not functioning.

Are these new members or upgrades of existing accounts?

These are all new members.

Could you post the entries with this problem from the logs

Please see attached. Sensitive information has been replaced with "XXXXXXXXX".

Also, it is possible that another plugin is causing this problem. Could you, as a test, deactivate other plugins one by one?

I am hoping to do this as only a last resort. The site is currently live, as these changes are in a phase 2 build-out, and the client has not provided me with a development server. I am concerned that some dependent setting values from plug-ins may affect the entire functionality of the live site.

For reference, these are the other plug-ins that are active on the site:

- Avatars
- Custom Field Template
- Wordpress Importer
- WP-Cufon

Thanks,
Steve
Attachments
paypal-ipn.log
(2.67 KiB) Downloaded 10 times
paypal-api.log
(1.92 KiB) Downloaded 13 times
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Cristián Lávaque » December 19th, 2011, 10:30 pm

Thanks Steve.

Could you try what happens if you remove ?user_id=%%user_id%% from the success URL?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Success Attribute not working?

Postby slyhands » December 20th, 2011, 11:43 pm

Same result if I remove ?user_id=%%user_id%%

Thanks,
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Cristián Lávaque » December 22nd, 2011, 4:36 am

Thanks Steve. I emailed Jason to check what your problem could be.

In the meantime, could you post the log entries for the latest transaction you tried? (x'ing out any private info, please) Thanks!
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Success Attribute not working?

Postby slyhands » December 22nd, 2011, 2:12 pm

Thanks Cristian...I am really hoping we can resolve this soon.

Did you see the logs I posted above with XXXX'd out info?

Thanks,
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Cristián Lávaque » December 23rd, 2011, 5:46 am

Yeah, I saw those. I meant the last transactions you tried after those. Could you add them here too?

I too hope we can find the problem soon.

Do you think you could make a copy of the website (files and db) and try deactivating plugins there? It'd be good to check for plugin conflicts... Or have the backup to go back to it after the test deactivations the in current installation.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Success Attribute not working?

Postby slyhands » December 26th, 2011, 2:17 pm

Attached are the recent logs (I just ran another transaction through again).

Question: Is there a variable that is posted back to the sign-up page that I can evaluate for to manually push them to the desired page after sign-up? Or somewhere I can manually insert the redirect into the routine?

Any word from Jason?

Thanks again,
Steve
Attachments
paypal-ipn.log
(4.67 KiB) Downloaded 12 times
paypal-api.log
(1.92 KiB) Downloaded 12 times
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Jason Caldwell » December 26th, 2011, 5:19 pm

Thanks for the heads up on this thread.
~ I'm sorry for the delayed response.

Going back to your original post for a moment...
I've attempted to insert the success="" attribute into the form, but s2member appears to completely ignore this

Code: Select all
[s2Member-Pro-PayPal-Form level="1" ccaps="wall_of_heroes" desc="100% Goes To Projects!  See you at the bottom!" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="doingmypart.com" ta="0" tp="0" tt="D" ra="3.00" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" success="https://doingmypart.com/dmp/welcome-to-doing-my-part/?user_id=%%user_id%%" /]


I can confirm that this functionality does work as expected. Tested in WordPress v3.3 and s2Member v111220. I'm not aware of any bug related to this in your version (i.e. v110815), but you might upgrade to the latest/greatest anyway, and try your tests again.

Short of that... I've seen this happen before whenever you accidentally leave a double quote out of your Shortcode? The Shortcode you posted here looks good, but if you miss a double quote, your Custom Return URL would be ignored completely, as the syntax is incorrect.

Not sure that's what's happening here, but thought I would mention it.
Code: Select all
success="https://doingmypart.com/dmp/welcome-to-doing-my-part/?user_id=%%user_id%%
( bad, missing a double quote at the end )

Your log files look good. In fact, they tell me that your Custom Return URL is being processed properly. However, you're saying that no redirection occurs at all. That leads me to believe that something is intercepting the return response data that comes from s2Member's IPN handler.

After upgrading to the latest version of s2Member, I would also update to WordPress v3.3, because this release of WordPress fixes some issues in the WP_Http class that could bring about weird problems like the one you're reporting here. If the problem continues, please write me back. I have some additional debugging tools I can provide you with against the latest version.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Success Attribute not working?

Postby slyhands » December 30th, 2011, 3:06 pm

Jason -

I updated both s2member and WP and it WORKS! yeeeeha! :)

Not sure what was hanging it up, but it is working now!

Thanks!
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Raam Dev » December 30th, 2011, 4:13 pm

Thank you for the update, Steve! Glad to hear it's working now. :)
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Success Attribute not working?

Postby slyhands » January 2nd, 2012, 4:30 pm

Okay...looks like one success leads to another problem!

The redirect is functioning fantastically (finally!). However, NOW...upon successful account sign-up, the new member is no longer receiving the welcome email that goes out. This WAS functioning before the upgrade. I checked to make sure that the s2member email setting was not reset after the upgrade (it was not). I also made sure that email is successfully leaving the server (it is...I ran a quick mail script sent via php code and got it instantly).

Any ideas why this would stop functioning all of a sudden?

Just when you thought it was safe to send the client a final invoice.....doh!

Thanks,
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby Raam Dev » January 2nd, 2012, 5:23 pm

Could you try installing the EMail Log plugin and then doing a test and checking if WordPress sent the email?

Also, could you tell me exactly what email you're referring to? Is this the "New User Email Message" that contains their username/password, or are you referring to something else?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Success Attribute not working?

Postby slyhands » January 2nd, 2012, 6:01 pm

I'll try it and see what it says.

That is correct, the "New User Email Message". It WAS working before. I am guessing that now that the page is redirecting upon successful sign-up, something is not getting hit that fires the email off. (That, or the upgrade bumped something!)

I'll install it and see what happens. Back in a few!

Thanks,
Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Re: Success Attribute not working?

Postby slyhands » January 2nd, 2012, 6:12 pm

Okay...strange...the email logger says that 2 emails were fired.

The first is the "New User Email Message" that is supposed to be sent to me (as the customer).

The second is the "New User Signup" that is supposed to be sent to me (as the admin).

I previously received BOTH emails BEFORE upgrading both Wordpress and s2member/pro.

For the heck of it, I just ran another email test off a webpage script (outside of WP directory) and I immediately received the email. (I am consistently getting emails from both email accounts I am testing out)....so I don't know where the problem is.

Any ideas?

Steve
User avatar
slyhands
Registered User
Registered User
 
Posts: 36
Joined: September 1, 2011

Next

Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 4 guests

cron