Pager doesn't work in views block if views php field is used I have a views block that shows nodes in some conditions. The views has pager and normally it works but if I use Global: PHP field the pager doesn't work and it only show the first page.

The Global: PHP field is as below:


Value Code: emtpy
Output Code:


->

&lt;?php if ($row-&gt;type == 'book') { ?&gt;
        &lt;i class="fa fa-book fa-lg fa-fw"&gt;&lt;/i&gt;
&lt;?php }
elseif ($row-&gt;type == 'article') {
?&gt;
        &lt;i class="fa fa-file-text-o fa-lg fa-fw"&gt;&lt;/i&gt;
&lt;?php }
elseif ($row-&gt;type == 'thesis') {
?&gt;
        &lt;i class="fa fa-graduation-cap fa-lg fa-fw"&gt;&lt;/i&gt;
&lt;?php } ?&gt;






UPDATE:

I'm listing the nodes in this views block. There are 3 different content types and what I want to do with this PHP field is to print an icon according to content type. The code checks the content type with if ($row-&gt;type == ...).

(End of update.)



The PHP field works correctly and gives what I want but I wonder if I do something wrong in the PHP structure.

Do you have any idea what can cause this problem?
There is a patch for that: Pager disappears when Global: PHP used in Views 3.8 


  After upgrading from Views version 7.x-3.7 to 7.x-3.8, the pager was
  missing from all views that used Global: PHP fields.


If patch#6 does not work for you, just follow the links in comment#27