Home › Forums › Calendar Products › Event Aggregator › iCal Import: The server responded with a malformed response. Please see the JS
- This topic has 8 replies, 2 voices, and was last updated 10 years, 6 months ago by
Nico.
-
AuthorPosts
-
October 15, 2015 at 11:11 am #1015018
Denise McGeachy
ParticipantI am trying to run an iCal import from a site that I had previously, successfully – run imports from but now received the following error:
The server responded with a malformed response. Please see the JS console for more information.
I have reviewed another discussion thread that mentioned the same message but that was about importing a .ics rather than via URL (which is my method).
I have tried all methods of import type but the message persist. I’ve also tried other iCal events (this being a sports club – we have multiple teams thus multiple calendars) and each provides the same error.
As well, the number of events is relatively small.
Please advise.
Denise
October 15, 2015 at 11:28 am #1015022Denise McGeachy
ParticipantThis reply is private.
October 15, 2015 at 2:48 pm #1015103Nico
MemberHowdy Denise,
Welcome to our support forums and thanks for reaching out to us. I’ll help you out here 🙂
I’ve tried importing from the URLs you provided and I’m also getting an error due to the webcal:// protocol, if I change that for http:// I can import the feeds correctly (I’ve tried the first one). Can you try importing with http:// instead of webcal://?
Please let me know if you can import successfully,
Best,
NicoOctober 15, 2015 at 3:03 pm #1015105Denise McGeachy
ParticipantThank you Nico, that worked like a charm.
My question is, why would http make the difference now when it worked fine before?
I did manage to jam in 2 of the 3 calendars by tricking it (somehow) by telling the system they were monthly recurring. The import found the events but then when they imported, the dates were all from 1969!
It was a bit of a mess to say the least.
October 15, 2015 at 3:24 pm #1015108Denise McGeachy
ParticipantThis reply is private.
October 15, 2015 at 7:35 pm #1015149Denise McGeachy
ParticipantI had this calendar imported in the recurring-month way that messed up the dates but decided to delete it in favor of your method. It shows the events to be imported but then doesn’t import them.
Just not sure what to do know.
Please help.
October 16, 2015 at 4:49 pm #1015481Nico
MemberHey Denise,
Thanks for following up and sorry to hear the protocol switch didn’t solve the issue 🙁
It shows the events to be imported but then doesn’t import them.
This is how the iCal importer works actually. Deleted events won’t be re-imported, the system saves a ‘note’ for those. Add this snippet to your functions.php file and load the page a couple of times to delete the ‘notes’ for the deleted events. After this you should be able to re-import them.
/* Deletes 50 posts per page load*/
$posts = get_posts( array( 'numberposts' => 50, 'post_type' =>'deleted_event') );
if (!empty($posts)) {
foreach ($posts as $post) {
wp_delete_post( $post->ID, true);
}
} else {
echo 'Done deleting!';
}
Please try this out and let me know if re-importing works well with http:// protocol,
Have a great weekend,
NicoOctober 16, 2015 at 7:40 pm #1015504Denise McGeachy
ParticipantThis reply is private.
October 19, 2015 at 1:14 pm #1015955Nico
MemberDenise,
Thanks for following up on this once again, glad to hear you could find a work around for now … Hope next time the importer works as expected.
You can also add this snippet to your theme’s functions.php file, to prevent this from happening at all:
/*
* Prevents iCal importer from saving a copy of "deleted" events
* This means when you rerun an import, it will reimport any events you previously deleted
*/
function tribe_ical_dont_save_deleted () {
$ical_importer = Tribe__Events__Ical_Importer__Main::instance();
remove_action( 'before_delete_post', array( $ical_importer, 'deletedEventSave' ) );
}
add_action( 'wp_loaded', 'tribe_ical_dont_save_deleted' );
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Best,
Nico -
AuthorPosts
- The topic ‘iCal Import: The server responded with a malformed response. Please see the JS’ is closed to new replies.
