Skip to:
Content
Pages
Categories
Search
Top
Bottom

Unable to upload

  • Avatar of memorycrisis
    memorycrisis
    Member

    @memorycrisis

    Hello there, i’m having a problem with BP- Album+ Version 0.1.8.7 and was hoping you could help.
    I had no problems installing or activating the plug in but when I try to upload a photo I get the following error message….

    Please upload only JPG, GIF or PNG photos.

    The photos I am trying to upload are JPG. Any ideas please? Thanks!

Viewing 25 replies - 1 through 25 (of 48 total)
  • Avatar of TheArtofBalance
    TheArtofBalance
    Member

    @theartofbalance

    I’m having the same problem, did you upgrade Buddypress and WordPress today? If so, I think that has something to do with it. Hang tight I’m sure they’re already working on a fix.

    Avatar of memorycrisis
    memorycrisis
    Member

    @memorycrisis

    Yes I also upgraded them both today.

    Avatar of zkwc
    zkwc
    Participant

    @zkwc

    @foxly I am also having the exact same issue after upgrading. the BP Album + settings under the general Buddypress plug-in settings has also disappeared. So, can’t check to see if settings are correct.

    lots of my plug-ins have also disappeared under the buddypress plug-in settings on admin dashboard. for instance – “welcome pack” settings have gone away. Can’t check those either.

    hopefully the plug-in developers will notice and make super killer adjustments. :)

    Avatar of foxly
    foxly
    Participant

    @foxly

    @memorycrisis
    @TheArtofBalance
    @zkwc

    We’re aware of the problem (this one is WordPress’ fault and has affected thousands of other plugins) and we should have a fix out within 24 hours.

    ^F^

    It still works on WP 3.1 if you use BP 1.2.7. So just use that until they send out the patch

    Avatar of zkwc
    zkwc
    Participant

    @zkwc

    @foxly – you are a badass! thanks so much!!

    Avatar of foxly
    foxly
    Participant

    @foxly

    @memorycrisis
    @TheArtofBalance
    @zkwc

    Actually, it creates an intermittent problem.

    I have a test install over here that has WordPress 3.1, BuddyPress 1.2.8, and BP-Album 0.1.8.7 all working together perfectly.

    ^F^

    Avatar of zkwc
    zkwc
    Participant

    @zkwc

    @foxly – do you mean that it’s just my site that has the issue? or do you mean you figured out what wordpress did and now you’ve got it sorted? because for me it just flat out doesn’t work, even intermittently. yours isn’t the only plug-in it’s doing this to though. they’re all kind of tweaked, including my spam plug-ins. getting descended upon like bears looking for honey.

    Avatar of foxly
    foxly
    Participant

    @foxly

    @zkwc

    The admin menus were intermittent, the “Please upload only JPG, GIF or PNG photos.” problem is consistent.

    ^F^

    Avatar of memorycrisis
    memorycrisis
    Member

    @memorycrisis

    @foxly

    I’m having the problems on default settings of WordPress 3.1, and Buddypress 1.2.8 . Both of these I have never used before and have not modified their code in any way.

    Avatar of foxly
    foxly
    Participant

    @foxly

    We’ll probably have this fixed in a few hours. Follow our twitter feed for up-to-the-second updates.

    http://bit.ly/eT6Mbk

    ^F^

    Avatar of memorycrisis
    memorycrisis
    Member

    @memorycrisis

    @foxly Thanks for all your feedback foxly. Very much appreciated!

    Avatar of TheArtofBalance
    TheArtofBalance
    Member

    @theartofbalance

    @foxly Thanks for the support. I had a feeling that WordPress was the culprit. As soon as I applied the update, I knew it was going to break something. :) I’ll be following the feed, waiting for the fix.

    Avatar of andrew__k
    andrew__k
    Member

    @andrew_k-1

    @foxly Are you guys having trouble coming up with a fix, or is it just a workflow/deployment/release issue?

    I have the latest versions of WordPress and BuddyPress on a live site, and this fixes it for me.

    THIS IS A FRAGMENT OF THE FILE, meant to replace the broken implementation of the ‘bp_core_check_avatar_type’ function ONLY. Don’t replace the whole file with this!

    `
    // buddypress/bp-core/bp-core-avatars.php

    function bp_core_check_avatar_type_original_version($file) {
    if ( ( !empty( $file ) && !preg_match(‘/(jpe?g|gif|png)$/’, $file ) ) || !preg_match( ‘/(jpe?g|gif|png)$/’, $file ) )
    return false;

    return true;
    }

    /* Patched version by Andrew Koster */
    function bp_core_check_avatar_type($file)
    {
    // Uncomment the following line to examine the data structure.
    // print_r($file);

    if (isset($file))
    {
    // Before WordPress 3.1.

    return bp_core_check_avatar_type_original_version($file);
    }
    else
    {
    // After WordPress 3.1 (sometimes).

    if ( ( !empty( $file ) && !preg_match(‘/(jpe?g|gif|png)$/’, $file ) ) || !preg_match( ‘/(jpe?g|gif|png)$/’, $file ) )
    return false;

    return true;
    }
    }`

    The problem comes from the fact that we’re trying to validate a data structure that is extremely loosely defined. It has been changed it in some places, but not in others, so two different versions of the function are now needed.

    This is why using arbitrary data structures everywhere is a bad idea, IMO. A “FileInfo” class or something similar would avoid this kind of problem, or at least make it easier to debug.

    EDIT: The twitter link given in a previous post doesn’t work.

    Avatar of TheArtofBalance
    TheArtofBalance
    Member

    @theartofbalance

    Follow them here: http://twitter.com/bpm

    Avatar of andrew__k
    andrew__k
    Member

    @andrew_k-1

    That link works, but requires a Twitter account. Don’t have one, not interested right now.

    In any case, I just thought I’d submit my fix, and I don’t know of any better place to do it. It’s a very critical bug and the fix is simple, unless I’m missing something here.

    Avatar of TheArtofBalance
    TheArtofBalance
    Member

    @theartofbalance

    Patch works thanks for the quick fix @andrew__k.

    Yeah you have to sign up for twitter to actually “follow” them. However their feed is public, and I’m sure a link to the update is bound to show up there. ;)

    Avatar of foxly
    foxly
    Participant

    @foxly

    @andrew__k

    That fix corrects *one* of the problems WP3.1 introduces. And it *might* help users on single-site systems. It does not, however, correct the problems with file and directory paths when working on a multi-user system.

    This recent “upgrade” in WP 3.1 + BuddyPress 1.2.8 appears to force ALL BuddyPress plugins to add WPMU support to their plugins.

    ^F^

    Avatar of andrew__k
    andrew__k
    Member

    @andrew_k-1

    Sorry, I’m not very familiar with Twitter, I was confused by the fact that the content wasn’t about WordPress/BuddyPress. I thought it was tweets from random users, I was wrong.

    @foxly Thanks for the explanation, the problem stated in the OP is the only one I’ve seen (I have no multisite projects). I assumed it would be solved in isolation.

    Avatar of memorycrisis
    memorycrisis
    Member

    @memorycrisis

    Thanks for the continued feedback regarding the problem. Looking forward to an official fix.

    Avatar of TheArtofBalance
    TheArtofBalance
    Member

    @theartofbalance

    @andrew__k have you tried uploading avatars with your fix? specifically group avatars? I’m getting an error with your code implemented….

    Avatar of andrew__k
    andrew__k
    Member

    @andrew_k-1

    Yes, I just uploaded a new group avatar, with that code, here: http://bikeweekradio.com/forums

    Avatar of TheArtofBalance
    TheArtofBalance
    Member

    @theartofbalance

    @andrew__k When implementing your patch and attempting to upload a group avatar I’m getting this error:

    bp_core_check_avatar_type_original_version() in Directory/buddypress/bp-core/bp-core-avatars.php on line 528

    Avatar of foxly
    foxly
    Participant

    @foxly

    @TheArtofBalance

    Like guys… this is an incredibly complex problem. Don’t go pasting stuff into your installations or your’re going to damage your installations. WP has split the admin menus int two different levels, added thousands of lines of code, and none of its documented. The plugin now has to be tested in 8 different scenarios and it’s a HUGE amount of work.

    Totally NOT impressed with WP today. It worked fine the way it was before.

    ^F^

    Avatar of andrew__k
    andrew__k
    Member

    @andrew_k-1

    @TheArtofBalance It seems like part of your post is missing/truncated? All I see is a function name, file path, and line number, no actual error message.

    @foxly I don’t like it either, but I have a customer who wants the site to be functional yesterday, and there are no plugin hooks that I’m aware of for changing the file upload behavior. It’s either hack BuddyPress (and risk having to reinstall it, which is like a 3-click process) or revert my WordPress installation and wp-core localizations to an earlier version, which would be a lot more work.

Viewing 25 replies - 1 through 25 (of 48 total)

You must be logged in to reply to this topic.