bizley / yii2-podium

Yii 2 forum module project
Apache License 2.0
168 stars 59 forks source link

Error on edit preview #96

Closed triboe closed 7 years ago

triboe commented 7 years ago

Getting unknown property: bizley\podium\models\Post::post

<?php if (!empty($preview)): ?>
<div class="row">
    <div class="col-sm-10 col-sm-offset-1">
        <?= Alert::widget([
            'body' => '<strong><small>' 
                        . Yii::t('podium/view', 'Post Preview') 
                        . '</small></strong>:<hr>' 
                        . $model->post, 
            'options' => ['class' => 'alert-info']
        ]); ?>
    </div>
</div>
<?php endif; ?>
bizley commented 7 years ago

Which version of Podium is this and where does this error occur? Is it post edit?

triboe commented 7 years ago

Podium 0.6 on Yii 2.0.10 Edit post, then Preview (New post/Preview works, both editors) This line marked in error log (above) . $model->post,

(BTW Reply with quote: nothing happens)

tomaszkane commented 7 years ago

Confirm. There should be $model->content instead of $model->post

bizley commented 7 years ago

Actually it's $model->parsedContent.

@triboe It's fixed now in dev-master (0.7). d94989969011c2a2611cf4ee15959ec8bdce0c8b Trigger on "Reply with quote" has been corrected as well. 80a062ca0f3ccebe584ed915bf9d30b823e9b7d8