Hello,
Each time i set the 'Default number of results per page:' option in a block to something else then the default '0' and i load the page with the search results i get a:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 39 bytes) in C:\xampp\htdocs\bh\apo\drupal\includes\database.mysql.inc on line 235
When it reset the option to 'o' and i do a search it will give me all 50+ results. (When i set it to '4' for example, i get the out of memory error)
What can be the problem?
Comments
Comment #1
danielb commentedThe pager query in the theme function theme_autocomplete_node_finder_results_page sucks and works like this
say you have these 6 result nids: 35, 45, 55, 65, 75, 85
and you have a pager with 3 per page
it actually does this
pager_query("SELECT * from {node} WHERE nid IN (35, 45, 55, 65, 75, 85)", 3, $delta, $count_sql);
so if you have a lot of possible results it will just keep stringing them on into that query
I am stupid - there is no reason to even do a query here, since we know what the results are, we could just pull the right range of results out of the array.
I will get back to you on this.
Comment #2
danielb commentedThis has been fixed in the newest versions!
Comment #3
aquad commentedI tried the latest version for D5 -> 5.x-3.1 but it does not work, maybe only fixed for the 6.0+ versions?
Comment #4
danielb commentederr... do you mean 3.3 ??
Comment #5
danielb commentedComment #6
danielb commentedFeel free to reopen this if you are still experiencing this problem with the latest releases. Just to clarify the releases 5.x-3.1 and 5.x-3.3 are compatible versions. The 5.x means it will work on Drupal 5, and the -3 means it is the same branch of code. The .1 and .3 are the different revisions, .1 was the buggy version, .3 has the fix - so it's 5.x-3.3 that you'll need.
Comment #7
doomed commentedHello,
I'm opening this again, because i'm experiencing a similar problem, just the message is different:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4194304 bytes) in C:\xampp\htdocs\drupal5\sites\all\modules\autocomplete_node_finder\autocomplete_node_finder.module on line 1186
As the OP said, this happens when we change "Default number of results per page" to other than zero (the default).
Version 5.3.4 (latest so far).
Comment #8
danielb commentedOK I will do some testing of the results pages soon.
Comment #9
danielb commentedIt seems a recent patch was done against the wrong revision causing these problems to come back. Please try latest version.
Comment #10
doomed commentedDaniel, you're on a roll!
I can confirm that the error message doesnt come up anymore on the new v5.3.7 .