This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

daftspunky
daftspunky

Recently it was discovered that the groupBy() method in Laravel is flawed, not at any fault of Laravel itself but because of the inability of all SQL drivers, except MySQL, from counting grouped records.

To cut a long story short, the joinWith() method -- unique to October -- is being removed to keep things simple and align with the Laravel way. If you use this method in your plugins, it should be substituted with the whereHas() method found in Laravel. Here is an example of a conversion:

/*
 * Before
 */

$model->joinWith('posts', false);
$model->searchWhere($search, ['rainlab_forum_topics.subject', 'rainlab_forum_posts.subject', 'content']);

// Grouping due to the joinWith() call
$model->groupBy($this->getQualifiedKeyName());

/*
 * After
 */

$model->orWhereHas('posts', function($query) use ($search){
    $query->searchWhere($search, ['subject', 'content']);
});

$model->orSearchWhere($search, 'subject');

Sorry for any inconvenience, if you are affected by this feel free to reach out for support in converting your code.

<3

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.