Questions Plugin

I have set up Q&A but I receive a 404 error whenever I visit any of the Q&A pages. So I changed the plugin to network activated which then made the links re-direct to a blank page with a url http://www.mysite.com/activate.

My goal is to set Q&A up for my main parent site but not as an available plugin for multi site users.

Thanks

  • PC
    • WPMU DEV Initiate

    Hiya,

    Greetings and thanks for posting on the forums.

    have set up Q&A but I receive a 404 error whenever I visit any of the Q&A pages. So I changed the plugin to network activated which then made the links re-direct to a blank page with a url http://www.mysite.com/activate.

    That might happen due to incorrect permalink settings. Please refresh the permalinks by setting them to default and then setting them back to pretty.

    My goal is to set Q&A up for my main parent site but not as an available plugin for multi site users.

    In that case you do not need to network enable the plugin. Just activate it on the main site and that is all.

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Cheers
    PC

  • PC
    • WPMU DEV Initiate

    Hiya,

    Thanks for standing by on this one.

    I deactivated all the plugins (Network activated) and on the site in question and just left the Q&A plugin activated with the theme you are using and I can see that fine.

    http://www.mixheadz.com/questions/test2/

    Now, you will need to reactivate them one by one to see which plugin was causing conflict.

    To narrow it down, its was one of the network activated plugins. So once you activate them, do it one by one so that you can find out which one was causing the problem.

    Cheers, PC

  • ghog
    • The Incredible Code Injector

    great thanks very much. i am currently running through each plugin however i have noticed when I login, the Q&A form disappears from the front end. as a non registred visitor it is displaying correctly however as a registered user id vanishes.

    thankyou!

  • PC
    • WPMU DEV Initiate

    Hello @ghog

    Greetings and thanks for writing back.

    Sorry for the delay as I was away.

    just to follow up i have just realised the problem just mentioned above is only happening when logged in as administrator. if i log in as super-admin i can see the form

    This might be an issue with the capabilities on your site. Please ensure that under Q&A plugin >> Settings , Administrator has got the full rights.

    Please advise if that helps.

    Cheers, PC

  • PC
    • WPMU DEV Initiate

    Hiya,

    This has been fixed.

    as I doubted before, it was a problem with the capabilities assigned to the administrator and he was being taken to an activate page.

    Kindly check again and test if everything looks good now.

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Cheers
    PC

  • ghog
    • The Incredible Code Injector

    thanks for checking this again but from my tests the problem still exists. when I log in as an administrator and visit the Q&A page I am re-directed to the /activate page with no Q&A functionality. If I log out or, log in as super administrator the plugin works.

  • PC
    • WPMU DEV Initiate

    Hiya,

    Thanks for the info

    when I log in as an administrator and visit the Q&A page I am re-directed to the /activate page with no Q&A functionality.

    That is happening because the admin user you are logging in as, do not have any role on your main site.

    That user belongs to one of the subsites and does not have any role on your main site.

    That is the reason he is not able to view the questions page.

    Just try and add that user to your main site, you will be able to view the questions page.

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Cheers
    PC

  • ghog
    • The Incredible Code Injector

    ok i understand but it seems to make Q&A incompatible for multi-sites and buddypress. i mean as it stands if a user signs up on my main site they get access to a buddypress profile and also a new site/blog set up, however to access the Q&A I need to manually add them to the main site as a user?

  • Shawn
    • The Crimson Coder

    A better solution would be to have them automatically added to the main site as a subscriber. You can do this with the following code:

    function mandate_subscriber_to_1($user_id) {
    add_user_to_blog('1', $user_id, 'subscriber');
    }
    add_action( 'wpmu_new_user', 'mandate_subscriber_to_1');

    This will add each new user to the blog with ID # 1 as a 'subscriber' upon joining the site.

  • Shawn
    • The Crimson Coder

    Create a new file named "whatever.php" with the code above (and the PHP wrappers) in the mu-plugins folder. You can add additional information to help identify what it's for later on if you want. Something like this:

    <?php
    /*
    Plugin Name: Mandate1
    Description: Forces each new user into the main blog (id#1) as a subscriber.
    Author: Shawn K. Hall
    Version: 1.0.0
    */
    
    function mandate_subscriber_to_1($user_id) {
    add_user_to_blog('1', $user_id, 'subscriber');
    }
    add_action( 'wpmu_new_user', 'mandate_subscriber_to_1');
    
    ?>
  • PC
    • WPMU DEV Initiate

    That is a nice plugin :slight_smile:

    With this plugin, users are assigned a default role for each of your sites. You set the default role for each site and this plugin applies it.

    Can you try that @ghog

    Cheers, PC

  • ghog
    • The Incredible Code Injector

    thanks for the great feedback guys. i tried the plugin however when activated it lists all of the sub sites in the Network Settings page, and as I will be importing an existing member base of 10,000+ users with sub sites this will create some carnage when loading the page lol.
    I implemented Shawn's method and it works a treat :slight_smile:

    Thanks!!!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.