diff --git a/CHANGELOG_DEV.md b/CHANGELOG_DEV.md index 32dbf1a00a..c2d8e47835 100644 --- a/CHANGELOG_DEV.md +++ b/CHANGELOG_DEV.md @@ -1,3 +1,9 @@ +1.9.0 (Unreleased) +------------------ + +- Fix #5174: Tour module crashes with enabled tags field + + 1.9.0-beta.2 (July 14, 2021) ---------------------------- diff --git a/protected/humhub/modules/content/widgets/ContainerTagPicker.php b/protected/humhub/modules/content/widgets/ContainerTagPicker.php index 7be05700a2..2e73462cbf 100644 --- a/protected/humhub/modules/content/widgets/ContainerTagPicker.php +++ b/protected/humhub/modules/content/widgets/ContainerTagPicker.php @@ -33,6 +33,11 @@ class ContainerTagPicker extends BasePicker */ public $itemClass = ContentContainerTag::class; + /** + * @inheritdoc + */ + public $placeholderMore; + /** * @inheritdoc */ @@ -53,7 +58,7 @@ class ContainerTagPicker extends BasePicker protected function getData() { return array_merge(parent::getData(), [ - 'placeholder-more' => Yii::t('ContentModule.base', 'Add tag...'), + 'placeholder-more' => $this->placeholderMore ?? Yii::t('ContentModule.base', 'Add tag...'), 'no-result' => Yii::t('ContentModule.base', 'No tags found for the given query'), ]); } diff --git a/protected/humhub/modules/tour/views/tour/welcome.php b/protected/humhub/modules/tour/views/tour/welcome.php index ba3f224587..2eec81595a 100644 --- a/protected/humhub/modules/tour/views/tour/welcome.php +++ b/protected/humhub/modules/tour/views/tour/welcome.php @@ -2,6 +2,7 @@ use humhub\modules\content\assets\ContainerHeaderAsset; use humhub\modules\content\controllers\ContainerImageController; +use humhub\modules\content\widgets\ContainerTagPicker; use humhub\modules\file\widgets\Upload; use humhub\modules\ui\icon\widgets\Icon; use humhub\widgets\ModalButton; @@ -87,7 +88,7 @@ $profileImageUpload = Upload::withName('images', ['url' => $imageUploadUrl]);
- field($user, 'tags')->textInput(['placeholder' => Yii::t('TourModule.base', 'Your skills, knowledge and experience (comma seperated)')]); ?> + field($user, 'tags')->widget(ContainerTagPicker::class, ['placeholderMore' => Yii::t('TourModule.base', 'Your skills, knowledge and experience (comma seperated)')]); ?>