BuddyBoss Home – Web Support Forums Plugins BuddyBoss Wall Multiple PHP warnings on a fresh install

Tagged: 

Viewing 15 posts - 1 through 15 (of 25 total)
  • Question

    #38656
    @acroyes

    I just purchased BuddyBoss Them 4.1.9 + BuddyBoss Wall 1.1.3 + BuddyBoss Media 3.02 an hour ago and added it to a fresh WordPress 4.1.1 install with WP_DEBUG set to true.

    When I activate BB Wall or BB Media I get this warning at the top of the admin:
    Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /var/www/acropedia.org/wp-includes/functions.php on line 3547

    Additionally, the settings link for BB Wall from the plugins page is broken. Takes me to a page with
    You do not have sufficient permissions to access this page.

    When BB Wall is activated, this notice is found on a profile page right above the first status update.
    Notice: Trying to get property of non-object in /var/www/acropedia.org/wp-content/plugins/buddypress/bp-activity/bp-activity-template.php on line 908

    This notice is found right before the last status update on the members page.
    Notice: Undefined index: id in /var/www/acropedia.org/wp-content/plugins/buddyboss-wall/includes/wall-privacy.php on line 307

    Lastly, these notices popup when you submit a status update. (See attachment).

    Once again this all happens with define(‘WP_DEBUG’, true).

    Hope these can be fixed soon.

    Answers

    #38662

    Alyssa
    Participant
    @alyssa-buddyboss

    @acroyes Welcome to the BuddyBoss community! Unfortunately GoDaddy has a laundry list of issues that makes it a poor choice for a BuddyPress website. The biggest of which is allowing allow_url_fopen=on. They say this is a security issue but BuddyPress just about requires it for proper operation. I will also note that WPEngine is also incompatible with BuddyPress sites. These issues are non-issues with other hosting providers so this is an ISP issue unless you can replicate this on another hosting provider. Let me know if you can test that out.

    #38670
    @acroyes

    Hi TJ,

    This is all on my local development environment. I haven’t migrated to any server yet. Planning on some VPS when I do.

    Thanks for your help. Please have your devs test with WP_DEBUG = true.

    Brian

    #38688

    Alyssa
    Participant
    @alyssa-buddyboss

    @acroyes these errors do not show up in live environments so I’m not quite sure what to tell you except to check your local environment settings. I’m not sure if this will help me at all but can you list the stats of your server environment, software, setup etc. Nothing needs to be too specific but the top level states, services, versions etc.

    #38689

    Alyssa
    Participant
    @alyssa-buddyboss

    PHP version is important.

    #38693
    @acroyes

    Yes, you are correct, they don’t show up in live environments because WP_DEBUG should be set to false in live environments and these are PHP warnings not critical errors.

    That does not mean there isn’t a problem. PHP warnings are an indication of buggy code, memory leaks and possible security holes. That is why WordPress developers usually code with WP_DEBUG set to true.

    Please see the WordPress Codex:

    NOTE: While it is not mandatory to account for WP_DEBUG in plugins and themes it is highly recommended that plugin and theme developers use WP_DEBUG mode while working on code they plan to release publicly. If your plugin or theme is not compatible then the errors, notices and warnings it throws will make it impossible for other developers to use your plugin/theme while they have WP_DEBUG enabled and your theme will not be eligible for promotion via the official WordPress tools.

    https://codex.wordpress.org/Debugging_in_WordPress

    I’m running PHP 5.5.21.

    #38721

    Alyssa
    Participant
    @alyssa-buddyboss

    @acroyes what tools/server are you using to create the dev environment?

    #38741
    @acroyes

    Ubuntu 14.04.2 LTS
    Apache 2.4.10

    #38769

    Alyssa
    Participant
    @alyssa-buddyboss

    @acroyes what WP theme are you using? If not the default one, do you get this message when you activate the 2015 theme?

    #38777
    @acroyes

    I’m using the BuddyBoss Theme 4.1.9. Switching to 2015 theme makes no difference, just checked.

    This isn’t theme related though, the warnings point to the plugin and some are in the admin.

    Have you tried it locally, setting WP_DEBUG to true in your wp-config.php?

    #38791

    Alyssa
    Participant
    @alyssa-buddyboss

    @acroyes this is the only error in common on my live site:
    Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.)
    There are a few other notices but no errors.

    #38792

    Alyssa
    Participant
    @alyssa-buddyboss

    If you want I can extend our refund policy for you until you are able to move to a live production server.

    #38818
    @acroyes

    All I’m seeing are notices, not errors. Glad you’re seeing them too.

    I’m just asking is that the notices be looked into and fixed which I’m confident the plugin developer can do.

    Thanks for extending the refund, but hopefully that won’t be necessary!

    Best,
    Brian

    #38835

    Alyssa
    Participant
    @alyssa-buddyboss

    @acroyes sounds good. Everything has been forwarded to the developers.

    #40434
    @acroyes

    It’s been a month and a half since I reported these warnings.

    In that time:
    BuddyBoss Wall has gone from 1.1.3 to 1.1.8
    BuddyBoss Media has gone from 3.02 to 3.0.4

    Thank you for all the updates. Yet the warnings are still there.

    Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in /var/www/mysite/wp-includes/functions.php on line 3560
    Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /var/www/mysite/wp-includes/functions.php on line 3560

    With the latest update to BuddyBoss Media 3.0.4 there is now a new warning.

    Notice: Undefined property: stdClass::$id in /var/www/mysite/wp-content/plugins/buddyboss-media/includes/types/photo-class.php on line 433

    Furthermore the plugin BuddyPress Edit Activity 1.0.5, which is made by BuddyBoss, also has the warnings when activated.

    I don’t understand. Does BuddyBoss not follow best practices and develop plugins with WP_DEBUG set to true?

    Please fix these notices. They are making it more difficult for me and other developers to develop and they have already caused other issues which haven’t been resolved yet.

Viewing 15 posts - 1 through 15 (of 25 total)
  • The question ‘Multiple PHP warnings on a fresh install’ is closed to new replies.