Hi,

I'm using views version 1.141
views bonus version 1.5.2.5

I created a view with the grid view and I supplied and argument so that the view would show pictures added by a specific user.

It works really great for example here :
http://www.monchien.info/user/100/photos

I simply added the field image with the size I wanted and that's about it.

Then, I create a second view which is exactly like the first one but for all pictures, ordered by creation time.

Well, the view does not work at all. I tried several times, I even cloned the first one and simply removed the argument part, and no picture is showing at all.

Note that on the second non working view, the pager shows more than 100 pages, which would mean that he has some info, but it does not display the images! This is weird, why would the first view work and not the second one??

Here is the code for the view that works and the other one that does not:

so the first one that actually shows the images:

$view = new stdClass();
$view->name = 'photos_user';
$view->description = '';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'L\'album photo personnel de : %1';
$view->page_header = '';
$view->page_header_format = '5';
$view->page_footer = '';
$view->page_footer_format = '5';
$view->page_empty = '';
$view->page_empty_format = '5';
$view->page_type = 'bonus_grid';
$view->url = 'user/$arg/photos';
$view->use_pager = TRUE;
$view->nodes_per_page = '20';
$view->sort = array (
array (
'tablename' => 'node',
'field' => 'created',
'sortorder' => 'DESC',
'options' => '',
),
);
$view->argument = array (
array (
'type' => 'uid',
'argdefault' => '1',
'title' => '',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
array (
'tablename' => 'image',
'field' => 'nid',
'label' => '',
'handler' => 'image_views_handler_image_img_link',
'options' => 'Articles',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'image',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node, image);
$views[$view->name] = $view;

****
you can see it here :
http://www.monchien.info/user/275/photos

NOW FOR THE VIEW THAT DOES NOT WORK:

$view = new stdClass();
$view->name = 'photos_recentes';
$view->description = '';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Photos récentes sur le site';
$view->page_header = '';
$view->page_header_format = '5';
$view->page_footer = '';
$view->page_footer_format = '5';
$view->page_empty = '';
$view->page_empty_format = '5';
$view->page_type = 'bonus_grid';
$view->url = 'photos_recentes';
$view->use_pager = TRUE;
$view->nodes_per_page = '20';
$view->sort = array (
array (
'tablename' => 'node',
'field' => 'created',
'sortorder' => 'DESC',
'options' => '',
),
);
$view->argument = array (
);
$view->field = array (
array (
'tablename' => 'image',
'field' => 'nid',
'label' => '',
'handler' => 'image_views_handler_image_img_link',
'options' => 'Articles',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'image',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node, image);
$views[$view->name] = $view;

You can have a look at the view here :

http://www.monchien.info/photos_recentes

******************************************************************

So as you can see, the second view is really like the first one but it does not display the images. But still the first view does.

some theories :

1) grid view works only on one view at a time
2) image field does not work for all view (buggy?)
3) grid and image views work only with arguments enabled?
4) problem with views module and it's interaction with bonus pack?

I'll setup a test mirror for my site and update views module and bonus pack to test.. but with the number of different versions of views out there, I'm quite confused.

Thanks for any comments/suggestions to find out what te problem is!

Patchak

Comments

merlinofchaos’s picture

When I click on these links they all seem to work -- did you figure out what your problem was? I'd really like to know, because this one is confusing me.

patchak’s picture

Category: bug » feature

Hi merlin...

I'm so sorry I forgot to come back here and post results..Well turns out that my partner hacked the code of the grid view so we could have only 2 pics in the grid and not 4.

He says he replaced every mention of "4" to "2". The funny thing is that doing that, created the bug where there was only the first created view that would display and not the others. We recreated this "bug" on another test site, so I can confirm that the first grid view will work but not the others, if you change manually the number of pics that are in the grid... Strange huh?

I guess I could turn this into a feature request, to simply be able to select the number of pics we want in a grid? Sometimes it's nicer to hae two pics in a row but bigger pics....

So I'll turn this into a feature request and hopefully the person who coded this at the start will see it?

What do you think?

Thanks

merlinofchaos’s picture

Status: Active » Fixed

In fact the most recent commit to the bonus pack makes it optional (though due to the way plugins work, it is difficult to set options, you have to set them via the PHP Arguments code field).

patchak’s picture

Hmmm, not sure I follow you.

How could I create a 3 pics grid for example?

Thanks

Anonymous’s picture

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

Status: Closed (fixed) » Active

I'd love to know this too?

patchak’s picture

Check out on the views bonus pack tab on the settings/views page. There is an example on how to do it.

csc4’s picture

Thanks.

csc4’s picture

Except - I don't have admin/settings/views? is it not in 4.7?

patchak’s picture

The settings page for views... it's at admin/views sorry about that

neclimdul’s picture

Status: Active » Closed (fixed)

think this is played out. furthermore, 4.7 is no longer maintained.