The MU forums have moved to WordPress.org

mu1.3 default public set to no??? (28 posts)

  1. mutalk
    Member
    Posted 16 years ago #

    Just installed the mu1.3 but find the default Privacy Options set to no public(selected 'I would like to block search engines, but allow normal visitors').
    How to setup the default option for se and public like old version?
    Thanks.

  2. theapparatus
    Member
    Posted 16 years ago #

    Privacy defaults to public on my mu install.

    Line #307 of /wp-admin/includes/schema.php is where it's set. (And it's set to '1' which is public.)

    The signup default is in /wp-signup.php

  3. mutalk
    Member
    Posted 16 years ago #

    Thanks.

    No problem on line #307
    But it still set to no public after total new install.
    Also it set to no public when add new blog.
    And this is on godaddy shared hosting.

    Everything fine when back to mu1.2.3.

    Something wrong???

  4. mutalk
    Member
    Posted 16 years ago #

    test on another hosting. same problem.

    ???

  5. mutalk
    Member
    Posted 16 years ago #

    anyone has same problem on 1.3???
    seem nobody care about being public your blog.

  6. andrea_r
    Moderator
    Posted 16 years ago #

    No, nobody has the same problem.

  7. mutalk
    Member
    Posted 16 years ago #

    thanks.
    Are y fresh install or upgrade?

    1.3 just drive me crazy.

    I did like 7-8 total fresh install on two server.
    (Redownload the 1.3. Change the wp-signup.php code and changed options-privacy.php code...etc)

    It's all the same problem.
    Any time back to reinstall mu1.2.3, problem gone.

    It must something wrong.
    Help!!!

  8. theapparatus
    Member
    Posted 16 years ago #

    I'm afraid you're the one looking at the code. Not of us have been able to dupe this.

    Can you give at leats a link to your site so we can see what is occuring?

  9. andrea_r
    Moderator
    Posted 16 years ago #

    Are you sure the value is getting cleaned out of the database?

  10. mutalk
    Member
    Posted 16 years ago #

    will post link later.

    always drop the whole db before install.

    can't find anything wrong.

    may setup ftp for anyone who want test it tomorrow.

  11. mutalk
    Member
    Posted 16 years ago #

    ok, here is the test site i just installed 10 minutes ago.
    http://addictive.us/wp-admin/options-privacy.php

    user/pass
    admin/20898e7becf0

    That was fresh install and NO any code changed.
    And not touch anything after install.

    You can see default selected: "I would like to block search engines, but allow normal visitors".

    You can't add new blog from here becase the site not support wildcar dns yet.

    user/pass will be delete after 24 hours.

    Thanks.

  12. sarahd
    Member
    Posted 16 years ago #

    For what it is worth, I had this problem too (with new blogs defaulting to private), but I've only tried one install. I looked through the files and the schema.php file has blog_public set at 1.

  13. donncha
    Key Master
    Posted 16 years ago #

    I can't reproduce news blogs being set to private, but I just reinstalled and the main blog was set to private. Any other blog I created was set to public.
    Should be easy enough to fix.

  14. lunabyte
    Member
    Posted 16 years ago #

    Added some info to that ticket, Donncha.

    With r1182, fresh install, everything was private. Main, subs, didn't matter.

  15. hoobincom
    Member
    Posted 16 years ago #

    I have the same problem too. what is the status now? Anyway, I will try to hack the scheme.php and function install blog and see.

    But please post here and let us know if the problem being solve. thanks.

  16. lunabyte
    Member
    Posted 16 years ago #

    r1185 corrects the issue for the most part. At least for the main install, as well as when a user signs up.

    However, if a blog is created through the back (site admin-> blogs), they are still created as private.

    There's a ticket on trac for it, that you can follow.

  17. hoobincom
    Member
    Posted 16 years ago #

    Anyway, I manage to solve it by comment out the code:

    //add_option('blog_public', '1');

    and let the default '1' in the creating table do the trick:

    CREATE TABLE IF NOT EXISTS $wpdb->blogs (
    ...
    public tinyint(2) NOT NULL default '1',
    ..

    And it work:)

    I guess, this temporary solve the problem until someone look into the the set option function code for setting the tinyint type. Thanks.

  18. lunabyte
    Member
    Posted 16 years ago #

    Or you could check trac, where it's been fixed and then you're up to speed.

  19. theapparatus
    Member
    Posted 16 years ago #

    +1 for a 1.3.1 release. Either that or a download link on the download page.

  20. lunabyte
    Member
    Posted 16 years ago #

    Honestly, I'd think there would be a few things to tidy up before 1.3.1, according to the open tickets in trac.

    I'd rather it be delayed a tick, and get the issues sorted, then have to get a half-fixed version.

  21. mutalk
    Member
    Posted 16 years ago #

    Just tested mu1.3.2

    The main blog problem gone.

    But all the sub_blogs you add from admin panel remain the same problem.

  22. ayao
    Member
    Posted 16 years ago #

    It's being created as public (in schema.php) but then reset to false later on in the process. Specifically, in wpmu_create_blog in wpmu-functions.php, you have these lines:

    if ( is_array($meta) ) foreach ($meta as $key => $value) {
    	update_blog_status( $blog_id, $key, $value );
    	update_blog_option( $blog_id, $key, $value );
    }
    
    update_blog_option( $blog_id, 'blog_public', $meta['public'] );

    Note that the last line isn't included in the is_array($meta) check, so blog_public is set to false if no defaults were passed.

  23. neurophyre
    Member
    Posted 16 years ago #

    Yeah, this is still going on in 1.3.3.

  24. lenasterg
    Member
    Posted 16 years ago #

    A simple work-around is to add at
    file
    wp-includes/wpmu-functions.php
    on line:1232 (just before the return $blog_id)
    the following:

    update_blog_status($blog_id,'public',1,1);

  25. ayao
    Member
    Posted 16 years ago #

    Another workaround, so you don't have to mess with the core files, is to use a hook. Try this code; save it in a file in your mu-plugins directory:

    <?php
    function set_custom_defaults($blog) {
        update_blog_option($blog, 'blog_public', 1);
    }
    add_action( 'wpmu_new_blog', 'set_custom_defaults');
    ?>
  26. MrBrian
    Member
    Posted 16 years ago #

    I just noticed having this bug also. Anyone know if a trac ticket has been opened before I take a look?

  27. andrea_r
    Moderator
    Posted 16 years ago #

    If I reember right (I follow the trac feed) that was fixed.

  28. honewatson
    Member
    Posted 16 years ago #

    The plugin from AYO worked fine for me. I had to use this for 1.3.3.

    <?php
    function set_custom_defaults($blog) {
        update_blog_option($blog, 'blog_public', 1);
    }
    add_action( 'wpmu_new_blog', 'set_custom_defaults');
    ?>

About this Topic

  • Started 16 years ago by mutalk
  • Latest reply from honewatson