I had this problem before with Drupal 4.7 - and today it happend again - but i have no clue where it comes from:

Some of the Field-Details are lost - and therefore the view itself breaks.
When i enter in edit-view-mode i can see, that some of the fields are empty, they are still there - but no labeling.
Now - i i just save the view - without doing anything - anything is fine again.

What is the reason for this? I was looking for a solution - as exactly the same error happend to me in drupal 4.7 - but i could not find any comment...

CommentFileSizeAuthor
#6 analyse.gif143.71 KBchriszz

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

What fields did this happen to?

Views tracks fields by table/field name combinations. If whatever provides these fields changes the table or field name, or just disappears, it can screw up Views that are utilizing this data; and Views currently is not good at ensuring that data remains sane and usable, so it behaves erratically when that happens.

Identifying what fields this happened to might be able to identify where the problem is coming from; it could be that some module developer utlizing the API is unaware of the impact of changing field names without updating the views.

(Please set back to 'active' when you answer -- thanks)

chriszz’s picture

Status: Postponed (maintainer needs more info) » Active

i have analysed the PHP-Errors now:

It always breaks with Fields from the Profile Table:

Unknown column 'profile_titel.value' in 'field list' query: SELECT DISTINCT(node.nid), node_data....

The views represent content-types but i get certain information about the authors from the profile.module

any ideas, what is happening?

regards
Christian

cosmicdreams’s picture

Are you sure you didn't include a typo with "titel". Did you copy and paste that line?

chriszz’s picture

Yes i 'am sure - i did paste and copy that line. Titel is german. I have a profile-field called Titel. it is not the same as title but the academic grade as Dr, and so on

chriszz’s picture

Look: Here is another one with the same problem: http://drupal.org/node/186104

chriszz’s picture

StatusFileSize
new143.71 KB

I did a small analysis between a working query - and a broken one. There are differences within this queries which are explained by different viewers. The right side is viewed by somebody with restricted view.rights, while the left side is viewed by me - Number 1. Therefore the WHERE-Clause is different - an that is okay. The problem is not within the where-clause - it is before - complaining that: Unknown column 'profile_anrede.value' in 'field list' query.

Now - please take a closer look - the left side is working - the right side is not working. What i can clearly see is, that at the right side many LEFT JOINS are lacking.

This happens very often - but i cannot find any scheme there. After some people did access the view - it breaks.

This is the view Export:

  $view = new stdClass();
  $view->name = 'antragsteller';
  $view->description = 'Liste aller Antragsteller';
  $view->access = array (
  0 => '11',
  1 => '18',
  2 => '4',
  3 => '19',
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Liste der Antragsteller';
  $view->page_header = '';
  $view->page_header_format = '3';
  $view->page_footer = '';
  $view->page_footer_format = '3';
  $view->page_empty = '';
  $view->page_empty_format = '3';
  $view->page_type = 'list';
  $view->url = 'antragsteller';
  $view->use_pager = FALSE;
  $view->nodes_per_page = '0';
  $view->sort = array (
  );
  $view->argument = array (
  );
  $view->field = array (
    array (
      'tablename' => 'profile_anrede',
      'field' => 'value',
      'label' => 'Anrede',
    ),
    array (
      'tablename' => 'profile_titel',
      'field' => 'value',
      'label' => 'Titel',
    ),
    array (
      'tablename' => 'profile_vorname',
      'field' => 'value',
      'label' => 'Vorname',
    ),
    array (
      'tablename' => 'profile_nachname',
      'field' => 'value',
      'label' => 'Nachname',
      'sortable' => '1',
      'defaultsort' => 'ASC',
    ),
    array (
      'tablename' => 'usernode_users',
      'field' => 'mail',
      'label' => 'E-Mail',
    ),
    array (
      'tablename' => 'usernode_users',
      'field' => 'access',
      'label' => 'Letzter Zugriff',
      'handler' => 'views_handler_field_date_small',
      'sortable' => '1',
    ),
    array (
      'tablename' => 'usernode_users',
      'field' => 'name',
      'label' => 'Username',
      'handler' => 'usernode_views_handler_field_username_link',
    ),
    array (
      'tablename' => 'profile_universitaet',
      'field' => 'value',
      'label' => '',
    ),
    array (
      'tablename' => 'usernode_users',
      'field' => 'uid',
      'label' => '',
    ),
    array (
      'tablename' => 'usernode_users',
      'field' => 'status',
      'label' => '',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'usernode',
),
    ),
    array (
      'tablename' => 'usernode_users_roles',
      'field' => 'rid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '17',
  1 => '3',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(profile_anrede, profile_titel, profile_vorname, profile_nachname, usernode_users, profile_universitaet, node, usernode_users_roles);
  $views[$view->name] = $view;
chriszz’s picture

Version: 5.x-1.6-beta5 » 5.x-1.6
catch’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)
chriszz’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Yes - i brought those issues together.

Yes - it works now for me - it is "by design" i guess - because the way it works is still not the way i would expect it to work.

In my opinion it should never show fields, if there lecks an access right - not show sometimes, and other times show failures. But if one knows, it is okay.