When checking out the latest GIT version (today 17/04 at 22:00), I get the following error when trying to add a Group Type

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

    reset('marco') entity.controller.inc:692
    EntityAPIControllerExportable->load('marco', Array) common.inc:7746
    entity_load('group_type', 'marco', Array) entity.module:159
    entity_load_multiple_by_name('group_type', 'marco') entity.group_type.inc:19
    group_types('marco', 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_type_form') form.inc:1134
    drupal_validate_form('group_type_form', Array, Array) form.inc:846
    drupal_process_form('group_type_form', Array, Array) form.inc:374
    drupal_build_form('group_type_form', Array) entity.module:1209
    entity_ui_get_form('group_type', 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('marco') entity.controller.inc:705
    EntityAPIControllerExportable->load('marco', Array) common.inc:7746
    entity_load('group_type', 'marco', Array) entity.module:159
    entity_load_multiple_by_name('group_type', 'marco') entity.group_type.inc:19
    group_types('marco', 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_type_form') form.inc:1134
    drupal_validate_form('group_type_form', Array, Array) form.inc:846
    drupal_process_form('group_type_form', Array, Array) form.inc:374
    drupal_build_form('group_type_form', Array) entity.module:1209
    entity_ui_get_form('group_type', 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 /sites/all/modules/contrib/entity/includes/entity.controller.inc). Backtrace:

    array_flip('marco') entity.controller.inc:219
    EntityAPIController->load('marco', Array) entity.controller.inc:716
    EntityAPIControllerExportable->load('marco', Array) common.inc:7746
    entity_load('group_type', 'marco', Array) entity.module:159
    entity_load_multiple_by_name('group_type', 'marco') entity.group_type.inc:19
    group_types('marco', 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_type_form') form.inc:1134
    drupal_validate_form('group_type_form', Array, Array) form.inc:846
    drupal_process_form('group_type_form', Array, Array) form.inc:374
    drupal_build_form('group_type_form', Array) entity.module:1209
    entity_ui_get_form('group_type', 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('marco') entity.controller.inc:679
    EntityAPIControllerExportable->buildQuery('marco', Array, ) entity.controller.inc:186
    EntityAPIController->query('marco', Array, ) entity.controller.inc:249
    EntityAPIController->load('marco', Array) entity.controller.inc:716
    EntityAPIControllerExportable->load('marco', Array) common.inc:7746
    entity_load('group_type', 'marco', Array) entity.module:159
    entity_load_multiple_by_name('group_type', 'marco') entity.group_type.inc:19
    group_types('marco', 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_type_form') form.inc:1134
    drupal_validate_form('group_type_form', Array, Array) form.inc:846
    drupal_process_form('group_type_form', Array, Array) form.inc:374
    drupal_build_form('group_type_form', Array) entity.module:1209
    entity_ui_get_form('group_type', 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('marco', Array, ) entity.controller.inc:249
    EntityAPIController->load('marco', Array) entity.controller.inc:716
    EntityAPIControllerExportable->load('marco', Array) common.inc:7746
    entity_load('group_type', 'marco', Array) entity.module:159
    entity_load_multiple_by_name('group_type', 'marco') entity.group_type.inc:19
    group_types('marco', 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_type_form') form.inc:1134
    drupal_validate_form('group_type_form', Array, Array) form.inc:846
    drupal_process_form('group_type_form', Array, Array) form.inc:374
    drupal_build_form('group_type_form', Array) entity.module:1209
    entity_ui_get_form('group_type', 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.tid AS tid, base.name AS name, base.label AS label, base.weight AS weight, base.status AS status, base.module AS module FROM {group_type} base WHERE (base.name IN ()) ; Array ( ) in EntityAPIController->query() (line 187 of /www/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.tid AS tid, base.name AS name, base.label AS label, base.weight AS weight, base.status AS status, base.module AS module
    FROM 
    {group_type} base
    WHERE  (base.name IN  ()) ', Array, Array) select.inc:1264
    SelectQuery->execute() entity.controller.inc:187
    EntityAPIController->query('marco', Array, ) entity.controller.inc:249
    EntityAPIController->load('marco', Array) entity.controller.inc:716
    EntityAPIControllerExportable->load('marco', Array) common.inc:7746
    entity_load('group_type', 'marco', Array) entity.module:159
    entity_load_multiple_by_name('group_type', 'marco') entity.group_type.inc:19
    group_types('marco', 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_type_form') form.inc:1134
    drupal_validate_form('group_type_form', Array, Array) form.inc:846
    drupal_process_form('group_type_form', Array, Array) form.inc:374
    drupal_build_form('group_type_form', Array) entity.module:1209
    entity_ui_get_form('group_type', NULL, 'add') 
    call_user_func_array('entity_ui_get_form', Array) menu.inc:517
    menu_execute_active_handler() index.php:21

Comments

thim’s picture

I'll create a Type manual in the DB to allow me to continue testing

kristiaanvandeneynde’s picture

Hey Tim,

I've committed some major overhauls today, so that may be causing this issue.
I'll have a look at the errors you reported in #1973184: Create Group type - Error and #1973196: Create Group role - Error first thing in the morning.

Thanks for checking out the module already, but keep in mind we have purposely not released any alpha version yet because the code is still being refactored quite frequently. So don't update, but always reinstall the module.

If you like what you see and have any suggestions, feel free to open issues for them.

thim’s picture

Hey Kristiaan,

I like the way this module is setup and it's purpose >> to provide a clear, compact (yet complete) way to group entities.

In my case, I want to use it for to group customers/users for a Drupal Commerce project and have fields attached to it. Roles is in that perspective way too limited since you can not extend them without hacking in to them. Looked into Organic Groups but this is way to extended and overshoots my aim.

Your setup with the usage of entities and fieldable types, attached to roles is the way forward.

I need it rather urgent, so if I can help let me know.
I'm missing a bit of a roadmap so I know what you want to build and perhaps I can jump in to speed up somethings?

Regards,
Tim

thim’s picture

Perhaps if you could describe the feature requests as seperate user stories, I could assist on working on it the coming days.

kristiaanvandeneynde’s picture

Status: Active » Fixed

Fixed in commit 91e0c124, thanks for reporting this!

I'll post a [meta] issue today outlining the roadmap for this project.

thim’s picture

Status: Fixed » Closed (fixed)

Confirmed!

Issue is fixed

thim’s picture

Issue summary: View changes

Removed references to local DEV setup

  • Commit 91e0c12 on 7.x-1.x, ctools_plugins, inheritance by kristiaanvandeneynde:
    Issue #1973184 by kristiaanvandeneynde, thim: Fixed Create Group type -...