Skip to content

Commit b60ade1

Browse files
authored
Merge pull request #8718 from ProcessMaker/bugfix/FOUR-29133
Data Connector uses incorrect Collection ID at runtime causing 500 error
2 parents fa249ef + c2ef4ae commit b60ade1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

ProcessMaker/Traits/MakeHttpRequests.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,16 @@ private function addQueryStringsParamsToUrl($endpoint, array $config, array $dat
483483
$url = url($url);
484484
}
485485

486+
if (strpos($url, '{{__api_base_url__}}') !== false) {
487+
$url = str_replace('{{__api_base_url__}}', $this->api_base_url, $url);
488+
}
489+
490+
// validate url have host
491+
if (!parse_url($url, PHP_URL_HOST)) {
492+
$host = $this->api_base_url ?? config('app.url');
493+
$url = $host . $url;
494+
}
495+
486496
// Evaluate mustache expressions in URL
487497
$url = $this->evalMustache($url, array_merge($data, $params));
488498
// Add params from datasource configuration

0 commit comments

Comments
 (0)