pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Relationship Magic Tags rendering blank using Pagination #1385

Closed Trickpat7 closed 11 years ago

Trickpat7 commented 11 years ago

I'm using the following template and page to show a paginated view of all pods of type "records". The problem is that the relationship magic tags render perfectly on the first page. When I go to any subsequent pages, they render blank. This issue started to present itself in a recent update.

I upgraded to 2.3.5 RC 1 to fix the php warning message for blank foreach fields.

Any help would be greatly appreciated. Thanks!

Template

<div id="jquery_jplayer_{@id}" class="cp-jplayer"></div>

<div class="record clearfix">
<div class="record-cover">
<img src="{@album_cover_url}" alt="Album Cover" />
            <div id="cp_container_{@id}" class="cp-container">
                <div class="cp-buffer-holder"> <!-- .cp-gt50 only needed when buffer is > than 50% -->
                    <div class="cp-buffer-1"></div>
                    <div class="cp-buffer-2"></div>
                </div>
                <div class="cp-progress-holder"> <!-- .cp-gt50 only needed when progress is > than 50% -->
                    <div class="cp-progress-1"></div>
                    <div class="cp-progress-2"></div>
                </div>
                <div class="cp-circle-control"></div>
                <ul class="cp-controls">
                    <li><a href="#" class="cp-play" tabindex="1">play</a></li>
                    <li><a href="#" class="cp-pause" style="display:none;" tabindex="1">pause</a></li> <!-- Needs the inline style here, or jQuery.show() uses display:inline instead of display:block -->
                </ul>
            </div>
</div>
<div class="record-info">
<span class="record-name">{@name}</span>
<span class="record-meta">{@rt_association.name} - {@genre_association.name}</span>
<span class="record-artist"><a href="{@artist_association.artist_url}" target="_blank">{@artist_association}</a></span>
<span class="record-label"><a href="{@label_association.label_url}" target="_blank">{@label_association.name}</a></span>
<span class="record-download button"><a href="{@download_file_url}" target="_blank" onClick="javascript: _gaq.push(['_trackPageview', '{@name}']);">Download</a></span>

</div>
</div>

Page

<div class="records-group clearfix">
<header class="entry-header">

<h1>Records By Release Date</h1>

<nav>
    <h2>Sort by:</h2>
    <a href="/records/" class="current">Release Date</a>
    <a href="/records-by-artist">Artist</a>
    <a href="/records-by-title">Record Title</a>
    <a href="/records-by-label" >Label</a>
    <a href="/records-by-format">Format</a>
</nav>

</header>
<?php
$pods = pods( 'records' );
$params = array();

$params['orderby'] = 't.name';
$params['limit'] = 20;

$pods->find($params);

echo $pods->template('records');
echo $pods->pagination( array( 'type' => 'advanced' ) );

?>
</div>
sc0ttkclark commented 11 years ago

This should be resolved in the latest commits today, try downloading again from http://pods.io/latest/

sc0ttkclark commented 11 years ago

Duplicate of #1374 and #1380

Trickpat7 commented 11 years ago

Confirmed, thank you!