Uploader template tag not working, invalid Activity ID and other issues

Hi,

I’m trying to integrate rtMedia with The Events Calendar plugin - http://tri.be/ . If I try to call the uploader with the template tag rtmedia_uploader() nothing is returned.

The only way I can get the uploader to display on single events is with: echo do_shortcode( ‘[rtmedia_uploader]’). This displays the uploader on single events, but if try to upload an image, I get an error logged in console: “Invalid Activity ID” (rtMedia.backbone.js?ver=3.5.2:315)

I’ve tried adding context=“tribe_event” to the shortcode, but doesn’t make any difference. Ideally I shouldn’t be using the shortcode here at all, but rather the template tag.

I’m using a WooThemes Canvas child theme, with latest version of Modern Tribe’s Event Calendar and Event Calendar Pro.

rtMedia Support page details:

PHP 5.5.0
MYSQL 5.5.30
WordPress 3.5.2
BuddyPress 1.7.3
rtMedia 3.0.0
OS Linux
Imagick ImageMagick 6.7.7-10 2013-02-25 Q16 www.imagemagick.org
GD bundled (2.1.0 compatible)
[php.ini] post_max_size 100M
[php.ini] upload_max_filesize 512M
[php.ini] memory_limit 512M

Thanks

Try using the following function RTMediaUploadShortcode::pre_render() instead of rtmedia_uploader(). rtmedia_uploader() checks for a buddypress page and shows the uploader if true. We will be modifying this soon as this functionality is still in its starting stages an not explored much.

You can pass an array of arguments to RTMediaUploadShortcode::pre_render() such as context,context_id,privacy and album_id

NOTE: Also the “context” should be the post type you are uploading it to; and “context_id” should be the id of the post you are uploading it to.

I am having the exact same problem as @feedmymedia.

Template tags won’t work, but shortcodes do.

If I use the function you have provided above like so…

<?php
echo RTMediaUploadShortcode::pre_render($context_id = get_the_ID());
echo RTMediaGalleryShortcode::render($context_id = get_the_ID() ); ?>

Then they show up on frontend however, I am not sure how to pass the array of arguments (as you can probably see) so therefore its not working.

Using the shortcodes instead, the image uploads but nothing happens and I get the same error logged in console as @feedmymedia which states: “Invalid Activity ID” (rtMedia.backbone.js?ver=3.5.2:315)

I have tried the short codes in the following ways…

[rtmedia_uploader]  
[rtmedia_gallery]

and

[rtmedia_uploader context="post" context_id="461"]  
[rtmedia_gallery context="post" context_id="461"]

(where 461 is the post id of the post in question)

I get the same console error with both.

Having said all that, I tried the shortcode on a ‘page’ instead of a ‘post’, and it all works successfully.
Also should mention that the posts are custom post types.

Thanks and appreciate any help

Try passing the required arguments as an array. For example

<?php   
echo RTMediaUploadShortcode::pre_render(array('context' => 'post', 'context_id' => get_the_ID()));   
echo RTMediaGalleryShortcode::render(array('context_id' => get_the_ID()) ); ?>

You can pass all the attributes of the respective shortcode in a similar manner.