Simple Membership Plugin › Forums › Simple Membership Plugin › Some pages protected, others aren't
- This topic has 10 replies, 3 voices, and was last updated 10 years, 3 months ago by
hoaonline1.
-
AuthorPosts
-
February 25, 2016 at 2:47 am #5399
hoaonline1
ParticipantI cannot figure out why one page on my website is not password protected. I go through the process and it works on all other pages. This is a page, not a category. A simple page. It should act like all others but it does not. I have tried to debug, no information there. I have tried to assign it a different level of protection. Nope. I am at a loss. I would share the website with you here but the page is supposed to be password protected to protect the information and I am afraid sharing the URL here will only expose me to a greater risk of not having that information protected. What should I do?
February 25, 2016 at 3:58 am #5402mbrsolution
ModeratorHi, can you test that page on a different browser?
Make sure if you test it on the same browser you are working on, you have also logged out of your website.
Clear your browser cache and also if you have a cache plugin you also delete the cache.February 25, 2016 at 2:16 pm #5437hoaonline1
ParticipantTried on multiple browsers at multiple locations (office, home, cellphone). Still not protecting page. Cleared caches. Did not work. Looked for cache clearing plugin. Do you have any recommendations?
February 25, 2016 at 9:10 pm #5439mbrsolution
ModeratorTry the following can you recreate that page again. What I mean is copy the whole content to another new page. Then try to protect that new page? If that works then delete the old page. Sometimes pages or posts become corrupted.
Are you using a custom template on that page?
February 25, 2016 at 9:55 pm #5441hoaonline1
ParticipantYes, I had already tried that. The content is quite simple, it is just a shortcode to another plugin. Still, the page will not accept the protection.
February 25, 2016 at 10:36 pm #5442mbrsolution
ModeratorHi, are you saying that the content of the page has a shortcode? Can you carry out the following test. Can you remove the shortcode and simply add some text, then protect the content. Let me know what happens.
Thank you
February 25, 2016 at 10:53 pm #5443hoaonline1
ParticipantIf I do that, then the page will be protected. It seems to have an issue with this one particular shortcode.
February 25, 2016 at 11:44 pm #5445mbrsolution
ModeratorThat is what I thought, you might have to investigate further this issue.
February 26, 2016 at 2:16 am #5449hoaonline1
ParticipantHere is what I am thinking. The shortcode is pretty simple, it goes like this.
<?php
global $wpdb;$table_name = $wpdb->prefix.”swpm_members_tbl”;
?>
<div class=”wrap”>
<table class=”widefat”>
<thead>
<tr>
<td>Name</td>
<td>Address</td>
<td>Phone</td>
<td>Email</td>
</tr>
</thead>
<tfoot>
<tr>
<td>Name</td>
<td>Address</td>
<td>Phone</td>
<td>Email</td>
</tr>
</tfoot>
<tbody>
<?php$result = $wpdb->get_results(
”
SELECT last_name, first_name, address_street, phone, email
FROM $table_name
ORDER BY last_name
”
);foreach($result as $row) {
$member_id = $row->member_id;
$last_name = strtolower($row->last_name);
$last_name = ucfirst($last_name);
$first_name = strtolower($row->first_name);
$first_name = ucfirst($first_name);
$address_street = strtoupper($row->address_street);
$phone = $row->phone;
$email = $row->email;echo “<tr>\n”;
echo ” <td>”.$last_name.”, “.$first_name.”</td>\n”;
echo ” <td>”.$address_street.”</td>\n”;
echo ” <td>”.$phone.”</td>\n”;
echo ” <td>”.$email.”</td>\n”;
echo “</tr>\n”;
}
?>
</tbody>
</table>
</div>
<?php
}
?>What’s happening is that there are over 500 records to pull to generate this list. So, does the Simple Membership Plugin timeout because the MySQL request is too long? I see the message at the bottom of the screen that says you must be logged in to view this content, but the content is displayed on the page before the message.
February 26, 2016 at 9:40 am #5456admin
KeymasterAre you using some kind of a page/content builder plugin on the pages where it doesn’t work? Or are these pages created by another plugins (as a custom post type)?
February 26, 2016 at 1:19 pm #5497hoaonline1
ParticipantI am not sure what that means. I coded this by hand, so no, I did not use a page builder. The page is just a page with the shortcode included. The construct for the shortcode looks like this:
add_shortcode(‘hoadir’, ‘hoamembershipdirectory’);
with the shortcode being what I posted before as a function called
function hoamembershipdirectory(){
//all the code that I shared above here
} -
AuthorPosts
- You must be logged in to reply to this topic.