iCal Import: The server responded with a malformed response. Please see the JS

Home Forums Calendar Products Event Aggregator iCal Import: The server responded with a malformed response. Please see the JS

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1015018
    Denise McGeachy
    Participant

    I 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

    #1015022
    Denise McGeachy
    Participant

    This reply is private.

    #1015103
    Nico
    Member

    Howdy 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,
    Nico

    #1015105
    Denise McGeachy
    Participant

    Thank 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.

    #1015108
    Denise McGeachy
    Participant

    This reply is private.

    #1015149
    Denise McGeachy
    Participant

    I 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.

    #1015481
    Nico
    Member

    Hey 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,
    Nico

    #1015504
    Denise McGeachy
    Participant

    This reply is private.

    #1015955
    Nico
    Member

    Denise,

    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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘iCal Import: The server responded with a malformed response. Please see the JS’ is closed to new replies.