This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Tell us what you are trying to do? Update the filepath of a video thats been uploaded with a CRED form to a Video Post and then automatically converted to mp4 by the Transcoder plugin - hidden link
As an example, the filepath of the uploaded file is: hidden link
This is what's stored in the video upload field of the video post, and called using:
This just produced a blank white space, I'm presuming because he shortcode didn't compile. IN addition, looking at the attachment number in the media centre, the actual mp4 is 361 not 360 which is odd.
I'll keep trying and let you know if I get any results, but any other thoughts or ideas would be most welcomed.
Just another thought on this. What I'm really trying to achieve is updating the file path in the post itself to show the new url (i.e. the mp4 rather than the mov). if I look in the media library, I can only see the new version. So, if I was to edit the post, I'd see the new mp4 url in the 'video upload' field box'.
Thank you for your feedback James. I wonder if it would be possible to get access to your website and check it further? If yes, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
There should be a way to replace the field value with the converted video URL instead of the original, but I'll need to know how the conversion is done. I suspect that it is performed asynchronously, and not synchronously when the post is first created. If it is performed asynchronously, we'll need to know if the plugin offers some hooks so we can run our code and replace the URL.
Or maybe I can find a way to get and display the converted URL while keeping the original URL in the field. Let me see the website, and let me know what content template are you working on and I'll see what I can find.
Yep, sure. Looking at our toolset-support-test, you'll see the top 2 mov files (snowy tipi and snowy back garden). These have both been imported and converted and can be seen in the media library as:
hidden link
hidden link
The original mov files aren't in the library but I can see them in the /uploads folder.
Hello James, I was able to get the converted video to play. Check this screenshot hidden link
Toolset does not store the ID of the video on the custom field, it stores the URL. So I created a shortcode to get the ID from the URL. The shortcode is added here hidden link
Many apologies for reopening the ticket. I just checked the video page and I cant get the video to display. It appears to be the source line:
<source src="hidden link name="_rt_media_transcoded_files" item="[types-image-id]"]">
I can see a red = and " (see screenshots). I've tried playing around with it, but the only way I can get the code to complete is to remove the dynamic section.
I'll keep trying but if you spot the issue in the meantime, I'd love to know.
I've looked through everything now, but cant find a way to get this to display. I can see the video UI but no video. Is there anything else I should be adding, etc?
Hello James, that was my mistake, I have renamed the shortcode to 'types-media-id' instead of 'types-image-id'.
And the shortcode needs to take a field argument:
[types-media-id field='wpcf-video-upload']
This will return the ID of the video, then we need to pass it to the Toolset shortcode in the item attribute:
After testing last night I’ve noticed that, whilst the video now works, I’m getting the same video on each page. Would this be down to the I’d being passed? Sorry!
Kind regards
James
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.