Cakephp 3 - Remove empty post from pagination
<p>I'm working on multi language website.
In the English version of the website all works properly, because I entered translations.</p>

<pre><code>$blogPosts = $this-&gt;BlogPosts-&gt;find('all')-&gt;where(['BlogPosts.active' =&gt; 1]);
$this-&gt;set('blogPosts',$this-&gt;paginate($blogPosts));
</code></pre>

<p>If I changed the language of website I would like to remove all the posts whose translation of the title is not entered.
I tried this, but it does not work:</p>

<pre><code>$blogPosts = $this-&gt;BlogPosts-&gt;find('all')-&gt;where(['BlogPosts.active' =&gt; 1,'BlogPosts.title IS NOT' =&gt; null]);
$this-&gt;set('blogPosts',$this-&gt;paginate($blogPosts));
</code></pre>

<p>Still printed posts without titles.
How to solve this problem?</p>