Home › Toolset Professional Support › [Resolved] Finding hidden third party fields
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 12 replies, has 2 voices.
Last updated by Minesh 9 months, 1 week ago.
Assisted by: Minesh.
Hi there,
A few years ago you kindly help me create a video upload function, which has worked well.
Ref: https://toolset.com/forums/topic/updating-transcoded-video-filenpath-reference/
I'm just moving it to my clients parent site and don't seem to be able to find the third party hidden fields required for the function to work. (_rt_media_thumbnails _rt_media_transcoded_files _rt_media_video_thumbnail _rt_transcoding_job_id)
I've installed the correct plugins (and your custom code snippet) and did manage to find one field using the front end content 'select custom fields' but thats now disappeared.
Is there a way of manually adding the filenames? Or any way to force the field names to show up in the field list?
I look forward to your thoughts.
Kind regards
James
Hello. Thank you for contacting the Toolset support.
What if you navigate to:
=> Toolset => Settings => Front-end Content => Hidden custom fields section and check if you able to see those fields there.
More info:
- https://toolset.com/course-lesson/using-third-party-hidden-fields/
Hi Minesh,
Many thanks for your quick response. Yes, I’ve checked there already. That’s my issue. The fields aren’t showing up in there (well, one appeared, then disappeared again). Please see attached screenshots.
The plugins are same on both sites.
I’ve tried putting the site into troubleshooting mode and only enabling Toolset and the RT Transcoding plugin, but that didn’t help.
Kind regards
James
Can you please share admin access details and let me check whats going wrong with your setup.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I would like to know do you have content added related to those missing fields?
I can see the following fields are added:
=> _rt_transcoding_job_id and _video_thumbnail
Can you create a test post where those fields are available and then try to publish a test post and after that try to visit the Hidden Custom field and check if you able to see those fields.
Hi Dinesh,
Many thanks for taking a look. es, we require those fields to be able to create a single video view pulling in the id number from the transcoder.
Jamal (former Toolset Support) kindly wrote me a code snippet to do just that (see below) and details can be found in this previous support thread - https://toolset.com/forums/topic/updating-transcoded-video-filenpath-reference/
function converted_media_player_func( $atts ) {
global $post;
$id = media_info_func( array() );
return do_shortcode( '[rt_media attachment_id="' . $id . '"]' );
return $results;
}
add_shortcode( 'converted-media-player', 'converted_media_player_func' );
function media_info_func( $atts ) {
// Attributes
$atts = shortcode_atts(
array(
'field' => 'wpcf-video-upload',
),
$atts
);
global $post, $wpdb;
$field = $atts['field'];
$info = $atts['info'];
$media_url = get_post_meta( $post->ID, $field );
$attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $media_url ));
$attachment_id = $attachment[0];
return $attachment_id;
}
add_shortcode( 'types-media-id', 'media_info_func' );
function converted_media_url_func( $atts ) {
global $post;
$id = media_info_func( array() );
$path = do_shortcode( '[wpv-post-field name="_rt_media_transcoded_files" item="' . $id . '"]' );
$rul = WP_CONTENT_URL . '/uploads/' . $path;
return $rul;
$results = '<video class="single-video" controls="" autoplay="">';
$reulsts .= '<source src="' . $rul . '">';
$reulsts .= '</video>';
return $results;
}
add_shortcode( 'converted-media-url', 'converted_media_url_func' );
What I cant understand is how the fields are showing in the hidden fields search on the previous site and aren't on this site, when it's the same plugin, same version, etc.
I can give you a login to the child site if thats helpful.
Kind regards
James
Here I see the same situation what was before when Jamal was checking:
- https://toolset.com/forums/topic/updating-transcoded-video-filenpath-reference/#post-1970937
I do not find any post meta key in post meta table.
Can you again try to make a test post and tell me what media files are attached to that post like you have done with old reference ticket you shared:
- https://toolset.com/forums/topic/updating-transcoded-video-filenpath-reference/#post-1971379
Thx Minesh,
Yes, certainly.
I just upload a video and the resulting media file is hidden link
The video page for this is hidden link
Now, when I first set this up and managed to add the _rt_transcoding_job_id as a third party field, I did get the upload to work correctly:
This was the media result - hidden link
And this is the page it can successfully be viewed on - hidden link
Whilst the _rt_transcoding_job_id is shown in the Toolset settings, if you actually look in the list of available files, it's disappeared, which is why I think the video is no longer correctly being handled. (if you open the list and resave, you'll see that the _rt_transcoding_job_id then disappears form the settings page).
Would you like a login to the other site app.peterthompsongolf.com to compare?
Kind regards
James
To the following content template:
- hidden link
I've added the following code:
_rt_media_thumbnails: [wpv-post-field name="_rt_media_thumbnails" item="[get-media-id field='wpcf-video-upload']"] <br> _rt_media_transcoded_files: [wpv-post-field name="_rt_media_transcoded_files" item="[get-media-id field='wpcf-video-upload']"] <br> _rt_media_video_thumbnail: [wpv-post-field name="_rt_media_video_thumbnail" item="[get-media-id field='wpcf-video-upload']"]<br> _rt_transcoding_job_id: [wpv-post-field name="_rt_transcoding_job_id" item="[get-media-id field='wpcf-video-upload']"]<br> transcoded files: [wpv-post-field name="_rt_media_transcoded_files" item="[get-media-id field='wpcf-video-upload']"]
Note:
- I've changed the shortcode name from 'types-media-id' to 'get-media-id' in "Custom Code" section as well.
The thing is I can only see the value for the field "_rt_transcoding_job_id" I do not see the value for the fields:
- _rt_media_thumbnails
- _rt_media_transcoded_files
- _rt_media_video_thumbnail
all those fields seems to me missing. I do not know or not have any idea when and how the above hidden fields are created.
What if you try to copy the staging site to your live server on different folder to test this and check if you able to see the issue?
Thx Minesh,
The staging site is already on my live server in a different folder.
It's very strange as i just exported the views, content templates, etc. and imported them to the live site along with the required plugins and custom code. There isnt anythign else i can find that would affect things.
I'll keep checking through.
Thanks for your help with this.
Maybe you can check the Troubleshooting section on the doc and get in touch with the plugin support:
- hidden link
Thx Minesh,
Yep, will do. It looks like the POST could be being blocked by the server, which we’ re now looking into.
Kind regards
James
Ok great - Please feel free to share your findings here.