i upgrade my bean module to 7.x-1.1

But there is an error:

Fatal error: Allowed memory size of 262144000 bytes exhausted (tried to allocate 523800 bytes) in
www/myproject/modules/field/field.info.inc on line 712

This problem remains even if I have expanded memory to 512 MB and bigger by doing this:
site/default/settings.php

ini_set('memory_limit', '512M');
CommentFileSizeAuthor
#6 1954126-allowed_memory_size-4.patch387 bytesguillaumev

Comments

damienmckenna’s picture

Category: bug » support
Status: Active » Closed (works as designed)

Your hosting provider might not be allowing the ini_set function, best to check with them. Either way, this isn't a problem of the Bean module.

guillaumev’s picture

Title: Bean module Update error » Allowed memory size exhausted
Status: Closed (works as designed) » Active

I'm not so sure this isn't a problem with the Bean module.

For some reason, every time I create a bean, I get the same error of Allowed memory size exhausted. I raised my memory_limit in php to 1024 M and it still gives the error !

guillaumev’s picture

It seems to be related to the use of the "Title" module: I replaced the title field of my bean type with a title field from the "Title" module and do not get the error anymore...

xiukun.zhou > Do you also have the "Title" module enabled ?

xiukun.zhou’s picture

Hi, guillaumev
I've enabled "title" module

xiukun.zhou’s picture

Thanks guillaumev
my site running when disable title module, but I need to use the title module

guillaumev’s picture

Status: Active » Needs review
StatusFileSize
new387 bytes

Ok here is what was happening, at least for me, with the title module enabled, trying to add a new bean:

  1. bean_form_submit was calling bean->label
  2. bean->label was calling entity_label
  3. entity_label was calling title_entity_label, which was retrieving the title field of the entity
  4. retrieving the title field of the entity caused entity_class_label to be called
  5. entity_class_label called entity_label, therefore entering in an infinite loop

I fixed it with the following patch, removing the call to entity_class_label, but I'm definitely not sure if this has side effects...

xiukun.zhou’s picture

Status: Needs review » Active

Hi guillaumev

this patch not work,

i test bean 7.x-1.1 and 7.x-1.x-dev
my title module version is 7.x-1.0-alpha7+2-dev

guillaumev’s picture

Status: Active » Needs review

Hi xiukun.zhou,

After applying the patch, did you clear the caches on your site ?

inventlogic’s picture

Got this error. I can confirm replacing the default title for the Bean with an entity title field is a fix.

bforchhammer’s picture

I had the same error. Replacing default titles with the title fields works for me as well. Thanks guys! :)

saltednut’s picture

Status: Needs review » Postponed (maintainer needs more info)

I don't think we should be removing the call to entity_class_label - hmm... are you still experiencing issues?

xiukun.zhou’s picture

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

Thanks.
now i've test bean 7.x-1.x-dev and 7.x-1.x, The problem seems to have been fix.