Home › Forums › Calendar Products › Event Aggregator › Facebook import "is not a valid image" Error
- This topic has 8 replies, 3 voices, and was last updated 11 years, 5 months ago by
Leah.
-
AuthorPosts
-
September 11, 2014 at 3:41 am #737423
Chris
ParticipantWhen 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.
September 11, 2014 at 4:05 am #737489Chris
ParticipantJust 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
September 11, 2014 at 6:13 am #737701Chris
ParticipantGuess 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 );
September 11, 2014 at 6:32 am #737715Chris
ParticipantI’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.
September 11, 2014 at 8:39 am #737980Brian
MemberHi 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:
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
September 12, 2014 at 3:47 am #739664Chris
ParticipantThat did it, thanks
September 12, 2014 at 4:57 am #739745Brian
MemberGreat, 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!
September 26, 2014 at 12:22 pm #768999Leah
MemberHi 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 TribeDecember 5, 2014 at 2:27 pm #909492Leah
MemberHello,
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 -
AuthorPosts
- The topic ‘Facebook import "is not a valid image" Error’ is closed to new replies.
