Tips and Tricks HQ Support Portal › Forums › WP eMember › Protected Content still being displayed
Tagged: bug fix, bugs, content protection, upgrading
- This topic has 6 replies, 4 voices, and was last updated 13 years, 5 months ago by amin007.
-
AuthorPosts
-
June 20, 2011 at 11:12 pm #3632computercourageMember
I’m trying to protect one of my pages to one membership level that I’ve created. Everything seems to be working except that when I am not logged in, I can still see all of the page’s content along with the “Please Login to view this Content.(Not a member? Join Today!)” message appended to the very bottom.
I’ve tracked this down to the auth_check_page function, where $before_more is being set to display anything before the teaser/more tag. My problem is that I’m not using this more tag on any of my pages and thus expect the entire page to be protect. I’ve twiddled with the code to work for my purposes, but I only want to keep this as a last resort. Is there another way I can get around this?
June 21, 2011 at 12:39 am #33582amin007ParticipantThe content protection not working would be more of a setup/configuration related issue. If you go through this checklist you will most likely find the mistake:
It is also a good idea to get a fresh build of the plugin from here and update the plugin (in case a file got corrupted):
June 22, 2011 at 4:54 pm #33583computercourageMemberI’ve gone through that common mistakes post, and I believe my setup is right: 1) I have everything checked for global access; 2) I only have my one member page checked for protection for “General Protection”; 3) I have the one member page checked for access for my one member level; 4) everything else is untouched.
I’ve also upgraded WordPress and have updated the eStore and eMembers plugins. No change.
I believe that it’s finding the protected content correctly, since I’m getting the “Please Login to view this Content.(Not a member? Join Today!)” message only on that one member’s page. But from what I can tell from the function code, it sees everything before the more/teaser span tag as teaser information to be displayed. Since I’m not using this tag, it thinks my entire post content is a teaser and displays it before the “Please login” message.
June 22, 2011 at 6:05 pm #33584hoffybalboaMemberI’m having the same issue, as well.
WordPress 3.1.3., WP eMember 6.6.0. My other settings are the same as the author.
June 22, 2011 at 9:56 pm #33585hoffybalboaMemberThis is clearly a bug. The author forwarded me this workaround:
1) open the emember_access_checkers.php in the plugin folder
2) On line 141, find:
(function missing from email)
$before_more = split('<span id="more-'.$id.'"></span>',$content);
$before_more = $before_more[0] . '
';}
and replace with:
if( strpos($content, '<span id="more-') !== false ) {
$before_more = split('<span id="more-'.$id.'"></span>',$content);
$before_more = $before_more[0] . '
';}
June 23, 2011 at 8:15 am #33586netbiz86MemberThanks for that. I had the same issue and after replacing line 141:
if($more){ —> if( strpos($content, ‘<span id=”more-‘) !== false ) {
It works fine now. Thanks heaps.
June 23, 2011 at 11:11 pm #33587amin007ParticipantThe “more tag protection” work in the last build introduced this bug. We have fixed this issue so if you get another build from here you will be fine:
-
AuthorPosts
- You must be logged in to reply to this topic.