Catégories:
Bonjour !
Ce matin je suis tombée sur une «page non trouvée» en voulant voir mes contributions sur un site communautaire. Zut ! Je regarde la view et en effet il semble manquer un petit quelque chose pour avoir les contribs des users. Je réinitialise la vue et pareil !
Je regarde sur un autre D6, et là pareil, la vue ne s’affiche pas mais en plus j’ai une belle erreur.
Je vous colle l’erreur :
* warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /chemin_vers_le_site/sites/all/modules/views/includes/view.inc on line 1199.
* warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /chemin_vers_le_site/includes/database.mysql.inc on line 321.
* warning: Illegal offset type in /chemin_vers_le_site/sites/all/modules/views/includes/view.inc on line 1203.
* warning: Illegal offset type in /chemin_vers_le_site/sites/all/modules/views/includes/view.inc on line 1238.
* warning: Illegal offset type in isset or empty in /chemin_vers_le_site/sites/all/modules/views/views.module on line 699.Voilà ma vue tracker (sans modif) :
$view = new view;
$view->name = 'tracker';
$view->description = 'Shows all new activity on system.';
$view->tag = 'default';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'type' => array(
'id' => 'type',
'table' => 'node',
'field' => 'type',
'label' => 'Type',
),
'title' => array(
'id' => 'title',
'table' => 'node',
'field' => 'title',
'label' => 'Title',
'link_to_node' => TRUE,
),
'name' => array(
'id' => 'name',
'table' => 'users',
'field' => 'name',
'label' => 'Author',
'link_to_user' => TRUE,
),
'comment_count' => array(
'id' => 'comment_count',
'table' => 'node_comment_statistics',
'field' => 'comment_count',
'label' => 'Replies',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '',
'suffix' => '',
),
'last_comment_timestamp' => array(
'id' => 'last_comment_timestamp',
'table' => 'node_comment_statistics',
'field' => 'last_comment_timestamp',
'label' => 'Last Post',
'date_format' => 'small',
'custom_date_format' => '',
),
'timestamp' => array(
'id' => 'timestamp',
'table' => 'history_user',
'field' => 'timestamp',
'label' => '',
'comments' => 1,
'relationship' => 'none',
'link_to_node' => 0,
'comment' => 1,
),
'new_comments' => array(
'id' => 'new_comments',
'table' => 'node',
'field' => 'new_comments',
'label' => '',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '',
'suffix' => ' new',
'link_to_comment' => 1,
'no_empty' => 1,
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'last_comment_timestamp' => array(
'id' => 'last_comment_timestamp',
'table' => 'node_comment_statistics',
'field' => 'last_comment_timestamp',
'order' => 'ASC',
'granularity' => 'second',
),
));
$handler->override_option('arguments', array(
'uid_touch' => array(
'id' => 'uid_touch',
'table' => 'node',
'field' => 'uid_touch',
'default_action' => 'ignore',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => TRUE,
'override' => FALSE,
'items_per_page' => 25,
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => 'Recent posts for %1',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'relationship' => 'none',
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'album' => 0,
'artist' => 0,
'book' => 0,
'page' => 0,
'story' => 0,
'track' => 0,
),
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'status' => array(
'id' => 'status',
'table' => 'node',
'field' => 'status',
'operator' => '=',
'value' => '1',
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'status' => array(
'id' => 'status',
'table' => 'comments',
'field' => 'status',
'operator' => '=',
'value' => 0,
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
),
),
));
$handler->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler->override_option('title', 'Contributions récentes');
$handler->override_option('items_per_page', '25');
$handler->override_option('use_pager', TRUE);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'override' => 1,
'order' => 'desc',
'columns' => array(
'type' => 'type',
'title' => 'title',
'name' => 'name',
'comment_count' => 'comment_count',
'last_comment_timestamp' => 'last_comment_timestamp',
'timestamp' => 'title',
'new_comments' => 'comment_count',
),
'info' => array(
'type' => array(
'sortable' => 1,
'separator' => '',
),
'title' => array(
'sortable' => 1,
'separator' => ' ',
),
'name' => array(
'sortable' => 1,
'separator' => '',
),
'comment_count' => array(
'sortable' => 1,
'separator' => '<br />',
),
'last_comment_timestamp' => array(
'sortable' => 1,
'separator' => ' ',
),
'timestamp' => array(
'separator' => '',
),
'new_comments' => array(
'separator' => '',
),
),
'default' => 'last_comment_timestamp',
));
$handler = $view->new_display('page', 'Page', 'page');
$handler->override_option('path', 'tracker');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'Recent posts',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => NULL,
'description' => '',
'weight' => NULL,
));Avez-vous le même souci avec Views 6.x-2.5 ?
Merci de vos retours !
- Vous devez vous identifier ou créer un compte pour écrire des commentaires

Bonjour,
je rencontre ce meme souci, le problème vient du fait qu’il n’est pas possible de mettre tracker/% avec un menu. Lorsque je mets tracker/% ça passe sans problème mais sauf que dans un menu on ne peut avoir ce type d’url.
merci d’avance pour votre réponse !
Sam Ramachandra
sam
25
Pour ceux qui auraient le meme problème : il faut utiliser tacker2 qui fonctionne avec les userid dans l’url, on n’a rien à faire il faut juste intaller le module, par contre il y a une anomalie (en cours de résolution). Un utilisateur anonyme a acces à la liste des contributions, meme si les permissions sont correctement configuré….
sam
sam
25