I've made a page view that takes an argument to view nodes by a certain user, but it also displays the argument as a Drupal message under the title. Why does it display the argument in a message box (is it for debugging?) and can I disable it?

Comments

merlinofchaos’s picture

I don't understand why this might be happening. I did a grep and there is definitely no drupal_set_message() in views that could cause this.

solipsist’s picture

I'm using the CVS version. I'll try updating to the latest CVS and see what happens.

merlinofchaos’s picture

Note that the latest CVS version is for Drupal 5.0, not 4.7

solipsist’s picture

Right then... would it be possible to use the 4.7 release? The site doesn't use RSS feeds or any of the features introduced in CSS.

potential’s picture

I am having the same/similar problem. My argument is "User: Username is Author". When I make a page filtered by "node type is one of image", the view will output a message containing the username and the images from that user name below it.

If instead I filter by "node type is one of blog entry" (which is a custom flexinode type) it will output the UID as a message and will not print out any of the nodes.

If, however, I use the argument "User: UID is author", everything works well. I would like to use the "User: Username is author" for my argument so I hope this can be fixed for the 4.7 version.

Thanks!

merlinofchaos’s picture

Please do me a favor:

Recreate this problem using a stock Drupal 4.7 using only Bluemarine,and the simplest view you can come up with (preferably not using CCK or taxonomy) that will cause it. Then post the view here. That'll help me a lot in figuring out what's going on here.

potential’s picture

merlinofchaos: I just did a fresh install of druapl 4.7.3 and installed image.module and views.module. I added one picture and created the view below. When I go to www.example.com/photos/admin it shows an "admin" message on the page along with the teaser view for the image.

  $view = new stdClass();
  $view->name = 'photos_user';
  $view->description = 'Bring up a list of photos by user.';
  $view->access = array (
  0 => '1',
  1 => '2',
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '%1\'s photos';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'teaser';
  $view->url = 'photos';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '15';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'created',
      'sortorder' => 'DESC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'username',
      'argdefault' => '1',
      'title' => '',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
  );
  $view->filter = array (
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node);
  $views[$view->name] = $view;
merlinofchaos’s picture

Status: Active » Fixed

Ok, fixed and checked in; tarballs will be built sometime in the next 12 hours, or you can update from CVS.

solipsist’s picture

Merlin and potential: Thanks for a lightning fast fix!

Anonymous’s picture

Status: Fixed » Closed (fixed)
micheleannj’s picture

I have the new tarball for 4.7 (modules show a timestamp of 2006-10-06) but I'm still getting this... suggestions?

merlinofchaos’s picture

Check the version of the file 'modules/views_user.inc' -- it should be 1.11.2.1

micheleannj’s picture

It's 1.11, so that's prolly my problem.

Thanks for the quick reply!

micheleannj’s picture

Errr, guess I'm a little slow today but now I've got the right version and it's still showing up there... am I missing a step? thanks

merlinofchaos’s picture

Ummmmmm.

If you have the right version of that file then, uh. I don't know how that message could be appearing.

This is when using the username argument, right?

micheleannj’s picture

Could it be a caching thing? Don't think I'm crazy, but now it's showing up on non-view pages too!

It's the same thing discribed above: I have username as an argument and usernames are showing up in a green warning box at the top of the page...

merlinofchaos’s picture

1) Are you sure you have the new file in the right place? It should be views/modules/views_user.inc. And that you don't somehow have 2 copies of Views installed? (Drupal has a good likelihood of getting the wrong one when this happens)
2) I don't think it should be a caching thing but it can't hurt to dump your cache anyway. The most effective way is from mysql: execute this sql: 'TRUNCATE cache;'
3) non-view pages as well? That's only possibly from views if you have a block or something that's doing the drupal_set_message as well?

micheleannj’s picture

I cleared the cache and deleted the views.old folder I had moved the previous copy to. One of these things did the trick.

Thanks again for the help!

m

merlinofchaos’s picture

Probably the views.old did it --

For future reference, when making backup copies of modules (which is recommended) be sure to put them outside of the drupal modules and sites directories; Drupal has a habit of finding the backup copies and using them in place of the actual modules.