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.

Link to secure area goes to membership page

Home Forums Community Forum Link to secure area goes to membership page

This topic contains 14 replies, has 3 voices. Last updated by  Cristián Lávaque 3 years, 6 months ago.

Topic Author Topic
Posted: Monday Jun 3rd, 2013 at 9:28 am #51215

I have a powerpoint doc with a link to the secure members area.
When clicked the user (even if he is signed in and registered) is directed to the membership options page instead of to the relevant protected page.
If the same user copies and pastes the URL in his browser, it works correctly.
The URL tah is shown after clicking the link in the powerpoint is this:

http://www.cellocator.com/my-membership-options-page/?_s2member_seekingtype=page&_s2member_seekingpage=540&_s2member_seeking_uri=L2tub3dsZWRnZWJhc2UvaW50ZWdyYXRpb24tdG9vbHMv&_s2member_reqtype=level&_s2member_reqlevel=1&_s2member_restype=page&s2member_seeking=page-540&s2member_level_req=1

This is the link in the powerpoint:
http://www.cellocator.com/knowledgebase/integration-tools/

What is wrong??
print screen URL:
https://dl.dropboxusercontent.com/u/1746027/cellocator.jpg
Thanks
Dan

List Of Topic Replies

Viewing 14 replies - 1 through 14 (of 14 total)
Author Replies
Author Replies
Posted: Wednesday Jun 5th, 2013 at 5:55 am #51404

I remember a similar problem about 2 years ago with links in Word docs, but I couldn’t find the thread to see what the solution (if any) was then. I think it was something to do with how the browser handled it. I’ll ask Jason about this.

If you using the OpenOffice alternative to PowerPoint, do you have the same problem?

You did use the www consistently with your site in the link that’s in the file, right? Just checking. Knowledge Base » Logged In, But Am I?

Posted: Wednesday Jun 5th, 2013 at 6:11 am #51405

Thanks Crisitian,
It’s very important since it’s in a presentation sent to customers with links to the secure area.
It happens also in word docs.

Couldn’t check it in OpenOffice.
The www is used in the site and also in the powerpoint.
When copying and pasting the link into the browser it does work, just when clicking on the link in powerpoint it directs the user to the membership options page instead of the actual page.

Dan

Posted: Thursday Jun 6th, 2013 at 8:23 am #51489
Bruce
Username: Bruce
Staff Member

Thanks for the info. We’re waiting on word back from Jason (Lead Developer). We’ll let you know what we get back from him. :-)

Posted: Friday Jun 7th, 2013 at 12:00 am #51562

This is what Jason said:

Yes, that came up in the past. I believe it was related to this discussion.
http://stackoverflow.com/questions/2653626/why-are-cookies-unrecognized-when-a-link-is-clicked-from-an-external-source-i-e?answertab=votes#tab-top

The problem is that some Microsoft apps do NOT support cookie-based sessions properly. A possible workaround is to use redirection links in your Word/Powerpoint apps as discussed in that thread. If you put links in a Word doc, it is best to use JavaScript redirection (or a meta refresh tag); to prevent Microsoft apps from automatically following the link w/o having first been authenticated. A solution is proposed in that article I referenced.

This is not an s2Member bug, it’s a MS bug.

Posted: Monday Jun 10th, 2013 at 1:08 am #51709

Hi Christian
Thanks for your support, I added the code in the functions.php file as suggested in the stackoverflow discussion, but still the user is redirected to the membership page instead of the correct URL.

How can this be solved?
DO you need access to the plugin / site?

Thanks
Dan

Posted: Wednesday Jun 12th, 2013 at 5:32 am #51806

That code in the other page won’t solve the problem in your case.

What you need is something that redirects the person to the page you want to show your user. So your link in the PowerPoint file could have a variable like ?r at the end, and then in your hack check if [hilite mono]$_GET['r'][/hilite] is set and if so, redirect the user to the same URL without the var, but then he won’t be coming straight from PowerPoint and the WordPress session may work properly.

For example (havent’ tested it):

Create /wp-content/mu-plugins/s2-hacks.php
[hilite pre_code]
http://domain.com/members-page?r

Posted: Saturday Jun 15th, 2013 at 5:20 am #51981

Hello Cristian
I added the code to the s2-hacks.php file and it still doesn’t work.
Would you like access to the site in order to fix this issue?
Thanks,
Dan

Posted: Saturday Jun 15th, 2013 at 6:50 am #51993

Well, this is really custom coding, but I can take a look. Please use the contact form and leave me a reply here after sending it. s2Member® » Private Contact Form

Posted: Saturday Jun 15th, 2013 at 8:11 am #51995

Hi Cristian,
Sent.

Thanks
Dan

Posted: Tuesday Jun 18th, 2013 at 5:49 am #52078

I see, the redirection in the hack did work in the test I just did. So what you meant is that you still had the session problem when using the link in the powerpoint file? In that case I don’t know what to suggest, since this is really an Office problem…

Could you try a redirection using a URL shortening service? Would like to see if their redirection has a different effect. Try bit.ly, for example, shorten the URL to the protected page, and then use the short URL in your powerpoint, see if that works.

Posted: Tuesday Jun 18th, 2013 at 5:55 am #52079

Hi Christian
Just tried Bit.ly and it still redirects the user to the “my membership options page”.
I’m sorry but this is a fundamental issue.
My client uses office programs (powerpoint, word) to present his products which are under the S2member protected area and he cannot have these links not working.
There must be a way to solve this as office programs are not rare.

Dan

Posted: Wednesday Jun 19th, 2013 at 5:49 am #52178

s2Member uses WordPress’ functions to know if the user is logged in or not. It’s WordPress the one that manages the login session of the users, not s2Member. If WP tells s2Member the person is not logged in, there’s nothing we can do. :/

Try this in a page that is not restricted: add a conditional to check if the person is logged in or out. You can even do this without s2Member active, to check how the login session is working. Install a PHP execution plugin, and add this to a page using only the text editor (not the visual one):

<?php 
if (is_user_logged_in())
	echo "You're logged in";
else
	echo "You're not logged in";
?>

Knowledge Base » ezPHP Plugin for WordPress®
http://codex.wordpress.org/Function_Reference/is_user_logged_in

Check that it’s working correctly, then make sure you are logged in, link to that page from the PowerPoint file and try the link. Did the login session work correctly? Can you test it with another application like OpenOffice?

Posted: Wednesday Jun 19th, 2013 at 6:09 am #52183

Christian,
When the user reaches the s2 member area from the powerpoint he is logged in, vut still he is redirected to the membership page.
If you use the login info I sent you you can see there is a red bar on top of the site – showing the user that he is logged in.
Please log into the site with you user and see what I mean.

Dan

Posted: Wednesday Jun 19th, 2013 at 6:50 am #52194

Yes, I saw the bar, but that’s after he was redirected to the Membership Options Page. I’d like to see if he’s recognized as a logged in user in a page that wasn’t restricted by s2Member, when he gets there from a link in the PowerPoint. I don’t have PowerPoint myself, or I’d happily test it for you.

By the way, and this is just a guess, are you using the www in your link consistently with your site? See: Knowledge Base » Logged In, But Am I?

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

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.