Hi,
Has anyone made a view yet which shows all the players of the team? I tried creating it but get this error:
user warning: Unknown column 'leaguesite_player_team.pid' in 'on clause' query: SELECT node.nid AS nid, leaguesite_player_0.first_name AS leaguesite_player_0_first_name, leaguesite_player_0.last_name AS leaguesite_player_0_last_name, leaguesite_position_team.position_name AS leaguesite_position_team_position_name FROM drupal_node node LEFT JOIN drupal_leaguesite_player leaguesite_player_0 ON node.nid = leaguesite_player_0.nid LEFT JOIN drupal_leaguesite_player_team leaguesite_player_team ON leaguesite_player_0.nid = leaguesite_player_team.player_id LEFT JOIN drupal_leaguesite_position leaguesite_position_team ON leaguesite_player_team.pid = leaguesite_position_team.pid WHERE (node.status <> 0) AND (node.type in ('leaguesite_player')) LIMIT 0, 10 in /var/www/brightsite.be/drupal/sites/all/modules/views/includes/view.inc on line 771.
Can anyone help me out here?
Thanks!
Tim
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | leaguesite_player.views_.inc_.patch | 4.95 KB | Alun |
| #7 | leaguesite_player.views_.inc_.patch | 988 bytes | Alun |
| #6 | view-players.txt | 7.25 KB | timbraeckman |
| #1 | players_profile.txt | 7.7 KB | emnzava |
Comments
Comment #1
emnzava commentedDear Tim,
This is how i did. See the attached views export file.
Regards.
Comment #2
timbraeckman commentedThanks bwax! But i see that you don't show the player's position in your view?
I can create a view with players perfectly but as soon as i add his position from leaguesite_player, i get an error in the query :-(
Comment #3
emnzava commentedYes Tim,
I do get the same error in the query. In the meantime i've created custom field in the leaguesite_player content type and add those position as a select list.
Regards.
Comment #4
timbraeckman commentedYeah that's a solution to add a CCK field but it's not a nice one as Alun his module already has Positions so it's so stupid to add it ourselves too :-) But it's a great temporary solution, that's true!
Comment #5
Alun commentedTim, any chance you could export the View causing the error? I'll have a look at it and see if I can get a fix sorted quickly.. shouldn't be a difficult one.
Thanks
Alun
Comment #6
timbraeckman commentedSure no problem.
In attachment you can see my view (basic one :-))
Comment #7
Alun commentedHmm, for some reason I couldn't import from your text file.
Anyway, I think I have the issue, I have attached a patch, though obviously, this might not work for you.
I'll attach a complete file too shortly.
Comment #8
Alun commentedHere is the complete file. Rename to leaguesite_player.views.inc
Let me know how you get on! - remember to flush views cache.
Alun
Comment #9
timbraeckman commentedGreat it works now!!