Facebook import "is not a valid image" Error

Home Forums Calendar Products Event Aggregator Facebook import "is not a valid image" Error

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #737423
    Chris
    Participant

    When importing facebook events I am getting the following error: Republikken: Laser course. Event Image Error: “10313830_10154503365765427_4060227884494957389_n.jpg?oh=8a692309fac108e7967a2e84107a9921&oe=54A30511&__gda__=1419847338_50431a9d9b510ad951086dc2d5ef0a55” is not a valid image.

    But that IS a valid image, so not sure what the error is. It’s not all images that I get this error on, but about 20% of them.

    #737489
    Chris
    Participant

    Just tested on a clean install of wp 3.9.2 with only the 3 plugins (The Events Calendar PRO, The Events Calendar: Facebook Events, The Events Calendar PRO) and still getting the same problem. Here is an event I get the problem on: 713170382063875

    #737701
    Chris
    Participant

    Guess the problem is with the image type check that fails because the file url does not end with .jpg. That is when the upload gets to this line of code $wp_filetype = wp_check_filetype($event_picture[‘url’], null );

    #737715
    Chris
    Participant

    I’ve seem to have solved it temporarily (and with a hack) by making my own filetype check:
    private function check_filetype( $filename, $mimes = null ) {

    if ( empty($mimes) )
    $mimes = get_allowed_mime_types();

    $type = false;
    $ext = false;

    foreach ( $mimes as $ext_preg => $mime_match ) {
    $ext_preg = ‘!\.(‘ . $ext_preg . ‘)!i’;

    if ( preg_match( $ext_preg, $filename, $ext_matches ) ) {
    $type = $mime_match;
    $ext = $ext_matches[1];
    break;
    }
    }
    return compact( ‘ext’, ‘type’ );
    }

    And then sub:
    $wp_filetype = wp_check_filetype($event_picture[‘url’], null );
    with:
    $wp_filetype = $this -> check_filetype($event_picture[‘url’], null );

    But should be a more permanent fix for the plugin as I can now not update the plugin.

    #737980
    Brian
    Member

    Hi Chris,

    Sorry for the issues with the Facebook Image Importing. Yes it is an issue with the link not ending in jpg.

    I do have a fix for it you can add to your theme’s function.php file.

    Check out this topic out and add the coding in the reply from Barry on August 19th 2014:

    Facebook events doesn’t import event photo

    We are working to add this into a future release of the Facebook Add On, but this should fix it for now.

    Let me know if that works for you.

    Thanks

    #739664
    Chris
    Participant

    That did it, thanks

    #739745
    Brian
    Member

    Great, glad it helps, I am going to go ahead and close this ticket, but if you need any other on something else please post a new ticket.

    Thanks!

    #768999
    Leah
    Member

    Hi there,

    Thanks for bringing this issue to our attention. We weren’t able to get to it for our upcoming 3.8 release, but it is still very much on the radar. We hope to have it fixed in an upcoming release, and we will do our best to keep you posted on our progress. Thanks for your patience and support!

    Best,
    Leah
    and the team at Modern Tribe

    #909492
    Leah
    Member

    Hello,

    I just wanted to update you here and let you know that we have a fix for the issue you reported in our upcoming release. Thank you for bringing it to our attention! Keep an eye out for an update coming soon. If you are still experiencing issues after the update, please start a new thread and we’d be happy to look into it. Thank you for your patience and support while we got this corrected.

    Best,
    Leah

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Facebook import "is not a valid image" Error’ is closed to new replies.