After creating a group type, I want to add a Group Role

    Warning: reset() expects parameter 1 to be array, string given in EntityAPIControllerExportable->load() (line 692 of /www/sites/all/modules/contrib/entity/includes/entity.controller.inc). Backtrace:

    reset('test_role') entity.controller.inc:692
    EntityAPIControllerExportable->load('test_role', Array) common.inc:7746
    entity_load('group_role', 'test_role', Array) entity.module:159
    entity_load_multiple_by_name('group_role', 'test_role') entity.group_role.inc:19
    group_roles('test_role', Array, Array) form.inc:3550
    form_validate_machine_name(Array, Array, Array) form.inc:1410
    _form_validate(Array, Array) form.inc:1296
    _form_validate(Array, Array, 'group_role_form') form.inc:1134
    drupal_validate_form('group_role_form', Array, Array) form.inc:846
    drupal_process_form('group_role_form', Array, Array) form.inc:374
    drupal_build_form('group_role_form', Array) entity.module:1209
    entity_ui_get_form('group_role', NULL, 'add') 
    call_user_func_array('entity_ui_get_form', Array) menu.inc:517
    menu_execute_active_handler() index.php:21

    Warning: array_flip() expects parameter 1 to be array, string given in EntityAPIControllerExportable->load() (line 705 of /sites/all/modules/contrib/entity/includes/entity.controller.inc). Backtrace:

    array_flip('test_role') entity.controller.inc:705
    EntityAPIControllerExportable->load('test_role', Array) common.inc:7746
    entity_load('group_role', 'test_role', Array) entity.module:159
    entity_load_multiple_by_name('group_role', 'test_role') entity.group_role.inc:19
    group_roles('test_role', Array, Array) form.inc:3550
    form_validate_machine_name(Array, Array, Array) form.inc:1410
    _form_validate(Array, Array) form.inc:1296
    _form_validate(Array, Array, 'group_role_form') form.inc:1134
    drupal_validate_form('group_role_form', Array, Array) form.inc:846
    drupal_process_form('group_role_form', Array, Array) form.inc:374
    drupal_build_form('group_role_form', Array) entity.module:1209
    entity_ui_get_form('group_role', NULL, 'add') 
    call_user_func_array('entity_ui_get_form', Array) menu.inc:517
    menu_execute_active_handler() index.php:21

    Warning: array_flip() expects parameter 1 to be array, string given in EntityAPIController->load() (line 219 of /www/sites/all/modules/contrib/entity/includes/entity.controller.inc). Backtrace:

    array_flip('test_role') entity.controller.inc:219
    EntityAPIController->load('test_role', Array) entity.controller.inc:716
    EntityAPIControllerExportable->load('test_role', Array) common.inc:7746
    entity_load('group_role', 'test_role', Array) entity.module:159
    entity_load_multiple_by_name('group_role', 'test_role') entity.group_role.inc:19
    group_roles('test_role', Array, Array) form.inc:3550
    form_validate_machine_name(Array, Array, Array) form.inc:1410
    _form_validate(Array, Array) form.inc:1296
    _form_validate(Array, Array, 'group_role_form') form.inc:1134
    drupal_validate_form('group_role_form', Array, Array) form.inc:846
    drupal_process_form('group_role_form', Array, Array) form.inc:374
    drupal_build_form('group_role_form', Array) entity.module:1209
    entity_ui_get_form('group_role', NULL, 'add') 
    call_user_func_array('entity_ui_get_form', Array) menu.inc:517
    menu_execute_active_handler() index.php:21

    Warning: reset() expects parameter 1 to be array, string given in EntityAPIControllerExportable->buildQuery() (line 679 of /sites/all/modules/contrib/entity/includes/entity.controller.inc). Backtrace:

    reset('test_role') entity.controller.inc:679
    EntityAPIControllerExportable->buildQuery('test_role', Array, ) entity.controller.inc:186
    EntityAPIController->query('test_role', Array, ) entity.controller.inc:249
    EntityAPIController->load('test_role', Array) entity.controller.inc:716
    EntityAPIControllerExportable->load('test_role', Array) common.inc:7746
    entity_load('group_role', 'test_role', Array) entity.module:159
    entity_load_multiple_by_name('group_role', 'test_role') entity.group_role.inc:19
    group_roles('test_role', Array, Array) form.inc:3550
    form_validate_machine_name(Array, Array, Array) form.inc:1410
    _form_validate(Array, Array) form.inc:1296
    _form_validate(Array, Array, 'group_role_form') form.inc:1134
    drupal_validate_form('group_role_form', Array, Array) form.inc:846
    drupal_process_form('group_role_form', Array, Array) form.inc:374
    drupal_build_form('group_role_form', Array) entity.module:1209
    entity_ui_get_form('group_role', NULL, 'add') 
    call_user_func_array('entity_ui_get_form', Array) menu.inc:517
    menu_execute_active_handler() index.php:21

    Warning: Invalid argument supplied for foreach() in DatabaseCondition->compile() (line 1854 of /www/includes/database/query.inc). Backtrace:

    DatabaseCondition->compile(Object, Object) select.inc:1073
    SelectQuery->compile(Object, Object) select.inc:1203
    SelectQuery->getArguments() select.inc:1263
    SelectQuery->execute() entity.controller.inc:187
    EntityAPIController->query('test_role', Array, ) entity.controller.inc:249
    EntityAPIController->load('test_role', Array) entity.controller.inc:716
    EntityAPIControllerExportable->load('test_role', Array) common.inc:7746
    entity_load('group_role', 'test_role', Array) entity.module:159
    entity_load_multiple_by_name('group_role', 'test_role') entity.group_role.inc:19
    group_roles('test_role', Array, Array) form.inc:3550
    form_validate_machine_name(Array, Array, Array) form.inc:1410
    _form_validate(Array, Array) form.inc:1296
    _form_validate(Array, Array, 'group_role_form') form.inc:1134
    drupal_validate_form('group_role_form', Array, Array) form.inc:846
    drupal_process_form('group_role_form', Array, Array) form.inc:374
    drupal_build_form('group_role_form', Array) entity.module:1209
    entity_ui_get_form('group_role', NULL, 'add') 
    call_user_func_array('entity_ui_get_form', Array) menu.inc:517
    menu_execute_active_handler() index.php:21

    PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: SELECT base.rid AS rid, base.type AS type, base.name AS name, base.label AS label, base.weight AS weight, base.status AS status, base.module AS module FROM {group_role} base WHERE (base.name IN ()) ; Array ( ) in EntityAPIController->query() (line 187 of /sites/all/modules/contrib/entity/includes/entity.controller.inc). Backtrace:

    PDOStatement->execute(Array) database.inc:2168
    DatabaseStatementBase->execute(Array, Array) database.inc:680
    DatabaseConnection->query('SELECT base.rid AS rid, base.type AS type, base.name AS name, base.label AS label, base.weight AS weight, base.status AS status, base.module AS module
    FROM 
    {group_role} base
    WHERE  (base.name IN  ()) ', Array, Array) select.inc:1264
    SelectQuery->execute() entity.controller.inc:187
    EntityAPIController->query('test_role', Array, ) entity.controller.inc:249
    EntityAPIController->load('test_role', Array) entity.controller.inc:716
    EntityAPIControllerExportable->load('test_role', Array) common.inc:7746
    entity_load('group_role', 'test_role', Array) entity.module:159
    entity_load_multiple_by_name('group_role', 'test_role') entity.group_role.inc:19
    group_roles('test_role', Array, Array) form.inc:3550
    form_validate_machine_name(Array, Array, Array) form.inc:1410
    _form_validate(Array, Array) form.inc:1296
    _form_validate(Array, Array, 'group_role_form') form.inc:1134
    drupal_validate_form('group_role_form', Array, Array) form.inc:846
    drupal_process_form('group_role_form', Array, Array) form.inc:374
    drupal_build_form('group_role_form', Array) entity.module:1209
    entity_ui_get_form('group_role', NULL, 'add') 
    call_user_func_array('entity_ui_get_form', Array) menu.inc:517
    menu_execute_active_handler() index.php:21

Comments

kristiaanvandeneynde’s picture

Hey Tim,

Please refer to #1973184-2: Create Group type - Error for an answer.

kristiaanvandeneynde’s picture

Status: Active » Fixed

Fixed in commit 9b427309, thanks for reporting this!

thim’s picture

Status: Fixed » Closed (fixed)

Confirmed!

Issue is fixed

  • Commit 9b42730 on 7.x-1.x, ctools_plugins, inheritance by kristiaanvandeneynde:
    Issue #1973196 by kristiaanvandeneynde, thim: Fixed Create Group role -...