Hi,

When I return from creating a response in LS, I am seeing this error message:

Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 219 of /srv/bindings/67a9c33dcebd4abdaef9bf8c3db49f0d/code/sites/all/modules/entity/includes/entity.controller.inc).

It appears to occur just before updating the token and/or before creating an answer.

Any ideas?

Thanks.

CommentFileSizeAuthor
#2 limesurvey_sync-2834901-2.patch514 bytespifagor
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jsibley created an issue. See original summary.

pifagor’s picture

Status: Active » Needs review
FileSize
514 bytes

patch

jsibley’s picture

Thank you for responding so quickly, pifagor.

Unfortunately, the problem seems to continue. I'm wondering if it might have to do with the customizable entities module, or with how that is called. Here is some backtrace information. Perhaps you understand this better than I do:

[Inspect trace - i:1 - limit:5|depth:2]|truncate:1000]
Backtrace
file: document_root/sites/all/modules/entity/includes/entity.controller.inc
line: 220
function: inspect_trace()
0 - - - - - - - - - - - - - - - - - - - - - - - - -
file: document_root/sites/all/modules/entity/includes/entity.controller.inc
line: 732
method: (EntityAPIController)->load
args (2): 
  (array:0) [
  ]
  (array:0) [
  ]
1 - - - - - - - - - - - - - - - - - - - - - - - - -
file: document_root/sites/all/modules/customizable_entities/includes/customizable_entities.controller.inc
line: 120
method: (EntityAPIControllerExportable)->load
args (2): 
  (array:0) [
  ]
  (array:0) [
  ]
2 - - - - - - - - - - - - - - - - - - - - - - - - -
file: document_root/sites/all/modules/limesurvey_sync/api/limesurvey_sync_api.class.inc
line: 941
method: (CustomizableEntitiesEntityController)->load
args (2): 
  (array:0) [
  ]
  (array:0) [
  ]
3 - - - - - - - - - - - - - - - - - - - - - - - - -
file: document_root/includes/common.inc
line: 8022
method: (LimesurveySyncController)->load
args (2): 
  (array:0) [
  ]
  (array:0) [
  ]
4 - - - - - - - - - - - - - - - - - - - - - - - - -
file: document_root/sites/all/modules/entity/entity.module
line: 259
function: entity_load
args (3): 
  (string:22|22) `limesurvey_sync_survey`
  (array:0) [
  ]
  (array:0) [
  ]

Does that help at all?

Thanks.

jsibley’s picture

Still trying to figure this out. Here is a backtrace from the pbt module:

Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 220 of /srv/bindings/67a9c33dcebd4abdaef9bf8c3db49f0d/code/sites/all/modules/entity/includes/entity.controller.inc). Backtrace:
array_flip(Array) entity.controller.inc:220
EntityAPIController->load(Array, Array) entity.controller.inc:734
EntityAPIControllerExportable->load(Array, Array) customizable_entities.controller.inc:120
CustomizableEntitiesEntityController->load(Array, Array) limesurvey_sync_api.class.inc:963
LimesurveySyncController->load(Array, Array) limesurvey_sync_token.class.inc:616
LimesurveySyncControllerToken->load(Array, Array) common.inc:8022
entity_load('limesurvey_sync_token_763688', Array) entity.module:235
entity_load_single('limesurvey_sync_token_763688', ) limesurvey_sync_api.class.inc:1342
limessurvey_sync_api_update_dp_sync_fields('limesurvey_sync_answer_763688', Object) limesurvey_sync_api.class.inc:1011
LimesurveySyncController->save(Object) entity.inc:333
Entity->save() entity.module:287
entity_save('limesurvey_sync_answer_763688', Object) limesurvey_sync_invitation.back.inc:72
limesurvey_sync_invitation_back_from_ls(Object, 'krpyzsdp7pvdphs') 
call_user_func_array('limesurvey_sync_invitation_back_…', Array) menu.inc:527

It seems to me that the load in customizable_entitities.controller.inc is called with $IDS = 0 (String, 32 characters ) conversational_capacity_160910_f
and load around line 734 (the numbers will have changed from the original files due to my logging calls) of entity.controller.inc is called with $IDS = 0 (String, 32 characters ) conversational_capacity_160910_f
but load around line 203 of entity.controller.inc is called with $IDS that is an empty array.

if $IDS is empty, then array_flip is going to give an error.

I'm hoping that someone who understands the code and PHP better than I do can see where the problem is coming from.

Many thanks for any ideas.

jsibley’s picture

I moved to a different server for my drupal app as well as for the limequery app and the problem seems to have gone away. I'm not sure why, but it's no longer a problem for me.

thedut’s picture

Status: Needs review » Closed (cannot reproduce)

Hello I'm glad this is solved for you.
Unfortunatelly I'm not able to reproduce this issue. Feel free to reopen it.