{no_results} not working and pagination not working for user:stats
Posted: 02 February 2010 08:05 AM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  82
Joined  2006-10-18

Here’s the simplified code:

{exp:user:stats  member_id="{segment_3}"}

{exp
:weblog:entries weblog="weblog1" limit="10" status="not closed"  author_id="{segment_3}" dynamic="off"  show_future_entries="yes"}

{if no_results}
NO RESULTS
!!
{/if}

<br >{title}

{paginate}
{if previous_page}
<div style="float:left;padding-left:5px;"><a href="{auto_path}">< Previous Page</a> &nbsp;</div>{/if}
{if next_page}
<div style="float:right;padding-right:5px;"><a href="{auto_path}">Next Page ></a></div>{/if}
{
/paginate}

{
/exp:weblog:entries}

{
/exp:user:stats} 

- so when there are no entries for the given user, the no_results doesn’t appear
- if the user has enough results to show pagination, the pagination appears, but doesn’t show new results when pagination links are clicked, the same results refresh instead.

When simplifying the code further by not utilizing segments as shown below, the problems do not go away:

{exp:user:stats  member_id="24"}

{exp
:weblog:entries weblog="weblog1" limit="10" status="not closed"  author_id="24" dynamic="off"   show_future_entries="yes"}

{if no_results}
NO RESULTS
!!
{/if}

<br >{title}

{paginate}
{if previous_page}
<div style="float:left;padding-left:5px;"><a href="{auto_path}">< Previous Page</a> &nbsp;</div>{/if}
{if next_page}
<div style="float:right;padding-right:5px;"><a href="{auto_path}">Next Page ></a></div>{/if}
{
/paginate}

{
/exp:weblog:entries}

{
/exp:user:stats} 

When the user:stats tag is removed, {no_results} works.
Thanks.

Profile
 
 
Posted: 02 February 2010 08:32 AM   [ Ignore ]   [ # 1 ]
Jr. Member
RankRank
Total Posts:  82
Joined  2006-10-18

UPDATE:

I’ve solved the {no_results} problem by taking the Weblog:entries out of the user:stats code.

I’m still working on the pagination which looks to be an EE issue…

Profile
 
 
Posted: 02 February 2010 08:44 AM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  82
Joined  2006-10-18

UPDATE:

It appears that the pagination issue is from EE and is a problem that has been addressed in 1.6.8.  Now I have a good reason to upgrade…

Profile