Closed (cannot reproduce)
Project:
Organic Groups
Version:
7.x-1.x-dev
Component:
og.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2011 at 17:41 UTC
Updated:
23 Sep 2012 at 10:42 UTC
Jump to comment: Most recent file
Comments
Comment #0.0
nagiek commentedtypo
Comment #0.1
nagiek commentedignore
Comment #1
nagiek commented.
Comment #2
amitaibuDid you try with latest dev of Views and Entity as-well? Please attach an export of your view.
Comment #3
nagiek commentedView attached.
Yes, using the latest -dev versions of Entity, Views and OG.
Steps to reproduce:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'og_membership_og.type' in 'on clause'Been dealing with a lot of modules breaking because of latest Views -dev today (although it was the display style breaking, not relationships). But I'm sure it's related.
Comment #4
nagiek commentedComment #5
nagiek commentedProblem is actually Entity, not views.
You know how OG Membership uses "name" to define its bundle instead of "type", and there's inconsistent storage all over the place? Well, the new Entity just told us that's not good enough.
Clean up for this is probably going to be consistent storage and and a database column name change. :p
Comment #6
nagiek commentedComment #7
nagiek commentedIt's this new file:
entity_views_handler_relationship_by_bundle.inc. Messing everything up.Comment #8
tvilms commentedI've been struggling with a separate issue related to OG 7.x-1.3 the past couple of days (can't add or edit groups if the node is set to be a group type). However, in troubleshooting, I came across some behavior pointing at the OG ties to the Entity module.
When I started trying to unwind the OG problems, I tried uninstalling the OG modules to start from scratch. After I did, the related tables were gone from my database. But then after removing the OG modules from my sites/all/modules directory, my site then crashed on most links I tried. The PHP error log messages were pointing at the relationship with the entity module:
Class 'OgMetadataController' not found in /Applications/MAMP/htdocs/.../sites/all/modules/entity/entity.info.inc on line 23
and
Call to undefined function og_membership_type_access() in /Applications/MAMP/htdocs/.../sites/all/modules/entity/entity.module on line 427
Now, granted, this quirky behavior isn't "normal" because I'm uninstalling and doing other atypical admin work. But on the other hand these error messages are giving some additional insight into the OG - Entity integration points. Hope it helps.
Comment #9
rollingnet commentedThis issue blocks every view that has a OG Membership relationship.
Waiting for a patch for this, at the moment anyone has tried to install old entity module in order to have views working again?
Comment #10
mradcliffe@rollingnet: Yes, I have installed entity 1.0 b10 and og 1.3 as I did not have time myself to debug.
Edit: Changing issue title to be a bit more specific on the release number.
Comment #11
mradcliffeThe view handler relationship issue is due to a bug in entity. It assumes that the bundle column is always "type", which is not necessarily the case.
Edit:
This was fixed in entity commit a5f62e90af74e025126082302bbf51e5f9282e75.
Comment #12
rbruhn commentedAfter updating Entity I received this error when flushing the cache:
I tried applying the Entity fix above but that did not solve anything.
If I Empty the db table 'og_membership_type' and then flush, it ads the entry and works fine. If I try to flush the cache again I receive the error.
Edit: Just to be clear, I understand this is an issue with Entity. I went back to beta 10 and everything works
Comment #13
Taxoman commentedIs this also a problem with Entity RC1?
http://drupal.org/project/entity
Comment #14
rbruhn commentedI still receive the error I posted above when clearing cache with Entity RC1
Comment #15
mradcliffeI am not sure if your issue is related, @rbruhn. I received the same error upgrading an earlier version of entity and og about 2 months ago. I did exactly what you did and it was fixed. Do you have any database updates in Og or Entity pending? I think you need to open a different issue.
The entity-1.0-b11 issue however is fixed in 1.0-rc1. Entity is behaving properly with Og now.
Comment #16
minoroffense commentedI'm using RC1 with Views and I get the following error #1345010: Organic Groups relationship causes - Fatal error: Call to a member function label() on a non-object
I was directed here since it was believed to be the same issue causing this error.
---------------------
UPDATED: Fixed issue reference
Comment #17
mradcliffe@minorOffense: Iog_membership entity provides a label (this is valid) so this is an issue with entity api assuming it does have a label.
It's either Entity API's business to know better or Og's to provide an exception in its views data.
Comment #18
Taxoman commentedLets avoid the specific version number in the title, this seems to appy to RC1 now, too.
Comment #19
Taxoman commentedMarked #1356784: OG incompability with Entity API 7.x-1.0-rc1 as a duplicate of this issue. There is a full error log printout over there.
Comment #20
mrfelton commentedI had this with latest og dev and Entity RC1 . I just upgraded Entity to latest dev, cleared the cache, and it seems to have resolved the issue.
Comment #21
Taxoman commentedComment #22
amitaibu@Taxoman, why did you set version to rc1 - am I missing something?
Comment #23
Taxoman commentedBecause #20 indicates that this is fixed in the latest dev, so it might be relevant only for one of the RC's..., but then of course that is the latest ENTITY dev, I did not pay attention to which queue this issue is in. Perhaps this is solved by using both dev versions. Should it be moved over to the Entity project?
Comment #24
blackclover commentedI'm using the latest devs and still getting the error
Entity API 7.x-1.x-dev (2011-Dec-06)
Organic groups 7.x-1.x-dev (2011-Dec-05)
Comment #25
nagiek commentedmarking as critical since OG doesn't work in its present state.
Comment #26
amitaibu> marking as critical since OG doesn't work in its present state.
We are talking about the Views integration, no? Would be nice if someone that got the error would do some debugging..
Comment #27
blackclover commentedDrupal db update generates the warning error below and the debug error appears when you access a view with og membership relationships
Pending updates:
og module
7101 - Rename the 'name' column to 'type' in {OG membership}.
7102 - Add default value function to all audience field instances.
Warning:
Notice: Undefined index: label in entity_views_field_definition() (line 165 of /Applications/MAMP/htdocs/e_deliberation/sites/all/modules/entity/views/entity.views.inc).
Debug:
'Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column \'og_membership_og.name\' in \'on clause\''
in views_plugin_query_default->execute() (line 1386 of /Applications/MAMP/htdocs/e_deliberation/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Hope this helps
Comment #28
amitaibuI see there are pending updated -- did you execute update.php? Did you try to disable views before executing update.php?
Comment #29
blackclover commentedYes I did run update. The error occurs after running it. No I didn't try that.
Comment #30
blackclover commentedThe warning is from update.php and the Debug is when accessing a page with an og-membership view on it after running update.
Comment #31
amitaibu@blackclover,
Is it a dev site? Can you attach a db dump so I can test it -- if so, please disable everything not related to the issue.
Comment #32
blackclover commentedSorry for some reason my dashboard did not indicate that you responded.
It's a production site with a very large number of contributed modules. I was gonna set it up on my local test environment but thought I would just try the latest dev of views first. The error does not occur with the newest dev of views. I installed the latest og and views at the same time and it worked great. Tried another scenario where I installed the new views after I updated OG (got the same error with existing views). Error went away with new views installed.
Unfortunately the new views has another issue http://drupal.org/node/1375254 that isn't groups related.
Comment #33
Taxoman commentedIs this still a problem with the latest releaseS of OG (1.4) and also Entity (RC2)?
Edit: and on the newly released D7.13/.14?
Comment #34
escore commentedYesterdays update of OG to 1.4 appears to cause the same problem again, breaking all pages with views with a OG membership relationship. Entity is v 7.x-1.0-rc2, which worked with the previous version of OG. After reading the thread above I couldn't identify a reliable workaround or fix. Did I miss something?
Error message:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'og_membership.type' in 'field list': SELECT og_membership.id AS entity_id, og_membership.type AS bundle, :entity_type AS entity_type, NULL AS revision_id FROM {og_membership} og_membership WHERE (og_membership.entity_type = :db_condition_placeholder_0) AND (og_membership.etid = :db_condition_placeholder_1) AND (og_membership.state IN (:db_condition_placeholder_2)) ; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => 8096 [:db_condition_placeholder_2] => 1 [:entity_type] => og_membership ) in EntityFieldQuery->execute() (line 1136 of /var/www/thesite/includes/entity.inc).Comment #35
escore commentedYesterdays update of OG to 1.4 appears to cause the same problem again, breaking all pages with views with a OG membership relationship (which is most on my site). Entity is v 7.x-1.0-rc2, which worked with the previous version of OG. After reading the thread above I couldn't identify a reliable workaround or fix. Did I miss something?
Error message:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'og_membership.type' in 'field list': SELECT og_membership.id AS entity_id, og_membership.type AS bundle, :entity_type AS entity_type, NULL AS revision_id FROM {og_membership} og_membership WHERE (og_membership.entity_type = :db_condition_placeholder_0) AND (og_membership.etid = :db_condition_placeholder_1) AND (og_membership.state IN (:db_condition_placeholder_2)) ; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => 8096 [:db_condition_placeholder_2] => 1 [:entity_type] => og_membership ) in EntityFieldQuery->execute() (line 1136 of /var/www/thesite/includes/entity.inc).[EDIT] Group nodes display the same error, so it may not be related to views. My failing views also contained a "OG group from Node" relationship.
Comment #36
Taxoman commented- and today Drupal 7.13 will be released...
Comment #37
escore commentedIgnore my post, I failed to run the database updates. Now everything is ok.
Comment #38
CatherineOmega commentedI'm still seeing this problem on Drupal 7.14, OG 7.x-1.4 and Entity (RC2). It wasn't showing up on Drupal 7.14, OG 7.x-1.3. Ideas?
Comment #39
rbruhn commentedRan into this problem again when updating my local site. Using Drupal 7.14, OG 7.x-1.4, Entity 7.x-1.0-rc3.
It results in this error:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'og_membership.type' in 'field list': SELECT og_membership.id AS entity_id, og_membership.type AS bundle, :entity_type AS entity_type, NULL AS revision_id FROM {og_membership} og_membership WHERE (og_membership.entity_type = :db_condition_placeholder_0) AND (og_membership.etid = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => 1236 [:entity_type] => og_membership ) in EntityFieldQuery->execute() (line 1139 of E:\drupal.loc\public_html\includes\entity.inc).Inside a View for solr index :
1) choose add a field
2) select Indexed Node from the Filter drop down
3) select Indexed Node: Group memberships (A list of all group memberships of the Node entity.)
4) click apply (this display)
An ajax error usually pops up by then.
I'm using Search_Api with SOLR and created a "browse" View for the solr index. I thought perhaps the "Group memberships" field needed to be indexed in solr, so went to add it, and then tried to reindex. While trying to reindex solr the above error appeared again. So can't even add Group Membership to the index.
Any ideas why this is happening? It's really preventing me from going any further with my development.
Edit: I should mention this was working with Drupal 7.12 and earlier versions of OG and Entity. It just appeared again with my updating.
Edit2: I checked my database and the existing updates for OG. Apparently, the database updates never ran even though I did the updating through Drupal. I ran the database updates by hand and everything is working now.
Comment #40
johazielHi,
I got the same error.
I changed the column "name" to "type" in the table "og_membership"
and now it works...
Regards
Comment #41
colinafoley commented#40, did you mean you changed the column from "type" to "name"?
This also fixed the issue for me locally, but I'm not sure what other issues making this change might cause because that column might be accessed as "type" somewhere else in the og modules.
I have to review the updates that #39 mentioned.
Comment #42
misthero commentedchanging the column name from "type" to "name" solve the view issue but throws other errors, logged in users get:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'og_membership.type' in 'field list': SELECT og_membership.id AS entity_id, og_membership.type AS bundle, :entity_type AS entity_type, NULL AS revision_id FROM {og_membership} og_membership WHERE (og_membership.entity_type = :db_condition_placeholder_0) AND (og_membership.etid = :db_condition_placeholder_1) AND (og_membership.state IN (:db_condition_placeholder_2)) ; Array ( [:db_condition_placeholder_0] => user [:db_condition_placeholder_1] => 0 [:db_condition_placeholder_2] => 1 [:entity_type] => og_membership ) in EntityFieldQuery->execute()Comment #43
amitaibuIt works fine. You probably need to run update.php and execute the Migrate plugins.
Comment #43.0
amitaiburetitled