PHP loop when flexifield set to current content type

magnus.ramon - February 24, 2009 - 20:21
Project:Flexifield
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

I'm testing some modules with a quite fresh installation of Drupal 6.9 (no content, but some classic modules included). Now I'm testing some CCK modules, all at once but without dev versions.

My first test was to create a new content type including a Flexifield field. I could just create the field correctly, but when I tried to configure it or tried to create a new content of the new type I've got the old buddy:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 256 bytes) in /home/nrds/public_html/includes/form.inc on line 1318

Needing I'm here to help.

#1

milos.kroulik - March 10, 2009 - 07:58

I have exactly the same problem on shared webhost, where I can use up to 40M memory (which is quite generous for shared host, I think).

#2

leo.ruffini - March 20, 2009 - 08:38

Me too... I'm using the alpha2 version.

#3

leo.ruffini - March 20, 2009 - 09:19

I just discovered what was happening, and it was my mistake.
I was trying to crate a flexi-field for the content type "A" and I was selecting the same "A" content type as field item.

I would suggest not to let choosing the same content type in which you are to avoid this recursive bug.

Leo

#4

tseven - May 2, 2009 - 21:12
Version:6.x-1.0-alpha1» 6.x-1.0-alpha3

I experienced the exact same affect.

Steps needed to reproduce "Memory error":

1. Create new content type. (i.e. "Foo")
2. Create a new flexifield field for Foo.
3. Check "Foo" under "Content types that can be used as field items:"

This will cause the script to loop, exhausting all available memory.

I agree it's "silly mistake" to be made, but can easily be avoided by simply not allowing the user to include the content type.

#5

BWPanda - September 3, 2009 - 00:55
Title:Allowed memory size exhausted» PHP loop when flexifield set to current content type
Version:6.x-1.0-alpha3» 6.x-1.x-dev
Assigned to:magnus.ramon» Anonymous
Status:active» needs review

This was still an issue in the latest alpha5, so here's a patch that fixes it (apply to dev version).

AttachmentSize
flexifield_loop-382718-5.patch 1013 bytes

#6

BWPanda - October 21, 2009 - 13:41

Anyone able to review this?

#7

effulgentsia - October 22, 2009 - 17:04

Hi all, in case anyone here hasn't read my status update on the project page, I wanted to say that I apologize for not having maintained this module well for the past couple months. I've been busy helping out on Drupal 7 core development. The code freeze for that was originally scheduled for 10/15, then extended to 10/19, we hit a snag on a couple important issues, and are now waiting for Dries to announce what is to happen to them. I'm pleased with what everyone has been able to accomplish with Drupal 7 prior to the freeze, and with my small contributions to it. I will be resuming maintenance on flexifield within the next couple days. Thank you for your patience.

#8

BWPanda - October 22, 2009 - 21:58

No problem, thanks for the update!

 
 

Drupal is a registered trademark of Dries Buytaert.