From 1114c52df4b06afc4f0d21f2325b845fbdd60796 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sun, 5 Jul 2026 21:30:50 -0500 Subject: [PATCH] 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 --- services/NormalBot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/NormalBot.php b/services/NormalBot.php index b8df232..cef0967 100644 --- a/services/NormalBot.php +++ b/services/NormalBot.php @@ -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);