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™

Cannot use ?s2member_file_download=access-s2member-level1

s2Member Plugin. A Membership plugin for WordPress®.

Cannot use ?s2member_file_download=access-s2member-level1

Postby devtest » July 25th, 2010, 11:28 am

Hello!

Have read through the forums trying to solve my problem, and I think the level of support here is great.

My goal is to set up a subscription-based site for video and text content, so I'm using s2member. I created a PayPal button that gives access to level 1 content, and successfully signed up a test user with a PayPal sandbox account. I verified that this user can access a page that I designated as level 1 in General Options -> Page Access Restrictions, and that non-logged in users cannot access this page. So far so good.

Next I tried to put up videos that are associated with this right and limit their access, but I ran into problems. Based on the Download Options and API / Scripting information sections, I first set up the downloads for 99999999 (infinity) per every 9 days (abitrary), which will allow me to download things protected with s2member. I created the directory .../wp-content/plugins/s2member-files/access-s2member-level1 and inside of it I have the file test.avi.

When I try to access http://mysite/?s2member_file_download=access-s2member-level1/test.avi in Firefox, I get redirected to http://mysite/membership-options?s2member_level_req=0&s2member_file_download_req=access-s2member-level1/test.avi when I am not logged in, but redirected to http://mysite/membership-options?s2member_level_req=21&s2member_file_download_req=access-s2member-level1/test.avi when I am logged in. I would have expected to be redirected when I was not logged in, but to be able to view or download the video when I was logged in.

When I copy test.avi to .../wp-content/plugins/s2member-files directly, I can access this when logged in (as expected) when I navigate to http://mysite/?s2member_file_download=test.avi.

Can someone help me figure out why I cannot create a level subdirectory and access files in there when I am logged in with permissions of that level? I only have one level of subscription at this point, but will more than likely create more levels at some point. Thanks for your help, please let me know if I can clarify anything.
User avatar
devtest
Registered User
Registered User
 
Posts: 3
Joined: July 25, 2010

Re: Cannot use ?s2member_file_download=access-s2member-level

Postby Jason Caldwell » July 28th, 2010, 7:27 am

Thanks for reporting this.
~ Investigating now.
~ 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: Cannot use ?s2member_file_download=access-s2member-level

Postby Jason Caldwell » July 28th, 2010, 7:42 am

Thanks again for reporting this. This is a bug in s2Member v3.1.5.
I've attached a patch for you. However, this will be fixed in the next official release of s2Member.

For now, you can upload the attached file, and allow it to override your existing file:
Code: Select all
/s2member/includes/functions/file-download-access.inc.php

( you will need to unzip it first )
file-download-access.inc.php.zip
(3.94 KiB) Downloaded 15 times
~ 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: Cannot use ?s2member_file_download=access-s2member-level

Postby devtest » July 28th, 2010, 7:47 am

OK, great, glad to hear that this should fix the problem. I can't verify the patch right now, but hope to be able to soon. I definitely appreciate you fixing the problem. :) Thanks!
User avatar
devtest
Registered User
Registered User
 
Posts: 3
Joined: July 25, 2010

Re: Cannot use ?s2member_file_download=access-s2member-level

Postby Jason Caldwell » July 28th, 2010, 8:08 am

Very welcome. Please report back if you can.
I verified that it works here, but it's always good to hear feedback. Thank you!!
~ 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: Cannot use ?s2member_file_download=access-s2member-level

Postby devtest » July 28th, 2010, 6:35 pm

I just tried it out, and it appears to work now as expected. Thanks!
User avatar
devtest
Registered User
Registered User
 
Posts: 3
Joined: July 25, 2010

Re: Cannot use ?s2member_file_download=access-s2member-level

Postby Elizabeth » August 4th, 2010, 9:39 pm

Awesome!
User avatar
Elizabeth
Moderator
Moderator
 
Posts: 160
Joined: May 12, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 12 guests

cron