Skip Navigation

[Resolved] retrieve child posts via views shortcode

This support ticket is created 2 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 22 replies, has 2 voices.

Last updated by svenA-3 2 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2310719

Tell us what you are trying to do?
In a patient file system a view for patients is to be offered where they can only see child posts ("Termine") that belong to them. The ID of the parent file ("Karteikopf") is preserved as user meta with each patient (KEY = kkID). A filter attribute ("users") is defined in the views' settings, so I use [wpv-view name="TerminFileIndividual" users="XXX"]
The XXX for users is filled in dynamically by the use of Dynamic Elementor's token feature (which works fine in other use cases with toolset): [wpv-view name="TerminFileIndividual" users="[users:meta:kkID]"]

What happens?
While the toke itself in a test setup delivers the proper kkID value, the shortcode results in "no items found" while there is definitely a child Termin post to the parent Karteikopf that I used for testing.

Regards,

Sven

#2311035

Hello,

Shortcode within shortcode is a feature of Toolset plugins, for shortcode of other plugins, please follow our document to add their shortcode name into Toolset setting pages:
https://toolset.com/documentation/legacy-features/views-plugin/shortcodes-within-shortcodes/#third-party-shortcode-arguments

#2311083

Hi Luo,

thanks for that relevant hint which, however, I was aware of.

I wrote a custom shortcode meanwhile (also added in toolset settings) that had the results of all steps of its code written to my db for checking purpose. It fetches the correct user id, it reads the kkID meta data correctly but either transfer to the view or handling within the view seems to fail as still no Termin post is found.

shortcode:

add_shortcode( 'TermFileInd', function () 
	{
		$this_id =  get_current_user_id(); 
		update_user_meta( 1, 'step1', $this_id );
		$kkid = get_user_meta( $this_id, 'kkID', true );
		update_user_meta( 1, 'step2', $kkid );
		if( !empty( $kkid ) ){
			$mySC = do_shortcode( '[wpv-view name="TerminFilesIndividual" users="' . $kkid . '"]' );
			update_user_meta( 1, 'step3', $mySC );
			return $mySC;
		}
		
		return 'keine Einträge gefunden';
	} 
);
#2311101

You can get current logged-in user's field value by shortcode [wpv-user field="kkID"], and pass it to View's shortcode as attribute, like this:
[wpv-view name='TerminFilesIndividual' users='[wpv-user field="kkID"]']

More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-user

For your custom PHP codes, you need to debug them line by line, it is out the range of Tooset support.

#2311111

Hi Luo,

thanks for the input. I don't need debugging, the code works. Just added it in case of questions regarding it.

Nesting the shortcodes as suggested gives me that well-known Elementor tolchok and outputs a wrong result (a child post that does not belong to the parent) accompanied by " '] " at the end. Hence the custom short code.

The view itself is set to search "Termin" posts in a 1:n relationship to their "Karteikopf" parent, so I set the filter to the attribute "users" that is supposed to fetch that kkID meta as the ID in a karteikopf - termin relationship. No further filters. I hope that is a correct setup?

#2311181

Update: Tried that workaround using a Template. Same result:

display view in a WordPress page --> expected result
display view on Elementor page --> "no items found"

no matter how. So I've set my wp-config.php to debug mode incl. log file. That's what has been logged:

PHP Warning:  strtotime() expects parameter 1 to be string, array given in /home/workahea/public_html/wp-content/plugins/types/application/models/field/type/date/date.php on line 75
[08-Mar-2022 10:37:09 UTC] PHP Stack trace:
[08-Mar-2022 10:37:09 UTC] PHP   1. {main}() /home/workahea/public_html/wp-admin/admin-ajax.php:0
[08-Mar-2022 10:37:09 UTC] PHP   2. do_action($hook_name = 'wp_ajax_wpv_get_view_query_results') /home/workahea/public_html/wp-admin/admin-ajax.php:187
[08-Mar-2022 10:37:09 UTC] PHP   3. WP_Hook->do_action($args = [0 => '']) /home/workahea/public_html/wp-includes/plugin.php:474
[08-Mar-2022 10:37:09 UTC] PHP   4. WP_Hook->apply_filters($value = '', $args = [0 => '']) /home/workahea/public_html/wp-includes/class-wp-hook.php:331
[08-Mar-2022 10:37:09 UTC] PHP   5. WPV_View_Post_Query->wpv_get_view_query_results('') /home/workahea/public_html/wp-includes/class-wp-hook.php:307
[08-Mar-2022 10:37:09 UTC] PHP   6. render_view($args = ['id' => '12722'], $get_override = *uninitialized*) /home/workahea/public_html/wp-content/plugins/toolset-blocks/embedded/inc/wpv-filter-query.php:487
[08-Mar-2022 10:37:09 UTC] PHP   7. OTGS\Toolset\Views\Controller\API\Methods\RenderViewHandler->process_call($args = ['id' => '12722'], $get_override = []) /home/workahea/public_html/wp-content/plugins/toolset-blocks/embedded/inc/wpv-api.php:173
[08-Mar-2022 10:37:09 UTC] PHP   8. WP_Views->render_view_ex($id = '12722', $hash = 'cd5738689bf74d8f41060a906e2fa2a4') /home/workahea/public_html/wp-content/plugins/toolset-blocks/application/controllers/api/methods/render_view.php:79
[08-Mar-2022 10:37:09 UTC] PHP   9. WP_Views->render_view($view_id = '12722', $hash = 'cd5738689bf74d8f41060a906e2fa2a4') /home/workahea/public_html/wp-content/plugins/toolset-blocks/embedded/inc/wpv.class.php:2124
[08-Mar-2022 10:37:09 UTC] PHP  10. wpv_do_shortcode($content = '\n\t\t\t<tr>\n\t\t\t\t[wpv-post-body view_template="loop-item-in-probanden2view"]\n\t\t\t</tr>\n\t\t', $doing_excerpt = *uninitialized*) /home/workahea/public_html/wp-content/plugins/toolset-blocks/embedded/inc/wpv.class.php:2592
[08-Mar-2022 10:37:09 UTC] PHP  11. do_shortcode($content = '\n\t\t\t<tr>\n\t\t\t\t[wpv-post-body view_template="loop-item-in-probanden2view"]\n\t\t\t</tr>\n\t\t', $ignore_html = *uninitialized*) /home/workahea/public_html/wp-content/plugins/toolset-blocks/embedded/inc/wpv-shortcodes.php:2594
[08-Mar-2022 10:37:09 UTC] PHP  12. preg_replace_callback($regex = '/\\[(\\[?)(wpv\\-post\\-body)(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*+(?:\\[(?!\\/\\2\\])[^\\[]*+)*+)\\[\\/\\2\\])?)(\\]?)/', $callback = 'do_shortcode_tag', $subject = '\n\t\t\t<tr>\n\t\t\t\t[wpv-post-body view_template="loop-item-in-probanden2view"]\n\t\t\t</tr>\n\t\t') /home/workahea/public_html/wp-includes/shortcodes.php:228
[08-Mar-2022 10:37:09 UTC] PHP  13. do_shortcode_tag($m = [0 => '[wpv-post-body view_template="loop-item-in-probanden2view"]', 1 => '', 2 => 'wpv-post-body', 3 => ' view_template="loop-item-in-probanden2view"', 4 => '', 5 => '', 6 => '']) /home/workahea/public_html/wp-includes/shortcodes.php:228
[08-Mar-2022 10:37:09 UTC] PHP  14. WPV_Shortcode_Base_View->render($atts = ['view_template' => 'loop-item-in-probanden2view'], $content = '', 'wpv-post-body') /home/workahea/public_html/wp-includes/shortcodes.php:356
[08-Mar-2022 10:37:09 UTC] PHP  15. WPV_Shortcode_Post_Body->get_value($atts = ['view_template' => 'loop-item-in-probanden2view'], $content = '') /home/workahea/public_html/wp-content/plugins/toolset-blocks/application/models/shortcode/base_view.php:32
[08-Mar-2022 10:37:09 UTC] PHP  16. WPV_Shortcode_Post_Body->get_content_template_value() /home/workahea/public_html/wp-content/plugins/toolset-blocks/application/models/shortcode/post/body.php:147
[08-Mar-2022 10:37:09 UTC] PHP  17. apply_filters($hook_name = 'the_content', $value = '<td>[types field="kartei_name"][/types]</td>\n<td>[types field="kartei_vorname"][/types]</td>\n<td>[types field="kartei_geburtstag"][/types]</td>\n<td>\n \n\t<table class="killbuttons">\n\t\t<tr>\n          \t<td width="50%" class="killtable"><a href="[wpv-post-url item="@karteikopf-stammdatum.parent"]">zur Akte</a></td>\n\t\t\t<td class="killtable"><button type="button" onclick="toggle_visibility(\'delbut[wpv-post-id]\');">Löschen</button></td>\n\t\t</tr>\n\t\t<tr id="delbut[wpv-post-id]" style="display: none;">\n\t\t\t<td width="5'...) /home/workahea/public_html/wp-content/plugins/toolset-blocks/application/models/shortcode/post/body.php:245
[08-Mar-2022 10:37:09 UTC] PHP  18. WP_Hook->apply_filters($value = '<td>[types field="kartei_name"][/types]</td>\n<td>[types field="kartei_vorname"][/types]</td>\n<td>[types field="kartei_geburtstag"][/types]</td>\n<td>\n \n\t<table class="killbuttons">\n\t\t<tr>\n          \t<td width="50%" class="killtable"><a href="[wpv-post-url item="@karteikopf-stammdatum.parent"]">zur Akte</a></td>\n\t\t\t<td class="killtable"><button type="button" onclick="toggle_visibility(\'delbut[wpv-post-id]\');">Löschen</button></td>\n\t\t</tr>\n\t\t<tr id="delbut[wpv-post-id]" style="display: none;">\n\t\t\t<td width="5'..., $args = [0 => '<td>[types field="kartei_name"][/types]</td>\n<td>[types field="kartei_vorname"][/types]</td>\n<td>[types field="kartei_geburtstag"][/types]</td>\n<td>\n \n\t<table class="killbuttons">\n\t\t<tr>\n          \t<td width="50%" class="killtable"><a href="[wpv-post-url item="@karteikopf-stammdatum.parent"]">zur Akte</a></td>\n\t\t\t<td class="killtable"><button type="button" onclick="toggle_visibility(\'delbut[wpv-post-id]\');">Löschen</button></td>\n\t\t</tr>\n\t\t<tr id="delbut[wpv-post-id]" style="display: none;">\n\t\t\t<td width="5'...]) /home/workahea/public_html/wp-includes/plugin.php:189
[08-Mar-2022 10:37:09 UTC] PHP  19. do_shortcode($content = '<td>[types field="kartei_name"][/types]</td>\n<td>[types field="kartei_vorname"][/types]</td>\n<td>[types field="kartei_geburtstag"][/types]</td>\n<td>\n \n\t<table class="killbuttons">\n\t\t<tr>\n          \t<td width="50%" class="killtable"><a href="<em><u>hidden link</u></em>">zur Akte</a></td>\n\t\t\t<td class="killtable"><button type="button" onclick="toggle_visibility(\'delbut5307\');">Löschen</button></td>\n\t\t</tr>\n\t\t<tr id="delbut5307" style="display: none;">\n\t\t\t<td width="50%" class="'..., $ignore_html = *uninitialized*) /home/workahea/public_html/wp-includes/class-wp-hook.php:307
[08-Mar-2022 10:37:09 UTC] PHP  20. preg_replace_callback($regex = '/\\[(\\[?)(cred\\-delete\\-post|types)(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*+(?:\\[(?!\\/\\2\\])[^\\[]*+)*+)\\[\\/\\2\\])?)(\\]?)/', $callback = 'do_shortcode_tag', $subject = '<td>[types field="kartei_name"][/types]</td>\n<td>[types field="kartei_vorname"][/types]</td>\n<td>[types field="kartei_geburtstag"][/types]</td>\n<td>\n \n\t<table class="killbuttons">\n\t\t<tr>\n          \t<td width="50%" class="killtable"><a href="<em><u>hidden link</u></em>">zur Akte</a></td>\n\t\t\t<td class="killtable"><button type="button" onclick="toggle_visibility(\'delbut5307\');">Löschen</button></td>\n\t\t</tr>\n\t\t<tr id="delbut5307" style="display: none;">\n\t\t\t<td width="50%" class="'...) /home/workahea/public_html/wp-includes/shortcodes.php:228
[08-Mar-2022 10:37:09 UTC] PHP  21. do_shortcode_tag($m = [0 => '[types field="kartei_geburtstag"][/types]', 1 => '', 2 => 'types', 3 => ' field="kartei_geburtstag"', 4 => '', 5 => '', 6 => '']) /home/workahea/public_html/wp-includes/shortcodes.php:228
[08-Mar-2022 10:37:09 UTC] PHP  22. Types_Shortcode_Types_View->render($atts = ['field' => 'kartei_geburtstag'], $content = '', 'types') /home/workahea/public_html/wp-includes/shortcodes.php:356
[08-Mar-2022 10:37:09 UTC] PHP  23. Types_Shortcode_Types->get_value($atts = ['field' => 'kartei_geburtstag'], $content = '') /home/workahea/public_html/wp-content/plugins/types/application/models/shortcode/types/view.php:30
[08-Mar-2022 10:37:09 UTC] PHP  24. types_render_field($field_id = 'kartei_geburtstag', $user_params = ['field' => 'kartei_geburtstag', 'termmeta' => NULL, 'usermeta' => NULL, 'item' => 5307, 'id' => NULL, 'post_id' => NULL, 'output' => NULL, 'raw' => NULL, 'separator' => NULL, 'style' => NULL, 'format' => NULL, 'title' => NULL, 'loop' => NULL, 'autoplay' => NULL, 'preload' => NULL, 'option' => NULL, 'state' => NULL, 'width' => NULL, 'height' => NULL, 'alt' => NULL, 'size' => NULL, 'resize' => NULL, 'align' => NULL, 'button_style' => NULL, 'button' => NULL, 'button-color' => NULL, 'button-icon' => NULL, 'button-label' => NULL, 'chat-color' => NULL, 'receiver' => NULL, 'no_protocol' => NULL, 'poster' => NULL, 'url' => NULL, 'class' => NULL, 'onload' => NULL, 'proportional' => NULL, 'padding_color' => NULL, 'show_name' => NULL, 'target' => NULL, 'user_id' => NULL, 'user_name' => NULL, 'user_current' => NULL, 'current_user' => NULL, 'term_id' => NULL, 'index' => NULL, 'suppress_filters' => NULL], $content = '') /home/workahea/public_html/wp-content/plugins/types/application/models/shortcode/types/types.php:116
[08-Mar-2022 10:37:09 UTC] PHP  25. types_render_postmeta($field_id = 'kartei_geburtstag', $user_params = ['field' => 'kartei_geburtstag', 'termmeta' => NULL, 'usermeta' => NULL, 'item' => 5307, 'id' => NULL, 'post_id' => NULL, 'output' => NULL, 'raw' => NULL, 'separator' => NULL, 'style' => NULL, 'format' => NULL, 'title' => NULL, 'loop' => NULL, 'autoplay' => NULL, 'preload' => NULL, 'option' => NULL, 'state' => NULL, 'width' => NULL, 'height' => NULL, 'alt' => NULL, 'size' => NULL, 'resize' => NULL, 'align' => NULL, 'button_style' => NULL, 'button' => NULL, 'button-color' => NULL, 'button-icon' => NULL, 'button-label' => NULL, 'chat-color' => NULL, 'receiver' => NULL, 'no_protocol' => NULL, 'poster' => NULL, 'url' => NULL, 'class' => NULL, 'onload' => NULL, 'proportional' => NULL, 'padding_color' => NULL, 'show_name' => NULL, 'target' => NULL, 'user_id' => NULL, 'user_name' => NULL, 'user_current' => NULL, 'current_user' => NULL, 'term_id' => NULL, 'index' => NULL, 'suppress_filters' => NULL], $content = '') /home/workahea/public_html/wp-content/plugins/types/application/functions_public.php:34
[08-Mar-2022 10:37:09 UTC] PHP  26. Types_Field_Service->render_frontend($gateway = class Types_Field_Gateway_Wordpress_Post {  }, $belongs_to_post_user_term = class WP_Post { public $ID = 5307; public $post_author = '1'; public $post_date = '2021-05-30 07:28:12'; public $post_date_gmt = '2021-05-30 05:28:12'; public $post_content = ''; public $post_title = 'Anna Selbstbucher'; public $post_excerpt = ''; public $post_status = 'private'; public $comment_status = 'closed'; public $ping_status = 'closed'; public $post_password = ''; public $post_name = 'anna-selbstbucher'; public $to_ping = ''; public $pinged = ''; public $post_modified = '2021-05-30 07:28:12'; public $post_modified_gmt = '2021-05-30 05:28:12'; public $post_content_filtered = ''; public $post_parent = 0; public $guid = '<em><u>hidden link</u></em>'; public $menu_order = 0; public $post_type = 'stammdaten'; public $post_mime_type = ''; public $comment_count = '0'; public $filter = 'raw' }, $field_id = 'kartei_geburtstag', $user_params = ['field' => 'kartei_geburtstag', 'termmeta' => NULL, 'usermeta' => NULL, 'item' => 5307, 'id' => NULL, 'post_id' => NULL, 'output' => NULL, 'raw' => NULL, 'separator' => NULL, 'style' => NULL, 'format' => NULL, 'title' => NULL, 'loop' => NULL, 'autoplay' => NULL, 'preload' => NULL, 'option' => NULL, 'state' => NULL, 'width' => NULL, 'height' => NULL, 'alt' => NULL, 'size' => NULL, 'resize' => NULL, 'align' => NULL, 'button_style' => NULL, 'button' => NULL, 'button-color' => NULL, 'button-icon' => NULL, 'button-label' => NULL, 'chat-color' => NULL, 'receiver' => NULL, 'no_protocol' => NULL, 'poster' => NULL, 'url' => NULL, 'class' => NULL, 'onload' => NULL, 'proportional' => NULL, 'padding_color' => NULL, 'show_name' => NULL, 'target' => NULL, 'user_id' => NULL, 'user_name' => NULL, 'user_current' => NULL, 'current_user' => NULL, 'term_id' => NULL, 'index' => NULL, 'suppress_filters' => NULL], $content = '') /home/workahea/public_html/wp-content/plugins/types/application/functions_public.php:59
[08-Mar-2022 10:37:09 UTC] PHP  27. Types_Field_Service->get_field($gateway = class Types_Field_Gateway_Wordpress_Post {  }, $id_or_slug = 'kartei_geburtstag', $id_post_user_term = 5307) /home/workahea/public_html/wp-content/plugins/types/application/models/field/service.php:112
[08-Mar-2022 10:37:09 UTC] PHP  28. Types_Field_Type_Date_Mapper_Legacy->find_by_id($id = 'kartei_geburtstag', $id_post = 5307) /home/workahea/public_html/wp-content/plugins/types/application/models/field/service.php:54
[08-Mar-2022 10:37:09 UTC] PHP  29. Types_Field_Type_Date_Factory->get_field($data = ['id' => 'kartei_geburtstag', 'slug' => 'kartei_geburtstag', 'type' => 'date', 'name' => 'Geburtstag', 'description' => '', 'data' => ['slug-pre-save' => 'kartei_geburtstag', 'placeholder' => '', 'date_and_time' => 'date', 'repetitive' => '0', 'validate' => [...], 'custom_use' => '', 'conditional_display' => [...], 'submit-key' => 'kartei_geburtstag', 'disabled_by_type' => 0], 'meta_key' => 'wpcf-kartei_geburtstag', 'meta_type' => 'postmeta', 'title' => 'Geburtstag', 'placeholder' => '', 'repeatable' => FALSE, 'value' => [0 => [...]]]) /home/workahea/public_html/wp-content/plugins/types/application/models/field/type/date/mapper/legacy.php:39
[08-Mar-2022 10:37:09 UTC] PHP  30. Types_Field_Type_Date->__construct($data = ['id' => 'kartei_geburtstag', 'slug' => 'kartei_geburtstag', 'type' => 'date', 'name' => 'Geburtstag', 'description' => '', 'data' => ['slug-pre-save' => 'kartei_geburtstag', 'placeholder' => '', 'date_and_time' => 'date', 'repetitive' => '0', 'validate' => [...], 'custom_use' => '', 'conditional_display' => [...], 'submit-key' => 'kartei_geburtstag', 'disabled_by_type' => 0], 'meta_key' => 'wpcf-kartei_geburtstag', 'meta_type' => 'postmeta', 'title' => 'Geburtstag', 'placeholder' => '', 'repeatable' => class Types_Field_Setting_Repeatable { private $repeatable = FALSE }, 'value' => [0 => [...]]]) /home/workahea/public_html/wp-content/plugins/types/application/models/field/type/date/factory.php:20
[08-Mar-2022 10:37:09 UTC] PHP  31. Types_Field_Abstract->__construct($data = ['slug' => 'kartei_geburtstag', 'title' => 'Geburtstag', 'description' => '', 'value' => [0 => [...]], 'placeholder' => '', 'repeatable' => class Types_Field_Setting_Repeatable { private $repeatable = FALSE }, 'id' => 'kartei_geburtstag', 'type' => 'date', 'name' => 'Geburtstag', 'data' => ['slug-pre-save' => 'kartei_geburtstag', 'placeholder' => '', 'date_and_time' => 'date', 'repetitive' => '0', 'validate' => [...], 'custom_use' => '', 'conditional_display' => [...], 'submit-key' => 'kartei_geburtstag', 'disabled_by_type' => 0], 'meta_key' => 'wpcf-kartei_geburtstag', 'meta_type' => 'postmeta']) /home/workahea/public_html/wp-content/plugins/types/application/models/field/type/date/date.php:37
[08-Mar-2022 10:37:09 UTC] PHP  32. Types_Field_Type_Date->set_value($data = [0 => ['display-only' => '21.05.1976', 'datepicker' => '201484800']]) /home/workahea/public_html/wp-content/plugins/types/application/models/field/abstract.php:68
[08-Mar-2022 10:37:09 UTC] PHP  33. strtotime($time = ['display-only' => '21.05.1976', 'datepicker' => '201484800']) /home/workahea/public_html/wp-content/plugins/types/application/models/field/type/date/date.php:75
#2311667

Update: forget about the debug log --> different issue, now solved

The initial problem remains.

#2311781

It is a custom PHP codes problem, if you need more assistance for it, please provide a test site with the same problem, also point out the problem page URLs, where I can edit your custom PHP codes, I need a live website to test and debug

#2311957

I have marked this thread as "Waiting for feedback" status, please update when your website is ready for test and debug.

#2312273

OK, I was able to finish faster than expected. Green light for debug procedures.

Just in case: I am available until 10pm (GMT +1) for Teams / Zoom for quick insights

#2312899

Thanks for the details, I am checking it in your website, will update here if find anything

#2312901

I have tried to login as user "heroname376212", but your website keeps on redirect me to URL:
hidden link

So I can not see WP dashboard, and check the view settings, please check it, make sure your website is ready for debug

#2312985

Sorry, you weren't exempted from 2fa (and didn't get the 2fa screen due to role). Fixed that. You should be good to go now.

#2313977
mein-konto.jpg

I can login into your website, and tried these steps:
1) Switch to user "Rainer Lochmann"
2) Open URL you mentioned above:
hidden link

I don't see any result as you mentioned above:

well-known Elementor tolchok and outputs a wrong result (a child post that does not belong to the parent) accompanied by " '] " at the end

See my screenshot

Where and how can I see the problem you mentioned above?

#2314603

Elementor tools --> maintenance view was still on to keep patients from logging into a view that doesn't work. I turned that off now.

Go to /mein-konto/ and then hit the 'Dokumente' area - you will see 'no items found' where actually meta data of a Termin post is supposed to appear. The Elementor artifact that I've mentioned in the post above vanished since I've started using a custom shortcode to fetch the parent post ID.

If you login as Mr. Lochmann and go to hidden link you will see his parent post ID which I also have hard coded into the shortcode used in this non-elementor test page to show the children meta data, however it still returns 'no items found'.
Watch the same test page as admin and you'll get the expected data for Mr. Lochmann.