sontru (@sontru)

Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • @sontru

    Participant

    Not just this site but also the WordPress.org forums… I wonder what they have in common? 😉

    I see spam as I post!

    @sontru

    Participant

    No, not for me. Although, it might have remembered my settings for the previous activation and setting saving…

    @sontru

    Participant

    Hey! I’ve just installed bbPress v2.3 beta 2 ( https://bbpress.org/blog/2013/02/bbpress-2-3-beta-2/ ) and it has fixed this problem!

    I don’t know if the fix to the first bug (included in this v2.3 beta 2) help fixed this issue, but I no longer have this issue on my live site!

    Yay!

    @sontru

    Participant

    `
    <?php
    /*
    Plugin Name: Test add_user_to_blog with bbPress
    Plugin URI:
    Description: Does what it says! Menu item will appear under Users Menu in admin’s CP
    Author: sontru
    Version: 1.0.0
    Author URI:
    */

    add_action( ‘admin_menu’, ‘ad_the_wp_menu’);

    function ad_the_wp_menu() {
    global $bbtestpage;
    $bbtestpage = add_users_page(‘bbPressBugtest’, ‘bbPress Bug Test’, ‘administrator’, __FILE__, ‘addsutoblogfunc’);
    }

    function addsutoblogfunc()
    {
    if(trim($_POST[‘username’]) === ” || trim($_POST[’email’]) === ”) {
    echo ‘<h3>bbPress Bug Test</h3>’;
    echo ‘<p>Activate the bbPress plugin. Add a user using this page, refresh by displaying to All Users. If there is an issue, all sub sites will appear in this user\’s My Sites drop down list.</p>’;
    echo ‘<form method=”post” name=”create-user-test” action=”‘ . the_permalink() . ‘” />’;
    echo ‘Username: <input type=text value=”” name=”username”> Email: <input type=text value=”” name=”email”><input type=submit value=”Create User”>’;
    }
    else {
    $my_user = trim($_POST[‘username’]);
    $my_email = trim($_POST[’email’]);
    $my_user_id = username_exists($my_user);
    if( !$my_user_id and email_exists($my_email) == false) {
    $random_password = wp_generate_password( $length=12, $include_standard_special_chars=false );
    $my_user_id = wp_create_user( $my_user, $random_password, $my_email );
    echo “<p>Creating new user: $my_user with email: $my_email | Generated userID: $my_user_id</p>”;
    if($my_user_id && !is_error_id($my_user_id))
    add_user_to_blog(get_current_blog_id(),$my_user_id,’administrator’);
    } else echo ‘<p>User: $my_user exists or email: $my_email exists! Nothing done!</p>’;
    }

    }
    ?>

    `

    Use with care!

    @sontru

    Participant

    Thanks for confirming the first bug. (I’ve also found that this bug can be fixed by simply saving the settings as is.)

    I’ve been doing some more investigation on the second issue. It looks like it is not the add_user_to_blog function but the wp_create_user function (probably used in conjuction with add_user_to_blog) that is causing the problem. I’ve written a simple admin page (menu item appears under the Users menu) that will manifest the issue on my multisite setup.
    `
    [code with angle brackets removed to be posted]
    `
    Unfortunately, I have not been able to replicate this using a new install of WordPress MS v3.4.2, bbPress and a few sub sites and users. I will have to carry on looking to why my live MS site is causing this issue to manifest.

    @sontru

    Participant

    I found the bug report pages and have logged the two issues:

    https://bbpress.trac.wordpress.org/ticket/2205

    https://bbpress.trac.wordpress.org/ticket/2206

    @sontru

    Participant

    Participant is not one of WordPress’s user roles! It only gets introduced with bbPress.

    There’s nothing wrong with my add_user() function (I don’t have one!) The problem occurs when calling up the WordPress function ‘add_user_to_blog’ when bbPress is active.

    Is there a way of reporting bugs found in bbPress?

    @sontru

    Participant

    You misunderstand – I don’t want network users to be added as a participant! (The bug is that bbPress does this even, at installation/activation, the default option says not too!)

    The second bug is a bigger problem here, as there is no work-around except disabling bbPress!

    (I did see your plugin and article before posting, and thought the code had been absorbed into bbPress, but obviously not. If the feature is already present, why write this plugin?)

    @sontru

    Participant

    Hey! I’ve now fixed my problem :)

    The system (Debian 6) was missing or had an old version of php5-gd installed. apt-get install php5-gd and restarting the apache2 server fixed the problem of the blank pages.

    Also these code changes by _ck_ helped to improve Avatar Upload:

    Delete avatar function: https://bbpress.org/plugins/topic/avatar-upload/page/5/#post-1093

    Make identicon function work: https://bbpress.org/plugins/topic/avatar-upload/page/5/#post-1096

    @sontru

    Participant

    @RoyalManG – you need to change line 7 in avatar-upload.php to bb_auth(‘logged_in’); // logged in?

    I’ve having a bit of a problem with this Avatar Upload plugin when uploading files larger than the specified dimensions. If I do so bbPress just displays a blank page with this address: http://<forumdomain>/bbforum/profile/<user>/avatar

    Has anyone come across this before and can help?

    @sontru

    Participant

    Most of the deprecation is to do with =& assignments.

    According to this http://www.php.net/manual/en/language.references.php#93292

    All that need doing is to remove the &

    Is it safe to do so. Has anyone done this? Is there any recursive tree loops in the code?

    @sontru

    Participant

    Most of the deprecation is to do with =& assignments.

    According to this http://www.php.net/manual/en/language.references.php#93292

    All that need doing is to remove the &

    Is it safe to do so. Has anyone done this? Is there any recursive tree loops in the code?

Viewing 12 replies - 1 through 12 (of 12 total)