XF 1.2 Pagination Gone on Forum View

"Showing threads 1 to 20 of 2"

I think that's likely why. It looks like it's 2 in every forum. So I think that means it's either a column that has been added somewhere that conflicts with our query expectations (unfortunately, a pain to resolve) or an add-on conflict.

I'd start by disabling add-ons as I think we make a simple count query that can't really be overridden.
 
No idea why it's going that, because all I'm going is this in my Model

PHP:
public function getTotalThreads()
        {
                return $this->_getDb()->fetchOne('
                SELECT COUNT(*)
                FROM xf_thread
                WHERE post_date > UNIX_TIMESTAMP(CURDATE( ))
                ');
        }

EDIT: Actually, it's pretty obvious now why it's doing it. Need to re-do the addon I think
 
Last edited:
Fixed. I was using the same variable name as is used in the pagination for thread_list $totalThreads

PHP:
<xen:if is="{$totalThreads}"><span class="contentSummary">{xen:phrase showing_threads_x_to_y_of_z, 'start={xen:number $threadStartOffset}', 'end={xen:number $threadEndOffset}', 'total={xen:number $totalThreads}'}</span></xen:if>

Been though and added a prefix to all my variables now.
 
Top Bottom