Closed (fixed)
Project:
Drupal Commons
Version:
7.x-3.3-rc2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
6 Mar 2013 at 12:40 UTC
Updated:
4 Jan 2014 at 02:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andyingham commentedUpdating 'Entity Registration' module to 7.x-1.1 fixed this problem for me.
Comment #2
stanlog commentedHello, I've got the same problem with documents module. When I'm uploading the file, I've got the message :
"Warning: Invalid argument supplied for foreach() in entityreference_field_widget_form() (line 815 of /var/www/drupal/profiles/commons/modules/contrib/entityreference/entityreference.module)."
And when I click on "Save" :
"EntityMetadataWrapperException: Unknown data property og_group_ref__og_membership. in EntityStructureWrapper->getPropertyInfo() (line 339 of /var/www/drupal/profiles/commons/modules/contrib/entity/includes/entity.wrapper.inc)."
Anybody's know where is the bug ?
Thank you for your help.
Drupal 7.22
Commons 7.x-3.2
Comment #3
behoppe333 commentedI see this error both with Commons 3.3 rc2 and a fresh install (drush make build-commons.make from just now)
Steps to reproduce the error:
Comment #4
behoppe333 commentedThis bug occurs in 7.x-3.3-rc2+9-dev using steps of #3
With a fresh install, this makes Commons Documents useless. I cannot create any documents.
Comment #5
behoppe333 commentedFYI: I upgraded an existing site to 7.x-3.3-rc2+9-dev and observe that documents work in that case. The problem may only occur with a fresh install.
Comment #6
japerryConfirmed. I could reproduce it as well.
Comment #7
japerryPlease refer to #2065381: EntityMetadataWrapperException errors due to features not being reverted for reasons why its important to revert all features after enabling a feature in commons. We don't automatically revert all features because we don't want to destroy user customizations.
The easiest way to revert is with 'drush --force -y fra' if you have drush enabled. Warning: this will remove any customizations / overridden features you may have on your install. Proceed with caution!
Re-open if you feel that this message is in error and can be replicated after reverting all features.
Comment #8
behoppe333 commentedThanks for looking into this japerry.
I am re-opening.
I observe the error with a fresh install. When I look at admin > structure > features > commons content types > commons documents, it says all values are "Default".

My knowledge of Features module is extremely vague, but it seems to me like reverting is moot in this situation. And if there is something to revert, then like https://drupal.org/node/2052353 I am confused why reverting is called for when I have nothing but a fresh install.
Comment #9
japerrySince comments documents is not enabled upon installed (its an additional feature), Please refer to #2065381: EntityMetadataWrapperException errors due to features not being reverted for reasons why its important to revert all features after enabling a feature in commons. We don't automatically revert all features because we don't want to destroy user customizations.
In this case, groups add fields to the documents CT, and unless you revert those modules, the fields won't show up. Please refer to #2065381: EntityMetadataWrapperException errors due to features not being reverted for more information about this catch-case.
Comment #10
RobKoberg commentedthere has a to be a better way of dealing with this issue.
"or reasons why its important to revert all features after enabling a feature in commons. We don't automatically revert all features because we don't want to destroy user customizations."
That last sentence contradicts the previous one, for all intents and purposes. Basically, you need to blow away all customizations to get the og_group_ref and/or og_group_user_ref on a single content type.
What about an admin/commons/group-types and admin/commons/user-group-types pages that provides a lists of content types with check boxes. On submit, the necessary setup/install occurs. Or perhaps there are hooks that can be implemented for the og admin field settings page.
Or what if all the features were enabled by default and you opt out of the ones you don't want?
Comment #11
japerryBy making the site builder manually revert, we allow them to do it on their own time, after they've read the documentation and verify they have no customizations.
But that discussion should be had in the meta issue, not here.