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

Comments

emnzava’s picture

StatusFileSize
new7.7 KB

Dear Tim,

This is how i did. See the attached views export file.

Regards.

timbraeckman’s picture

Thanks 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 :-(

emnzava’s picture

Yes 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.

timbraeckman’s picture

Yeah 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!

Alun’s picture

Tim, 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

timbraeckman’s picture

StatusFileSize
new7.25 KB

Sure no problem.
In attachment you can see my view (basic one :-))

Alun’s picture

StatusFileSize
new988 bytes

Hmm, 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.

Alun’s picture

StatusFileSize
new4.95 KB

Here is the complete file. Rename to leaguesite_player.views.inc
Let me know how you get on! - remember to flush views cache.
Alun

timbraeckman’s picture

Status: Active » Fixed

Great it works now!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.