diff --git a/inc/classes/BxDolForm.php b/inc/classes/BxDolForm.php index 90984d90d6..bdc87d3d39 100644 --- a/inc/classes/BxDolForm.php +++ b/inc/classes/BxDolForm.php @@ -986,7 +986,7 @@ function getCleanValue ($sName) $oRv = $oChecker->get ($sName); // process comma separated string for api values - if (bx_is_api() && isset($this->aInputs[$sName]['type']) && !empty($oRv) && in_array($this->aInputs[$sName]['type'], ['checkbox_set', 'files', 'select_multiple'])) + if (bx_is_api() && isset($this->aInputs[$sName]['type']) && !empty($oRv) && (in_array($this->aInputs[$sName]['type'], ['checkbox_set', 'files', 'select_multiple']) || in_array($sName, ['labels']))) $oRv = explode(',', $oRv); return $oRv; diff --git a/template/scripts/BxBaseFormView.php b/template/scripts/BxBaseFormView.php index ed218027ce..ccd39d479d 100644 --- a/template/scripts/BxBaseFormView.php +++ b/template/scripts/BxBaseFormView.php @@ -1799,7 +1799,8 @@ protected function genCustomInputLabels (&$aInput) if (bx_is_api()){ $aInput['type'] = 'labels'; - $aInput['ajax_get_suggestions'] = 'system/select_labels/TemplLabelsServices¶ms[]='; + //$aInput['ajax_get_suggestions'] = 'system/select_labels/TemplLabelsServices¶ms[]='; + $aInput['values'] = bx_srv('system', 'get_labels', [], 'TemplLabelsServices'); } return $this->oTemplate->parseHtmlByName('label_select_field.html', array( diff --git a/template/scripts/BxBasePage.php b/template/scripts/BxBasePage.php index 37b15b3a02..dd50636950 100644 --- a/template/scripts/BxBasePage.php +++ b/template/scripts/BxBasePage.php @@ -424,7 +424,7 @@ public function getPageAPI ($aBlocks = []) 'id' => $this->_aObject['id'], 'title' => $this->_getPageTitle(), 'uri' => $this->_aObject['uri'], - 'url' => $this->_aObject['uri'] . (bx_get('params')[0] . ($query_string != '' ? '?' . $query_string : '')), + 'url' => ((bx_get('params')[0] ? bx_get('params')[0] : $this->_aObject['uri'] ) . ($query_string != '' ? '?' . $query_string : '')), 'author' => $this->_aObject['author'], 'added' => $this->_aObject['added'], 'module' => $this->getModule(),