Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress causes problems editing images w/ image editor


  • staxracing
    Participant

    @staxracing

    Had this problem for some time now, so I had to disable all of my plugins to check which causes the problem. Unfortunately it’s buddypress.
    When I want to edit an image with the image editor, it first shows me the broken image symbol. If i then click one of the buttons (mirror, rotate etc), the following message appears:

    Could not load the preview image. Please reload the page and try again.

    As I said, I am pretty sure this is b/c of buddypress, because as soon as I disable that plugin, image editing works again.
    Tried to reinstall bp but still get the error. Theme is Morner

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

  • staxracing
    Participant

    @staxracing

    Anyone?


    danbp
    Moderator

    @danbp

    Hi,

    seems you’re in wp-admin media library when you get that error. The message comes from WordPress. BuddyPress doesn’t use backend editing and doesn’t use edit tools on front-end like “mirror” or “rotate” when he handles pictures.

    With BP, a user can handle his avatar picture and the cover header for profile and groups, and all that from front-end.

    Where is the image in BuddyPress that you try to edit ?
    Please give details, so your issue could evtl. be reproduced.


    staxracing
    Participant

    @staxracing

    @danbp, you’re right insofar as that I want to edit an image in the wp-admin area.
    However, as I said, as soon as I disable buddypress, the problem disappears. Hence why I thought it might be an issue with buddypress.


    danbp
    Moderator

    @danbp

    May be, may be not…difficult to expect somthing when you don’t give details on how to reproduce your issue.

    This means also your technical environment (server, browser, cache, php version, etc…)

    The actual version doesn’t have noticeable trouble with image upload. Or this topic would have a lot of other users claiming about that with you. 😉


    staxracing
    Participant

    @staxracing

    @danbp, thank you for your answer. I am still new to BP and WP in general, so please bear with me.

    Reproducing the issue: Well, as I wrote before, if I want to crop / flip / mirror an image through WP’s image editor on the backend, I get the message above. Tested it with Firefox, Opera, Chrome and on different machines.

    PHP version is 5.6, no idea what you want to know about the server in specific (I reffer you to my 2nd sentence 😉 )

    Again, thanks for your patience


    staxracing
    Participant

    @staxracing

    @danbp and for everyone with the same problem, I just found the solution.
    When I first encountered the problem, I did a lot of googling and everybody kept mentioning that you don’t have to close <php> tags in the functions.php and to not leave empty lines there. If you don’t follow that, the problem I described can occur.
    Well, searched through my functions.php hunderd of times, but no luck. It still is like it’s supposed to be.

    I just checked my bp-custom.php file, and there it is.
    Changed

    <?php
    // hacks and mods will go here
    
     /* Avatar Size */
    
    define ( 'BP_AVATAR_THUMB_WIDTH', 50 );
    define ( 'BP_AVATAR_THUMB_HEIGHT', 50 );
    define ( 'BP_AVATAR_FULL_WIDTH', 200 );
    define ( 'BP_AVATAR_FULL_HEIGHT', 200 );
    ?>

    to

    <?php
    // hacks and mods will go here
    
     /* Avatar Size */
    
    define ( 'BP_AVATAR_THUMB_WIDTH', 50 );
    define ( 'BP_AVATAR_THUMB_HEIGHT', 50 );
    define ( 'BP_AVATAR_FULL_WIDTH', 200 );
    define ( 'BP_AVATAR_FULL_HEIGHT', 200 );

    and the problem disappeared. I just forgot that I did some editing in bp-custom.php


    danbp
    Moderator

    @danbp

    Thank you for these clarifications.

    It was not a BuddyPress issue and not a WordPress issue (as first expected), but a simple php error in a custom file. Little cause, big disease

    This is a lesson for all of us: whatever you code, take care with it. A missing dot, coma or other little syntax error can lead to endless searches, heavy expectations and massive headaches!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar