Closed (fixed)
Project:
Finder
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Aug 2009 at 14:11 UTC
Updated:
5 Sep 2009 at 05:20 UTC
Jump to comment: Most recent file
Thanks for your quick responses danielb! I love this module and I'm really excited to use it on my latest project.
One more quick bug I found in the latest version. The views are truncated to 10 items no matter what the pager value is set to.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | finder_views.module.patch | 553 bytes | cchan |
Comments
Comment #1
marcrobinsone commented@chromix, thanks for posting this one.
I also encounter this issue under the following circumstances:
* Finder results pager set to 0 (hoping to control the pager via views 2)
* Setting the views pager does not override the Finder results pager, and instead defaults to 10 items in the search results.
I don't know if getting this fixed will conflict with views or the core Finder results code.
Comment #2
chromix commented@marcrobinsone
It looks like Finder isn't properly setting the items_per_page but I can't seem to figure out why. All I can see is that 10 is the default set for 'items_per_page' in 'views_plugin_display.inc'.
Comment #3
danielb commentedI think I understand the problem, it has to do with how finder_views passes on the query results to the results output functions, but I'll need to play around with it a bit to see what works.
Comment #4
danielb commentedThis problem only affects the case where you're using the 'output display' - it seems to set the output display to 10 despite what you configure it to in views. You are probably right that this default is coming from views_display_plugin.inc - but why isn't it picking up on the settings from views??
Comment #5
chromix commentedI should note that even when I try to set the number of nodes manually in the Finder settings (like to "0" let's say) it *still* displays 10 items. In fact, I can't get it to display anything other than 10 items, even when I set the items per page to something like 20 or 30. Very odd...
Comment #6
danielb commentedI can get it to display between 1 and 9 items per page by setting the finder's pager. It's number higher than 10, and 0, that don't work for me.
Comment #7
danielb commentedI'm attempting to get some advice about this from the Views issue queue http://drupal.org/node/541296
It would be easy for me to force the finder's pager onto the output display - but I think it would be better if it used the settings from the views UI.
Comment #8
cchan commentedsubscribing.
Comment #9
cchan commentedI found a fix for this problem. The issue was in the modules/finder_views.module finder_views_finder_result function which functions properly except for when there are overrides to the default view. When creating a view, it's necessary to call the function view::preview() or view::execute_display(). See views issue #279925: views and custom_pagers works strange (view->execute) for more information.
I simply added $view->preview() to the end of the function and it works on my test instance. Snippet of the code:
I tried it on other finder views and wasn't able to find any errors, so hopefully this works. I have attached a patch, so it'd be great if someone could try it out. Hope this works.
Comment #10
danielb commentedoh cool
Comment #11
danielb commented