iCal export does not include attached images

Home Forums Calendar Products Events Calendar PRO iCal export does not include attached images

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #15845
    Rob
    Member

    Hey Stijn. That could definitely be the cause; I see two issues here: one, that you’re running 2.0.3 when the 2.0.4 release is out and should be activated; and two, that you’ve got the plugins out of sync (2.1 and 2.0.4). I would definitely try this with 2.0.4 active for both free and PRO, to see if the issue persists. Let me know your results and we can go from there.

    #15928
    Stijn
    Member

    Rob, I’ve updated to 2.0.4 which makes the setup:

    – The Events Calendar 2.0.4 (active)
    – The Events Calendar 2.1 (active)
    – Events Calendar PRO 2.0.4 (active)
    – Events Calendar PRO 2.1 (active)

    Unfortunately this setup still results in the same behaviour: the number of events in the export is limited to the “number of events in the loop” setting. Disabling the 2.0.4 plugins does not change anything. Disabling the 2.1 plugins makes the iCal export show all events but obviously the attachments wont show up anymore.

    The code provided by Nick does work however and I can see ATTACH-ed urls for each attached image, which is great! Any other ideas on how to resolve this issue? Which of the files of the plugin generates the iCal export, maybe I can have a look myself.

    Thanks!

    #15981
    Rob
    Member

    Ah, you should definitely not have both versions active at once. That’s a recipe for disaster. 🙂 Basically it looks like we’re at a point where both the code bases have something you want (and something you don’t), but it’s not easy to merge those…and working with beta code (as the 2.1 is) we’re unable to provide support as it’s not an official release. That being said let me see if Nick has any ideas to point you in the right direction here. Stay tuned.

    #16000
    Rob
    Member

    Hey again guys. Just talked this over with the team; unfortunately doing anything to provide specific guidance on this would be rather complex and isn’t something we’ve got the development bandwidth for. We do have this logged as an issue and are working to resolve it for the 2.1 release; but there isn’t much more I can offer up in an official capacity on a short-term basis. Sorry I couldn’t offer up more here…let me know if you have other questions on this and I’d be happy to address them.

    #16026
    Stijn
    Member

    Hey Rob. I figured it wouldn’t be a very good idea to have both versions active, but I thought that was what you meant. Nothing got ruined fortunately 🙂

    It’s a pretty odd issue this one, too bad we can’t find a solution for it. We were almost there! I’ll see if we can find a workaround to achieve the desired effect. If you know some other way to get an export of all events with attached image, I’d be very interested to hear it.

    Either way, thanks for the help!

    #16031
    Stijn
    Member

    We’ve currently solved the problem by hacking the filter code into the 2.0.4 code. Obviously this is not desirable (after an update it won’t work anymore), but we could not find a better solution.

    We made the following addition to events-calendar-pro.php (I hope it formats well, I’m not sure what tags are supported here)

    public function iCalFeed( $post = null, $eventCatSlug = null, $eventDate = null ) {

    foreach( $eventPosts as $eventPost ) {

    $events .= “LOCATION:” . html_entity_decode($tribeEvents->fullAddressString( $eventPost->ID ), ENT_QUOTES) . “\n”;
    $events .= “URL:” . get_permalink( $eventPost->ID ) . “\n”;

    /////////////// HACK ///////////////////////////////////
    $attachments_args = array(
    ‘post_type’ => ‘attachment’,
    ‘numberposts’ => -1,
    ‘post_status’ => null,
    ‘post_parent’ => $eventPost->ID
    );

    $size = ‘full’;

    $attachments = get_posts($attachments_args);
    if ($attachments) {
    foreach ($attachments as $attachment) {
    $image_attributes = wp_get_attachment_image_src($attachment->ID, $size);
    $events .= “ATTACH:”.$image_attributes[0].”\n”;
    }
    }
    /////////////// END OF HACK //////////////////////////////

    $events .= “END:VEVENT\n”;
    }


    }

    #16155
    Rob
    Member

    Glad to see you got a stopgap in place until 2.1; you may want to keep the code handy in case any releases (ie 2.0.5) come between now and then.

    #975859
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 16 through 23 (of 23 total)
  • The topic ‘iCal export does not include attached images’ is closed to new replies.