I created a node with node hiearchy enabled. When I try and edit it, I'm getting an error message that my memory limit has been exceeded:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1682 bytes) in ...nodehierarchy.module on line 1036.

I've increased the memory to 64M but still get the message. I've been using nodehierarchy for a while and haven't had this problem on other nodes I've created. Anyone else have this?

Comments

dman’s picture

Have you created a loop?

freatida’s picture

I haven't changed the module code. Can't think where I could've created a loop. All I've done is create a cck node and I get the error when I try and edit it. When I disable node hierarchy for that cck type and try editing the node again the error goes away.

dman’s picture

I'm just guessing that with hierarchy, setting a node to be its own grandfather may create unpredicted recursion, and max something out.
Common problem with linked lists.
Just a guess tho.

wellsy’s picture

I am also getting this Fatal Error message. I have just moved my existing install to a new server. I updated my existing site to 6.8 and exported the database. Installed a fresh install of 6.8 on the new server tested it and all running fine. Imported the database from my existing site and loads of images etc required by the site. Then, on trying to edit some....not all nodes I get

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 41 bytes) in /home/orchidso/public_html/includes/menu.inc on line 969

When I set the memory limit to 64MB it produced the same error but with a much greater amount in the (tried to allocate 41 bytes) area. I will reproduce that error soon and post again.

Thanks in advance for any help!

EDIT: oops I did not notice that this discussion was specific to a particular module....sorry to waste your time. I will post this as a separate issue.

ataxia’s picture

Silly question, but did you restart apache after you increased the limit? (if you are running on apache, that is)

I have been running into the same issue (not with Node Hierarchy) when I have Devel running and try to do certain things. For example, I added a new block and got a similar error regarding page.tpl.php (which is where the block was trying to go) when I tried to save the Blocks page.

I'm assuming that Node Heirarchy is impacting the menus in a similar way, so if you have Devel running, try disabling it and then turning it back on after you have made your changes.

freatida’s picture

I don't have devel running. The error went away for a while but it's back now. It happens whenever I create and then try and edit a page (doesn't happen with other content types). I don't give the page any node hierarchy settings. And ideas? Thanks.

freatida’s picture

I think I've localised the problem somewhat.

I was getting this error when updating nodes:
"Unknown column 'n.nid' in 'on clause' query: SELECT * FROM node n, nodehierarchy h LEFT JOIN i18n_node i18n..."

After reading this thread http://drupal.org/node/78699 - and the last comment in particular - I corrected line 1032 of nodehierarchy.module and put brackets round everything between FROM and WHERE. This made the error go away.

But I think it's what's creating the memory limit error, because when I change the nodehierarchy.module code back again, the memory error goes away (but the "Unknown column n.nid" error comes back.

Does anyone else have this?

freatida’s picture

Title: Exceeding memory limit - keep increasing memory makes no difference » Unknown column 'n.nid' error, using nodehierarchy with i18n
ronan’s picture

Status: Active » Closed (duplicate)

The SQL issue stems from a bug in the module where it wasn't compatible with MySQL 5 when combined with any module that altered sql (i18n in your case). Please try the latest dev and let me know if it works now. More information can be found at: #336993 and #341846

Change the status back to active if this turns out to be a red herring.

R

freatida’s picture

ok I'll try that, thanks.

freatida’s picture

Status: Closed (duplicate) » Active

I've installed the latest dev version, but am getting the fatal error again now when I try and edit pages.

freatida’s picture

Title: Unknown column 'n.nid' error, using nodehierarchy with i18n » Fatal error: Allowed memory size of 33554432 bytes exhausted ...nodehierarchy.module on line 1056

Just to be clear:
Fatal error: Allowed memory size of 33554432 bytes exhausted ...nodehierarchy.module on line 1056
This is the message I now get using the latest dev version.
Is noone else experiencing the same problem?
It basically means I can no longer edit any nodes on my site, which is causing lots of problems. Increasing the memory doesn't make any difference.
Thanks for your help.

oliverpolden’s picture

Subscribing. I'm getting a similar if not the same problem. Unless I'm admin i.e. user 1, I can't edit nodes. At first glance in the database it appears the same query is showing, on closer inspection it's running a very similar query over and over where the parent id and possibly other variables ahem... vary. So my idea is that the php is in a loop making multiple database queries. Running one of these queries returns an empty set but I'm not sure if this is the case for every query.

scroogie’s picture

Is this problem still existant?

freatida’s picture

Still exists for me, yes.

dgorton’s picture

Status: Active » Closed (fixed)

Closing as is very old issue w/ very old code. Open a new issue if needed, plz!