diff --git a/Events.php b/Events.php index 88479d0..cd38faf 100644 --- a/Events.php +++ b/Events.php @@ -143,8 +143,7 @@ public static function onSampleDataInstall($event) $comment = new \humhub\modules\comment\models\Comment(); $comment->message = Yii::t('PollsModule.base', "Why don't we go to Bemelmans Bar?"); - $comment->object_model = $poll->className(); - $comment->object_id = $poll->getPrimaryKey(); + $comment->content_id = $poll->content->id; $comment->save(); // Switch Identity @@ -155,8 +154,7 @@ public static function onSampleDataInstall($event) $comment = new \humhub\modules\comment\models\Comment(); $comment->message = Yii::t('PollsModule.base', "Again? :weary:"); - $comment->object_model = $poll->className(); - $comment->object_id = $poll->getPrimaryKey(); + $comment->content_id = $poll->content->id; $comment->save(); // Switch Identity diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 2de21b7..3c26a60 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +1.5.1 (Unreleased) +------------------ +- Fix #175: Error creating installer sample content (comment no longer uses removed `object_model`/`object_id` properties) + 1.5.0 (June 5, 2026) -------------------- - Enh #174: Update for HumHub 1.19