fix: wrap collected values in __ep_vars_combined for URL substitution

substituteUrlVars requires flat key-value pairs under __ep_vars_combined;
passing collected directly as meta skipped substitution since values are
strings not arrays, so {finca_id} was never replaced in the lotes URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-05 21:30:50 -05:00
co-authored by Claude Sonnet 4.6
parent eed8116c66
commit 1114c52df4
+1 -1
View File
@@ -638,7 +638,7 @@ class NormalBot
if ($type === 'select') {
$vf = $field['value_field'] ?? 'id';
$lf = $field['label_field'] ?? 'label';
$items = self::fetchDynamicList($field['source_endpoint_key'] ?? '', $company, $cap['collected'] ?? []);
$items = self::fetchDynamicList($field['source_endpoint_key'] ?? '', $company, ['__ep_vars_combined' => $cap['collected'] ?? []]);
if (!empty($items)) {
if ($ctxId > 0) {
$cap['__selects'][$field['key']] = array_column($items, $lf, $vf);