I installed -1.x version to start with but didnt get to far since it failed as soon as i added a Group node. so i updated to 2.x-dev

i ran update script which failed (which i think is reason for this).

i can now create group nodes.. :)

but when i try to enable og access module i get this error:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'group_type' in 'where clause': SELECT ogr.rid AS rid, ogr.name AS name FROM {og_role} ogr WHERE (group_type = :db_condition_placeholder_0) AND (group_bundle = :db_condition_placeholder_1) AND (gid = :db_condition_placeholder_2) ; Array ( [:db_condition_placeholder_0] => [:db_condition_placeholder_1] => [:db_condition_placeholder_2] => 0 ) in og_roles() (line 2260 of E:\wamp\www\boma\sites\all\modules\extended\og\og.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

liquidcms’s picture

i re-ran updates and this time it seemed to go ok. and i can see the group_type column has been added to the og_role table.

and sure enough i can now enable the og access module although when i rebuild permissions i get this warning:

Organic groups or one of its modules needs to migrate data.

which of course means nothing (making it a pretty useless msg).

so possibly my inital issue is closed; although likely still a bug here since it errorred out the first time update was run.

liquidcms’s picture

ok.. eventually i got a msg saying i needed to enable the og migrate module.. did that and then clicked link to migrate data.. selected all the items and tried to do migrate... new error:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=17&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_og_group_ref0.og_group_ref_gid' in 'where clause': SELECT COUNT(*) AS expression FROM (SELECT DISTINCT field_data_og_group_ref0.entity_type AS entity_type, field_data_og_group_ref0.entity_id AS entity_id, field_data_og_group_ref0.revision_id AS revision_id, field_data_og_group_ref0.bundle AS bundle, 1 AS expression FROM {field_data_og_group_ref} field_data_og_group_ref0 WHERE (field_data_og_group_ref0.og_group_ref_gid >= :db_condition_placeholder_0) AND (field_data_og_group_ref0.deleted = :db_condition_placeholder_1) ) subquery; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 0 ) in field_sql_storage_field_storage_query() (line 577 of E:\wamp\www\boma\modules\field\modules\field_sql_storage\field_sql_storage.module).

really not looking like OG ready for D7 yet. a bit scary as we are a year into D7 now.

perhaps the path from 1.x to 2.x just isnt there? perhaps if i wipe everything and start over with fresh 2.x install? will try that next. had high hopes from rumors that D7 OG was much simpler than D6.. not seeing it yet.

liquidcms’s picture

so i wiped everything and started with a fresh install of 2.x-dev... seemed to get bit further.

created a group.

went to edit the group and:

EntityMetadataWrapperException: Unknown data property group_group. in EntityStructureWrapper->getPropertyInfo() (line 339 of E:\wamp\www\boma\sites\all\modules\contrib\gov_optional\entity\includes\entity.wrapper.inc).

so i think safe to say 2.x branch is not working yet.. which is likely why still in -dev.

a little reluctant to go back to 1.x; but not sure any choice

liquidcms’s picture

comment deleted

liquidcms’s picture

and same issue with 1.3 rev... i get exception error above when i try to edit an og group node
so would seem OG doesn't work in D7.. hmm.. i am sure that's not possible since i think there are D7 OG sites out there....

liquidcms’s picture

actually the error in #3 occurs on initial node save. and occurs with 1.3 or latest 1.x

perhaps i'll try a clean minimal D7 install... frustrating!!

amitaibu’s picture

> perhaps i'll try a clean minimal D7 install...

Please do.

amitaibu’s picture

Organic groups or one of its modules needs to migrate data.

which of course means nothing (making it a pretty useless msg).

I've improved the message.

tomogden’s picture

I got the exact same set of errors updating from a patched version of 1.3. Going to a clean install is not an option for me, and this was a major crash. I was able to extract this OG version by:

  1. Replacing it with OG 1.3.
  2. Replacing all the OG database tables with a backup.
  3. Commenting out $properties['entity_type'] in the og.info.inc (temporarily).
  4. Clearing ALL the caches.
  5. Deleting the persistent variable og_needs_migrate.

I was trying to implement an issue solution from #1101102-28: Count functionality in OG 7 is not obvious or intuitive. I'll see if I can make a patch instead.

lcasassa’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha1

I have a drupal 7 with og 1.3 and I want to update to 2.0. To get rid of the "Unknown column 'group_type'" follow this instructions:

Install and enable Entity reference and Views Bulk Operations
Disable all og modules except for the og.
Install og 7.x-2.0-alpha1
Update database in admin/reports/status
Enable og migrate

And the error is gone :)

But I get other errors when migrating the data in admin/config/group/group-migrate

Hubo un error HTTP AJAX. Código de Resultado HTTP: 500 A continuación se detalla la información de depuración. Ruta: /batch?id=74&op=do StatusText: Service unavailable (with message) ResponseText: EntityFieldQueryException: Campo desconocido: og_group_ref en EntityFieldQuery->addFieldCondition() (línea 767 de /home3/lincl/public_html/dev.cbrisas.lin.cl/includes/entity.inc).

If I go migrating one by one, I get:
Hubo un error HTTP AJAX. Código de Resultado HTTP: 500 A continuación se detalla la información de depuración. Ruta: /batch?id=72&op=do StatusText: Service unavailable (with message) ResponseText: FieldException: Attempt to create a field with no type. en field_create_field() (línea 63 de /home3/lincl/public_html/dev.cbrisas.lin.cl/modules/field/field.crud.inc).

Regards.

dmeigs’s picture

I've experienced the same problem upgrading from 1.3 to 2.0. OG Migrate has four steps:

  • Upgrade OG Membership - Executed but Failed.
  • Add per-bundle OG roles - Executed successfully.
  • Update user roles - Executed successfully.
  • Group membership - Executed but Failed.

Upgrade OG Membership gives me:

Path: /drupal/batch?id=135&op=do StatusText: Service unavailable (with message) ResponseText: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7501 of /nfs/users/challengefc/public_html/challengefc.org/drupal/includes/common.inc).

Group membership gives me:

Path: /drupal/batch?id=136&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_og_group_ref0.og_group_ref_gid' in 'where clause': SELECT COUNT(*) AS expression FROM (SELECT DISTINCT field_data_og_group_ref0.entity_type AS entity_type, field_data_og_group_ref0.entity_id AS entity_id, field_data_og_group_ref0.revision_id AS revision_id, field_data_og_group_ref0.bundle AS bundle, 1 AS expression FROM {field_data_og_group_ref} field_data_og_group_ref0 WHERE (field_data_og_group_ref0.og_group_ref_gid >= :db_condition_placeholder_0) AND (field_data_og_group_ref0.deleted = :db_condition_placeholder_1) ) subquery; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 0 ) in field_sql_storage_field_storage_query() (line 577 of /nfs/users/challengefc/public_html/challengefc.org/drupal/modules/field/modules/field_sql_storage/field_sql_storage.module).

Should I go back to 1.3, or is there a path forward?

Cheers.

amitaibu’s picture

If you guys can attacha db dump, with everything not related to OG disabled, I can check it on my local.

dmeigs’s picture

Here's a database dump after disabling all of the modules I could.

amitaibu’s picture

Version: 7.x-2.0-alpha1 » 7.x-2.x-dev
Priority: Critical » Major
Status: Active » Fixed

@dmeigs,
Thank you. I was able to fix some of the code in og_7200_og_membership(), and I was able to migrate OG. Please get latest -dev from git, and re-try migrate, and verify all was migrated properly.

dmeigs’s picture

Thanks for working on this.

I installed the latest dev from git, ran update.php, and got the following error:

Fatal error: Call to undefined function og_field_property_callback() in /nfs/users/challengefc/public_html/challengefc.org/drupal/sites/all/modules/entity/modules/field.info.inc on line 30

That's with entity version 7.x-1.0-rc1+42-dev

--Dan

amitaibu’s picture

Did you cache clear?

dmeigs’s picture

No, I couldn't cache clear. My site responded with a fatal error, so I couldn't do it that way, and my drush configuration is not working for reasons I can't fathom. Sorry.

Perhaps over the weekend I can take another shot at it.

liquidcms’s picture

@dmeigs just a thought to easily clear cache, simply empty the cache_ tables

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

robertwb’s picture

I believe that this issue still persists. I am starting from a clean Drupal7.12 install - running the most recent dev versions of OG, and entity API. I have cleared cache and run the update.php script many times, however, the OG Migrate scripts fail on the update for "Group membership" with:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /d/?q=batch&render=overlay&id=27&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42703]: Undefined column: 7 ERROR: column field_data_og_group_ref0.og_group_ref_gid does not exist LINE 6: WHERE (field_data_og_group_ref0.og_group_ref_gid >= '1') AN... ^: SELECT COUNT(*) AS expression FROM (SELECT DISTINCT field_data_og_group_ref0.entity_type AS entity_type, field_data_og_group_ref0.entity_id AS entity_id, field_data_og_group_ref0.revision_id AS revision_id, field_data_og_group_ref0.bundle AS bundle, 1 AS expression FROM {field_data_og_group_ref} field_data_og_group_ref0 WHERE (field_data_og_group_ref0.og_group_ref_gid >= :db_condition_placeholder_0) AND (field_data_og_group_ref0.deleted = :db_condition_placeholder_1) ) subquery; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 0 ) in field_sql_storage_field_storage_query() (line 577 of /var/www/html/d/modules/field/modules/field_sql_storage/field_sql_storage.module).

I have checked the table in the Drupal db, and indeed, the column in question does not exist:

         Column         |          Type          |               Modifiers
------------------------+------------------------+----------------------------------------
 entity_type            | character varying(128) | not null default ''::character varying
 bundle                 | character varying(128) | not null default ''::character varying
 deleted                | smallint               | not null default 0
 entity_id              | bigint                 | not null
 revision_id            | bigint                 |
 language               | character varying(32)  | not null default ''::character varying
 delta                  | bigint                 | not null
 og_group_ref_target_id | bigint                 |
Indexes:

Is this a problem with the update.php not executing table additions for OG?

Thanks,
r.b.