to work "profile" with "views" I had to change the name of the table profile_value to profile_values

Comments

damien tournoud’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 7.x-dev » 7.x-3.x-dev
Component: profile.module » profile data

This is called a bug in Views, then :)

jmaties’s picture

StatusFileSize
new1.59 KB

Sorry, it is in views :P

--- views-7.x-3.x-dev.tar.gz/views/modules/profile.views.inc
+++views-7.x-3.x-dev.tar.gz/views/modules/profile.views.inc
@@ -17,16 +17,16 @@
function profile_views_data() {
// Define the base group of this table. Fields that don't
// have a group defined will go into this field by default.
- $data['profile_values']['table']['group'] = t('Profile');
+ $data['profile_value']['table']['group'] = t('Profile');

- $data['profile_values']['table']['join'] = array(
+ $data['profile_value']['table']['join'] = array(
'node' => array(
- 'left_table' => 'profile_values',
+ 'left_table' => 'profile_value',
'left_field' => 'uid',
'field' => 'uid',
),
'users' => array(
- 'left_table' => 'profile_values',
+ 'left_table' => 'profile_value',
'left_field' => 'uid',
'field' => 'uid',
),
@@ -34,20 +34,20 @@

$fields = profile_views_get_fields();
foreach($fields as $field) {
- $table_name = 'profile_values_' . $field->name;
+ $table_name = 'profile_value_' . $field->name;
$data[$table_name] = array(
'table' => array(
'group' => t('Profile'),
'join' => array(
'node' => array(
- 'table' => 'profile_values',
+ 'table' => 'profile_value',
'left_table' => 'users',
'left_field' => 'uid',
'field' => 'uid',
'extra' => array(array('field' => 'fid', 'value' => $field->fid)),
),
'users' => array(
- 'table' => 'profile_values',
+ 'table' => 'profile_value',
'left_field' => 'uid',
'field' => 'uid',
'extra' => array(array('field' => 'fid', 'value' => $field->fid)),

esmerel’s picture

Status: Active » Needs review
dawehner’s picture

Status: Needs review » Fixed

This is fixed.

Next time post a patch with a usable header :)

jmaties’s picture

sorry is my first patch ;)

dawehner’s picture

No problem :)
Thanks for finding and fixing the bug

jmaties’s picture

StatusFileSize
new593 bytes

new modification and new patch ;)

jmaties’s picture

StatusFileSize
new593 bytes

sorry the correct patch

dawehner’s picture

I will not commit this. I don't think views will support d5 -> d7 without converting it to d6 first.

There will be a alternative api, see issue queue, to convert from d6 views to d7 views, but this patch here will not fix it, sry.

I hope it's okay for you.

dawehner’s picture

jmaties’s picture

ok, thank's

Status: Fixed » Closed (fixed)

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