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

danielb’s picture

The 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.

danielb’s picture

Status: Active » Fixed

This has been fixed in the newest versions!

aquad’s picture

Status: Fixed » Active

I tried the latest version for D5 -> 5.x-3.1 but it does not work, maybe only fixed for the 6.0+ versions?

danielb’s picture

err... do you mean 3.3 ??

danielb’s picture

Status: Active » Postponed (maintainer needs more info)
danielb’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Feel 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.

doomed’s picture

Version: 5.x-3.1 » 5.x-3.4
Status: Closed (fixed) » Active

Hello,

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).

danielb’s picture

OK I will do some testing of the results pages soon.

danielb’s picture

Status: Active » Fixed

It seems a recent patch was done against the wrong revision causing these problems to come back. Please try latest version.

doomed’s picture

Daniel, you're on a roll!

I can confirm that the error message doesnt come up anymore on the new v5.3.7 .

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.