Closed (fixed)
Project:
Autocomplete Node Finder
Version:
6.x-2.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2008 at 06:43 UTC
Updated:
13 Dec 2008 at 03:51 UTC
Just a few small fixes as mentioned in:
#316779: Why need I hit enter twice?
Namely:
1) The page callback autocomplete_node_finder_block_form_results($delta) is printing its output directly rather then just returning it, so results pages aren't coming back in a fully theme'd page.
2) Supply necessary globals to theme_pager for pager output to show
3) Add JS via drupal_add_js so IE doesn't show JS errors if it's loaded too soon.
Let me know if you have any questions. :)
| Comment | File | Size | Author |
|---|---|---|---|
| autocomplete_node_finder_fixes.patch | 1.38 KB | Moonshine |
Comments
Comment #1
danielb commentedAre you sure the drupal_add_js works? I tried that and it never worked for me...
Comment #2
danielb commentedAlso I would rather not use globals... what do you need them for? You should already have access to all that information.
Comment #3
Moonshine commentedThe drupal_add_js is working fine here. Maybe you added it via "module" instead of "core" or a different path? not sure, but give it a try. If it doesn't work then we have some voodoo to hunt down :)
The globals are just a fact of life when using theme_pager. You'll see it uses them to pick up a couple values in the initial definitions. Normally they are just set by pager_query:
http://api.drupal.org/api/function/theme_pager/6
Comment #4
danielb commentedah of course, without the pager query itself we have to manually set it... ok I will get onto this soon. Better get this module right before I start porting code over to my new framework, and with your interest in the code now it is a good time to do this.
Comment #5
danielb commentedI was wondering why you did the globals differently to how pager_query does it?
What do you think of this?
Comment #6
Moonshine commentedThat should be fine... I just literally included the two globals that theme_pager makes use of. Adding pager_total_items certainly won't hurt, it just isn't used by the theme call. But for sake of completeness...
Comment #7
danielb commentedCheers, the latest release has these changes.
Comment #8
danielb commentedAlright mate thanks for that, I'll mark as fix to coincide with the new release. If you have another feature/fix to talk about, we can start a new issue.