latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Stephanie Meyer

Sorry, I've not written a description yet. I'll get to it soon!


My Latest Replies (From Various Topics)

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Thursday Jul 26th, 2012 at 1:42 pm #20323

No I have not tried that, but since the solution that I came up with works, I’m leaving it as is.

Thanks.

Posted: Wednesday Jul 25th, 2012 at 2:11 pm #20220

The 501 error is being created by your code specifically, not my custom php:

<?php $_g = stripslashes_deep ($_GET); ?>
<?php if (isset ($_g["_s2member_seeking"]["post"])) { $redirect_id = esc_html($_g["_s2member_seeking"]["post"]); } ?>
<?php if (isset ($_g["_s2member_seeking"]["page"])) { $redirect_id = esc_html($_g["_s2member_seeking"]["page"]); } ?>
<?php if (!$redirect_link = get_permalink( $redirect_id )) { $redirect_link = "http://www.envisiondemo.com/acumen/membership-area/"; } ?>

I do not have any errors in my code. The site otherwise works fine.

Your code is:
1. stripping slashes from $_GET array — the url string — this is this line that is creating the 501 error
2. evaluating if there is an ID value for _s2member_seeking a post, and saving that ID to $redirect_id
3. evaluating if there is an ID value for _s2member_seeking a page, and saving that ID to $redirect_id
4. If there is not permalink for $redirect_id, assign the redirect link to the membership-area page

Then use the $redirect_link variable in my login form code. This all makes sense.

I disabled the visual editor and have been able to execute other php code through the admin so I know that’s not the issue.

Ultimately, I had to pull all of the content of the page into a template because it didn’t seem that you could use stripslashes_deep ($_GET); through the admin. I tried just placing the code to get the $redirect_link variable into the template and then using the variable in the login code in the editor, but for some reason they won’t communicate.

So just FYI, your code does not work as intended.

I solved my problem, but I find it rather irritating that you don’t support what seems to be basic functionality of a PAID plugin. Thanks for your help thus far.

Posted: Tuesday Jul 17th, 2012 at 11:32 am #19526

I added the ExecPHP plugin to my site.

I tried implementing the code above and I get this error in a lovely white page when I try to save the post:

Method Not Implemented
POST to /acumen/wp-admin/post.php not supported.

I tried just adding lines 1-4 to the post (not doing anything to the form yet, just adding php), and I still get the same error.

Any ideas?

Posted: Sunday Jul 15th, 2012 at 9:58 pm #19319

Thanks for the fast reply.
I see the documentation that you pointed out, but I’m not entirely sure how to apply it to my situation. Any chance you could be more specific on how to use the data string from the membership area page?

I know that my redirect is pointing to the current page, but I am not sure how to change the url to then redirect to the previous page.

Please help. Thanks.
-Steph

Viewing 4 replies - 1 through 4 (of 4 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.