A component param of type group[] breaks completely when any of its sub-params uses a custom control type registered via cs_parameters_managed_register() .
The repeater’s value is saved correctly to the database, but at render time the whole group[] param resolves to an unresolvable object. Every sub-param in that group is affected, including sibling sub-params that use built-in control types.
I’ve reverted back to Pro 6.8.12 and it works, so it must be a bug present in 6.9.2
Parameter code:
// — CASES POST SELECTOR — //
cs_parameters_managed_register(‘cases-post-selector’, [
‘type’ => ‘select’,
‘label’ => ‘Select Case’,
‘options’ => call_user_func(function() {
$options = [[‘value’ => ‘’, ‘label’ => ‘Select a Case’]];
$portfolio_posts = get_posts([
'post_type' => 'klantcase',
'posts_per_page' => -1,
'post_status' => 'publish',
'orderby' => 'title',
'order' => 'ASC'
]);
if (!empty($portfolio_posts)) {
foreach ($portfolio_posts as $post) {
$options[] = [
'value' => $post->ID,
'label' => $post->post_title
];
}
}
return $options;
}),
]); // — CASES POST SELECTOR — //
cs_parameters_managed_register(‘cases-post-selector’, [
‘type’ => ‘select’,
‘label’ => ‘Select Case’,
‘options’ => call_user_func(function() {
// Initial empty state
$options = [[‘value’ => ‘’, ‘label’ => ‘Select a Case’]];
// Fetch posts of type 'x-portfolio'
$portfolio_posts = get_posts([
'post_type' => 'klantcase',
'posts_per_page' => -1,
'post_status' => 'publish',
'orderby' => 'title',
'order' => 'ASC'
]);
// Populate options
if (!empty($portfolio_posts)) {
foreach ($portfolio_posts as $post) {
$options[] = [
'value' => $post->ID,
'label' => $post->post_title
];
}
}
return $options;
}),
]);
Custom looper code:
// — HOOK FOR THE MANUAL SELECTION LOOPER: CASES —
add_filter(‘cs_looper_custom_hl_get_case_posts’, function( $result, $params ) {
if ( empty( $params['case_posts'] ) ) {
return [];
}
$raw_data = $params['case_posts'];
$case_ids =[];
if ( is_string($raw_data) && strpos($raw_data, '[') === false ) {
$case_ids = explode(',', $raw_data);
}
elseif ( is_string($raw_data) ) {
$decoded = json_decode($raw_data, true);
if ( is_array($decoded) ) {
foreach ( $decoded as $item ) {
if ( isset($item['case_post']) && !empty($item['case_post']) ) {
$case_ids[] = $item['case_post'];
}
}
}
}
elseif ( is_array($raw_data) ) {
foreach ( $raw_data as $item ) {
if ( is_array($item) && isset($item['case_post']) && !empty($item['case_post']) ) {
$case_ids[] = $item['case_post'];
} elseif ( is_numeric($item) || is_string($item) ) {
$case_ids[] = $item; // Fallback if it's a flat array of IDs
}
}
}
$case_ids = array_filter( array_map('intval', $case_ids) );
if ( empty( $case_ids ) ) {
return[];
}
$args =[
'post_type' => 'klantcase',
'post__in' => $case_ids,
'orderby' => 'post__in',
'posts_per_page' => -1,
'post_status' => 'publish'
];
$query = new WP_Query($args);
return $query->posts;
}, 10, 2);