From 9f4b226925084e4a9fcd071aab945357227387df Mon Sep 17 00:00:00 2001 From: kilgor-trout-c22 Date: Mon, 8 Jun 2026 13:21:13 +0200 Subject: [PATCH] Fix installer sample content using removed comment object_model/object_id properties --- Events.php | 6 ++---- docs/CHANGELOG.md | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) 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