{"id":583,"date":"2022-08-30T15:03:46","date_gmt":"2022-08-30T15:03:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/problem-about-organic-groups-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:03:46","modified_gmt":"2022-08-30T15:03:46","slug":"problem-about-organic-groups-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-organic-groups-collection-of-common-programming-errors\/","title":{"rendered":"problem about organic-groups-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b5b64262f4909a909d653e2e0d8a8774?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDrupguy<br \/>\nviews organic-groups content<br \/>\nI recently upgraded to OG version 7.x-2.3 as part of the security bug fix for OG. Unfortunately, as was indicated, it certainly wasn&#8217;t backwards compatible with the version of OG I already had installed, and it messed up my groups big-time. After going back and re-calibrating things (a fresh install isn&#8217;t an option), I&#8217;ve got it almost back to where it was previous to the upgrade except for one major problem: the Views integration is causing a huge issue, maybe because it doesn&#8217;t seem to have been upgraded along with the rest of OG.Since I was getting the error message &#8220;call to undefined function og_get_group()&#8221; after the upgrade, I searched and fo<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e1c313b9930142e847eefa22594db994?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAntonello<br \/>\norganic-groups<br \/>\nIn OG 7.x-2.x you can assign roles to group members and you can override roles for a specific group. I am trying to create a view of all admin members. I am filtering the view with PHP.Option #1: Use $roles = og_get_user_r<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f5ef1b81e1aeb3b921a3034d460ce6af?s=128&amp;d=identicon&amp;r=PG\" \/><br \/>\nkiamlaluno<br \/>\norganic-groups<br \/>\nI have the Organic Groups module working in my site, but<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d4700527847ad6edd6f802201de9104f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nChapabu<br \/>\nusers organic-groups<br \/>\nHow can I ch<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/55111af1019cb725c8cd1d80a974a434?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nWandering Digital<br \/>\ndrupal organic-groups<br \/>\nWe are trying to use Drupal&#8217;s rules module to automatically change the Organic Groups member roles of group members when they<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bd0e602cfc23705507e3825e02022fc2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSean Cunningham<br \/>\nviews organic-groups entity-reference<br \/>\nApologies if this question has already been answered. I&#8217;m developing an emergency notification site using Drupal 7 and Organic Groups and currently it&#8217;s building-driven &#8212; i.e., the buildings are the groups which have users connected to them. They can add notes, photos, etc. and all works well.Now it seems that it would be better to have an event-driven system. Admins could create an event (such as a hurricane) and then assign those buildings that are in the path of the event. I&#8217;ve tried creating a new Event content type and using the Entity Reference module, linking the Building list to the Event. However, when it comes time to create a View to display the information I&#8217;m running into the following error message when I build the view relationship using Entity Reference: Referenced Entity: SQLSTATE[42S22]: Column not found: 1054 Unknown column &#8216;og_membership.field_affected_buildings_target_id&#8217; in &#8216;on clause&#8217;Here is my exported view (note that it doesn&#8217;t have any fields yet but it does have the broken relationship):$view = new view(); $view-&gt;name = &#8216;event_list&#8217;; $view-&gt;description = &#8216;Displays all emergency events with affected buildings.&#8217;; $view-&gt;tag = &#8216;default&#8217;; $view-&gt;base_table = &#8216;node&#8217;; $view-&gt;human_name = &#8216;Event List Test&#8217;; $view-&gt;core = 7; $view-&gt;api_version = &#8216;3.0&#8217;; $view-<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8e22b70b2e2d42ce865abbaa6f7efa80?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRebDev<br \/>\norganic-groups forum advanced-forum<br \/>\nError:The website encountered an unexpected error. Please try again later.PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column&#8217;node.entity_id&#8217; in &#8216;where clause&#8217;: SELECT node.nid AS entity_id,node.vid AS revision_id, node.type AS bundle, :entity_type ASentity_type FROM {node} node WHERE (node.nid =:db_condition_placeholder_0) AND(( ( EXISTS (SELECT na.nid AS nid FROM{node_access} n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/50e006b3ce016c6784be89bf26313f75?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ndan2k3k4<br \/>\n7 organic-groups<br \/>\nI had OG working fine except I wasn&#8217;t able to upload images to be displayed (but to still keep the File field for PDF uploads as private to just the group).However I&#8217;ve gone through and removed the CKEditor module as people suggested to use WYSIWYG with CKEditor (<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d6b7a12296ad5ade25ec660b140bcca2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOwen Blacker<br \/>\ndrupal organic-groups<br \/>\nI&#8217;ve taken over a Drupal website. I&#8217;m trying to update the og module. It is currently version 1. I tried to upgrade it to the latest version but when I ran update.php it failed. So I thought I&#8217;d just try updating it to version 1.4. However, when I did this I then got the following errors when I ran update.php:# user warning: Table &#8216;og_ancestry&#8217; already exists query: CREATE TABLE og_ancestry ( nid int(11) NOT NULL, group_nid int(11) NOT NULL, is_public int(1) NULL, KEY (nid), KEY (group_nid) ) \/*!40100 DEFAULT CHARACTER SET utf8 *\/; in \/homepages\/0\/d309344694\/htdocs\/openup6\/sites\/default\/modules\/ogr\/og.install on line 218. # user warning: Unknown column &#8216;is_public&#8217; in &#8216;field list&#8217; query: INSERT INTO og_ancestry (nid, group_nid, is_public) SELECT nid, gid, is_public FROM og_migrate in \/homepages\/0\/d309344694\/htdocs\/openup6\/sites\/default\/modules\/ogr\/og.install on line 239. # warning: array_merge() [function.array-merge]: Argument #2 is not an array in \/homepages\/0\/d309344694\/ht<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-09 21:06:12. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Drupguy views organic-groups content I recently upgraded to OG version 7.x-2.3 as part of the security bug fix for OG. Unfortunately, as was indicated, it certainly wasn&#8217;t backwards compatible with the version of OG I already had installed, and it messed up my groups big-time. After going back and re-calibrating things (a fresh install isn&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=583"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/583\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}