Following the steps in the upgrade documentation here: http://drupal.org/node/1839652
I'm upgrading a 7.x-1.5 site to 7.x-2.0 using the latest dev + the patch from here: http://drupal.org/node/1926424 (partially committed to dev already I believe.)
The update script ran without errors.
OGMigrateGroupAudience did not appear as an option on admin/content/migrate.
Migration for the other 3 types (Membership, Roles, and UserRoles) completed successfully.
After running the migration script, I rebuilt content access permissions successfully.
The migration/update created a new, separately named entity reference field for each of my "group content" content types and users (e.g. og_node, og_node1), but all of those tables are empty.
On the content type field settings administration page I am getting the following error:
Inactive fields are not shown unless their providing modules are enabled. The following fields are not enabled:
Group Audience (group_audience) field requires the group_audience widget provided by og module
So - the content in the group_audience field (which was shared across multiple content types and the user entity) did not migrate successfully.
Finally, on the OG field settings page (admin/config/group/fields), there are no group audience fields listed below the "group content" content types.
Comment | File | Size | Author |
---|---|---|---|
#14 | Field settings with prepopulate | 70.78 KB | jastraat |
#14 | Existing member of a group | 53.98 KB | jastraat |
#14 | Existing value of field not filled in | 51.63 KB | jastraat |
#13 | Screenshot 3:21:13 9:36 PM.png | 81.22 KB | amitaibu |
#13 | 1942158-og-migrate-field-detect-13.patch | 1.63 KB | amitaibu |
Comments
Comment #1
amitaibuIs this with the db you sent me?
Comment #2
jastraat CreditAttribution: jastraat commentedYes - same DB.
Comment #3
amitaibu> OGMigrateGroupAudience did not appear as an option on admin/content/migrate.
I don't think this class exists any more. If you saw it in a documentation, can you please change it?
I see the og_node1, og_node2 -- attached patch improves fields detection, to prevent those unnecessary duplicates, and if possible maintain the
og_group_ref
name. (care to add this to the docs as-well?)> Finally, on the OG field settings page (admin/config/group/fields), there are no group audience fields listed below the "group content" content types.
Indeed, that's another issue, as currently the code there is looking for an hardcoded group-audience field name, and "og_node" isn't recognized, but if you will look at the content type itself, you will see the fields appear.
Comment #4
jastraat CreditAttribution: jastraat commentedI updated the screenshots on this page: http://drupal.org/node/1839652 so that they no longer contain OGMigrateGroupAudience
The attached patch improved the migration considerably - instead of creating a new field and table for each content type, there is only one field: og_group_ref. (I believe this will make using the entity prepopulate module much easier.) And it shows up on admin/config/group/fields.
However - the field_data_og_group_ref table is still empty, and I'm still getting the error on the content type field settings administration page:
Inactive fields are not shown unless their providing modules are enabled. The following fields are not enabled:
Group Audience (group_audience) field requires the group_audience widget provided by og module
Comment #5
amitaibu> However - the field_data_og_group_ref table is still empty
Yes, that's how it should be, OG doesn't use the field storage. Check your nodes - they seem to reference the groups correctly.
> Inactive fields are not shown unless their providing modules are enabled
I haven't verified but I assume that it's related to the field being deleted, but not all its data purged (if you run cron many times in the end Drupal will purge the data) - can you confirm that?
Comment #6
amitaibu> Inactive fields are not shown unless their providing modules are enabled
I've checked it now on your DB, and I don't see it -- on which link do you see it (after applying #3?)
Comment #7
jastraat CreditAttribution: jastraat commentedIt's on the manage fields page under content types. For example: admin/structure/types/manage/article/fields
Comment #8
jastraat CreditAttribution: jastraat commentedI checked, and the original group_audience fields are not marked as "deleted" in the field_config or field_config_instance tables. I don't think cron will clear them out without that being the case.
Also - I think what I've found is a new discrete bug. When I am logged in as a user with OG administrative privileges (and can edit any node regardless of group membership), if I edit a node that is a member of a group that I am NOT a member of ("other groups"), the existing membership is not populated into the og_group_ref field when I edit that existing node, and when I save - the membership is lost.
This is why I was thinking the problem was that the field table didn't contain data, but I don't experience this problem if I'm logged in as a member of the group.
Shall I submit a new issue? (still working on the inactive field problem in this thread)
Comment #9
amitaibu> It's on the manage fields page under content types. For example: admin/structure/types/manage/article/fields
Weird but I'm not seeing it after migrating
As user ID 1 I've edited node 4142 (assigned to
FAQ
) and added another group via "Other groups" (Rebecca L.... (4)
) -- and it works fine.> Shall I submit a new issue? (still working on the inactive field problem in this thread)
No, let's keep it in this thread (as I'm not sure this issue is real, or just on your system). Do you have Drupal to latest release and all other contrib modules in full release? Can you try dev version of the contrib modules (
drush dl foo bar --dev
)Comment #10
jastraat CreditAttribution: jastraat commentedRegarding the inactive field issue - my content types were defined using features. For simplicity, I removed the features for the DB export I provided. Could this be an issue with an upgrade if the group_audience field was defined in a feature? If so - I can probably just mark those fields as deleted in the DB and run cron a bunch - not a huge deal.
To recreate the error I'm seeing, the user you are logged in as cannot be a member of the group that a node is associated with. User 1 is a member of the FAQs group, so that wouldn't create the error. A better test would be a node from the Figure in the Carpet group (e.g. node 4065) which user 1 is not a member of. Could you try that?
Modules/Core Versions
------------------
Drupal 7.21
Ctools 7.x-1.2
Migrate 7.x-2.5
Entity API 7.x-1.0
Entity Reference 7.x-1.0
Entity Reference Prepopulate 7.x-1.2
Views 7.x-3.5
OG - dev from this morning + this patch
Comment #11
amitaibuOh, in that case you need to re-export your feature as the og-group-ref field is now owned by Entity reference and not OG. We could probably add a message about it in the import.
I'll check later node 4065.
Comment #12
jastraat CreditAttribution: jastraat commentedI did edit the feature to remove the OG-defined group_audience field and replaced it with the entity reference og_group_ref field. The inactive group_audience field was present even before I re-enabled the feature though.
Setting the group_audience field to deleted manually in the field_config and field_config_instance tables did remove the error message.
Comment #13
amitaibuLet's see if this patch fixes your group-audience field issue.
> I'll check later node 4065.
Checked, and working fine
Comment #14
jastraat CreditAttribution: jastraat commentedAlrighty - I tested this a bit further, and my issue with the group audience value for "other groups" not being populated on an existing node only occurs when the prepopulate module is being used. (Please see the attached screenshots.)
This is a pretty awful bug, but it may not be an OG bug.
Comment #15
jastraat CreditAttribution: jastraat commentedOk - just tested that latest patch, and I'm afraid it's actually less desirable than the previous patch. The only change I see is that the new common reference field is og_node instead of og_group_ref.
The inactive group audience field still exists.
Further details: the features defining the content types, including the group audience field, were disabled before the upgrade and were never re-enabled before doing the check for the inactive field.
Comment #16
amitaibuIts working for me also with ER-prepopulate, so it seems you have another module coming in the middle -- I guess that's where the email I've sent a few days ago makes sense ;)
Anyway, I've merged #3
Comment #17
jastraat CreditAttribution: jastraat commentedThank you - #3 is a great improvement.
In case anyone else reaches this thread and is having the same problem (other groups for an OG administrator not populated for existing content) the issue appears to only occur if entity reference prepopulate is enabled on the field and
"OG context" (Determine if values that should be pre-populated should "listen" to the OG-context.) is checked in the settings.
The error occurs with the following contrib modules enabled and a core-provided theme:
ctools, date, migrate, email, entity reference, entity reference prepopulate, link, OG, entity API, libraries, panels, views, views bulk operations, and webform.
Having "OG context" checked in the field configuration for the entity reference field also created the following error when a non-OG administrator added group content if the URL did not contain the group ID:
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
Comment #18
jastraat CreditAttribution: jastraat commentedComment #19.0
(not verified) CreditAttribution: commentedAdded slightly more information.