Im having some issues with the Positive Rules

Hi there,

I am setting this site up on my desktop as a Mutisite set up using sub-domains. I have 4 free levels Subscribers, Students, Teachers and Parents. Everything has been going according to the manuals but Im having some issues with the Positive Rules:

1. Using the widgets rules I get the following errors showing in the header of the member who is logged into their admin:

( ! ) Warning: Invalid argument supplied for foreach() in /Users/Icon/Documents/Websites/stspyridon.dev/wp-content/plugins/membership/membershipincludes/addons/default.admin.rules.php on line 370
Call Stack
# Time Memory Function Location
1 0.0157 431596 {main}( ) ../index.php:0
2 0.5577 43434164 wp_dashboard_setup( ) ../index.php:17
3 0.5605 43440780 do_action( ) ../dashboard.php:124
4 0.5606 43441764 call_user_func_array ( ) ../plugin.php:406
5 0.5606 43441780 M_Dashboardwidgets->pos_dashboard( ) ../plugin.php:0

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /Users/Icon/Documents/Websites/stspyridon.dev/wp-content/plugins/membership/membershipincludes/addons/default.admin.rules.php:370) in /Users/Icon/Documents/Websites/stspyridon.dev/wp-includes/option.php on line 568
Call Stack
# Time Memory Function Location
1 0.0157 431596 {main}( ) ../index.php:0
2 0.5697 43485652 include( '/Users/Icon/Documents/Websites/stspyridon.dev/wp-admin/admin-header.php' ) ../index.php:104
3 0.5701 43486208 wp_user_settings( ) ../admin-header.php:38
4 0.5704 43486416 setcookie ( ) ../option.php:568

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /Users/Icon/Documents/Websites/stspyridon.dev/wp-content/plugins/membership/membershipincludes/addons/default.admin.rules.php:370) in /Users/Icon/Documents/Websites/stspyridon.dev/wp-includes/option.php on line 569
Call Stack
# Time Memory Function Location
1 0.0157 431596 {main}( ) ../index.php:0
2 0.5697 43485652 include( '/Users/Icon/Documents/Websites/stspyridon.dev/wp-admin/admin-header.php' ) ../index.php:104
3 0.5701 43486208 wp_user_settings( ) ../admin-header.php:38
4 0.5742 43486448 setcookie ( ) ../option.php:569

2. I can't get anything to show on the members dashboard? Also when I set a positive rule to add a blog so they can create their own blog but when I hit the link on the dashboard to create new blog I get directed to the protected content page?

3. Positive rules for pages work for the member but when they log out those pages can still be accessed using the same url. If you don't know the url all is hidden but these should be redirecting to the protected content page. The shorcodes work but when going to the member protected url I don't get redirected to the protected content page? I just see a blank page which I can add a message to in the setting but I would prefer the page to be protected.

4. I have also tried setting up URL groups but nothing happens when adding it as a positive rule:

stspyridon.dev/wp-admin/admin.php?page=communities
http://stspyridon.dev/spyschool/students-portal/student-forums/
http://stspyridon.dev/spyschool/students-portal/(.*)
http://stspyridon.dev/spyschool/students-portal/careers/(.*)

So at the moment the only way I can protect content is to use the shorcodes.

I have gone through the videos and manual for settings and from what I can see they are correct.

Regards

Peter

  • aristath

    Hello there @pwen, I hope you're well today!
    First of all, the PHP warnings you're getting indicate that somewhere in your installation there's a PHP file that ends abnormally.
    I would suggest first switching themes and using the default twentytwelve theme. If the issue doesn't occur there, then the problem is in one of your theme files (most likely this is in your theme or wp-config.php file).

    Could you please check i there are any spaces before the opening <?php tag in the beginning of the theme files?
    Closing PHP tags should be omitted everywhere in your installation, perhaps it's somewhere else?
    If there are a spaces, a blank line or anything else before the opening <?php tag in the beginning of the file delete them (of course without deleting the opening <?php tag).
    If there is a closing ?> tag at the end of it the delete it as well.

    Instead of using positive rules, I would advise you to use negative rules. In positive rules you have to add every single page and functionality that you want your users to be able to access. In negative rules you simply have to disallow access to the content that you don't want them to access.

    I hope that helps!

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.