user:users Members Directory suddenly broken - gah! 
Posted: 09 October 2008 07:22 AM   [ Ignore ]
Newbie
Rank
Total Posts:  29
Joined  2008-08-25

Hi,

I’ve used the User Module to create a Members Directory. It was all working great until today, when my client pointed out the screen was blank - not a great way to find out!

After a bit of trial and error I have worked out that it is this code causing the problem:

<table class="membersDir">
<
tr class="tableHead"><th>Name</th><th>Phone</th><th>Email</th><th>Options</th><th>Social Clubs</th></tr>
{exp:user:users orderby="screen_name" sort="asc" dynamic_parameters="yes" paginate="top" limit="50" socialclubs="art_club_member|book_club_member" dynamic_parameters="socialclubs" group_id="not 1|6|7|28|29" }
<tr valign="top"><td>{screen_name}</td><td>{mobile_no}</td><td>{if display_email == "Yes"}<a href="mailto:{email}">{email}</a>{if:else}Not shared{/if}</td><td><a href="{path=members/member_profile}user/{username}">View Profile</a></td>
<
td>{if art_club_member == "Yes"}Art Club<br />{/if}{if book_club_member == "Yes"}Book Club<br />{/if}
{if bowling_club_member 
== "Yes"}Bowling Club<br />{/if}
{if bridge_club_member 
== "Yes"}Bridge Club<br />{/if}
{if choir_club_member 
== "Yes"}Choir<br />{/if}
{if dartssolo_club_member 
== "Yes"}Darts &ampSolo Club<br />{/if}
{if snooker_club_member 
== "Yes"}Snooker Club<br />{/if}</td></tr>
{/exp:user:users}   
</table>

I don’t understand how this has happened because i used the page yesterday with no problems. I’ve tried removing parts too, such as the group_id="not...". And I tried pasting this into a blank template, but with the same results.

I havn’t been near that section of the site since yesterday, but I have been creating new areas and galleries elsewhere on the site, just in case thats relevant.

Help! Please! It’s meant to go live tomorrow!

Thanks....

Profile
 
 
Posted: 10 October 2008 01:31 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  29
Joined  2008-08-25

No ideas then?

Funny thing is it only seems to be user:users tags that cause a problem, user:search and results are fine.

Profile
 
 
Posted: 10 October 2008 05:15 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Hi birdie,

One thing I noticed is that you have two “dynamic parameters” parameters - one of them incorrect at that:

dynamic_parameters="yes" dynamic_parameters="socialclubs"

What I would suggest you do is start out in a new, clean template. Then, copy over the example from the Documentation and see if that works. Then, slowly, one by one, add the rest of your code to it and see what breaks it: smile

<form method="post" action="{path="user/users"}"
  
<
select name="user_orderby"
<
option value="username">Username</option
<
option value="screen_name">Screen Name</option
<
option value="join_date">Join Date</option
</
select
  
<
select name="user_sort"
<
option value="asc">Ascending</option
<
option value="desc">Descending</option
</
select
  
<
input type="submit" value="Sort" /> 
  
</
form
  
{exp:user:users orderby="total_entries" sort="desc" dynamic_parameters="yes"
  
<p>Screen Name{screen_name}</p
<
p>Total Entries{total_entries}</p
<
p>Join Date{join_date format="%m %d, %Y"}</p
<
p>Email{email}</p
<
br /><br /> 
  
{/exp:user:users}

 Signature 
Profile
 
 
Posted: 10 October 2008 06:23 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  29
Joined  2008-08-25

Haven’t time at the moment to rebuild, but will try over the weekend. I removed the Dynamic Parametres (both - oops) but the problem still occurs.

Profile