CommentFileSizeAuthor
#85 common_trusted_pmsg_error.png49.95 KBchenhaw
#73 Screenshot_6_2_13_10_59_AM.png35.13 KBezra-g
#65 trusted_contact-anonymous_link.png24.14 KBZarabadoo
#63 quicktabs.png55.23 KBitamar
#54 1975198-commons_bw-trusted_contacts-54.patch395 bytesitamar
#52 Screenshot_5_15_13_10_54_AM.png49.64 KBezra-g
#39 1975198-commons-trusted_contacts-39.patch2.54 KBNofarG
#39 1975198-commons_groups-trusted_contacts-36.patch97.42 KBNofarG
#39 1975198-commons_notify-trusted_contacts-39.patch9.06 KBNofarG
#39 1975198-commons_activity_streams-trusted_contacts-13.patch3.44 KBNofarG
#37 1975198-commons_activity_streams-trusted_contacts-13.patch3.44 KBNofarG
#37 1975198-commons_notify-trusted_contacts-33.patch9.01 KBNofarG
#37 1975198-commons_groups-trusted_contacts-36.patch97.42 KBNofarG
#37 1975198-commons-trusted_contacts-34.patch2.61 KBNofarG
#36 1975198-commons_groups-trusted_contacts-36.patch97.42 KBNofarG
#36 interdiff.diff6.4 KBNofarG
#35 1975198-commons_notify-trusted_contacts-35.patch96.67 KBNofarG
#35 interdiff.diff423 bytesNofarG
#34 1975198-commons-trusted_contacts-34.patch2.61 KBNofarG
#33 1975198-commons_notify-trusted_contacts-33.patch9.01 KBNofarG
#31 1975198-commons_groups-trusted_contacts-31.patch96.26 KBNofarG
#31 interdiff.diff13 KBNofarG
#30 1975198-commons_groups-trusted_contacts-30.patch104.2 KBNofarG
#30 interdiff.diff4.79 KBNofarG
#30 1975198-commons-trusted_contacts-30.patch1.26 KBNofarG
#30 interdiff.diff718 bytesNofarG
#29 1975198-commons-trusted_contacts-29.patch1013 bytesNofarG
#29 interdiff.diff6.32 KBNofarG
#29 1975198-commons_groups-trusted_contacts-29.patch103 KBNofarG
#27 1975198-commons_groups-trusted_contacts-27.diff2.34 KBitamar
#25 1975198-commons_groups-trusted_contacts-25.patch99.73 KBNofarG
#25 menus.png47.13 KBNofarG
#24 1975198-commons_groups-trusted_contacts-24.patch105.54 KBNofarG
#24 interdiff.diff1.24 KBNofarG
#23 1975198-commons_groups-trusted_contacts-23.patch105.52 KBNofarG
#23 interdiff.diff3.51 KBNofarG
#21 Invitations 2 Commons.png38.31 KBNofarG
#21 Trusted Contacts 3 Commons.png41.19 KBNofarG
#21 Messages 1 Commons.png52.08 KBNofarG
#21 1975198-commons_groups-trusted_contacts-21.patch105.34 KBNofarG
#21 interdiff.diff7.7 KBNofarG
#20 1975198-commons_notify-trusted_contacts-20.patch8.95 KBNofarG
#20 notifications.png23.74 KBNofarG
#19 Messages 1 new Commons.png40.56 KBNofarG
#19 Direct Message Katelyn Fogarty Commons.png81.79 KBNofarG
#19 1975198-commons_notify-trusted_contacts-19.patch920 bytesNofarG
#19 interdiff.diff5.09 KBNofarG
#19 1975198-commons_groups-trusted_contacts-19.patch101.35 KBNofarG
#18 1975198-commons_groups-trusted_contacts-18.patch100.09 KBNofarG
#18 interdiff.diff30.58 KBNofarG
#18 Messages Commons.png48.63 KBNofarG
#18 Commons Msg.png40.36 KBNofarG
#14 1975198-commons_groups-trusted_contacts-14.patch83.46 KBNofarG
#14 Trusted Contacts Commons.png42.92 KBNofarG
#14 Invitations Commons.png32.9 KBNofarG
#13 1975198-commons_activity_streams-trusted_contacts-13.patch3.44 KBNofarG
#13 1975198-commons_groups-trusted_contacts-13.patch83.45 KBNofarG
#11 Katelyn Fogarty Commons.png57.53 KBNofarG
#11 1975198-commons_group-trusted_contacts-11.patch54.12 KBNofarG
#9 trusted-contact.png98.09 KBNofarG
#9 1975198-commons_groups-trusted_contacts-9.patch53.35 KBNofarG
#9 1975198-commons_user_profile_pages-trusted_contacts-9.patch2.47 KBNofarG
Screenshot_4_19_13_5_50_PM.png75.85 KBezra-g
Screenshot_4_19_13_5_48_PM.png45.31 KBezra-g
Screenshot_4_19_13_2_25_PM.png91.36 KBezra-g
Screenshot_4_19_13_2_25_PM.png87.43 KBezra-g
Screenshot_4_19_13_2_25_PM.png87.94 KBezra-g
Screenshot_4_19_13_2_25_PM-2.png114.68 KBezra-g
Screenshot_4_19_13_2_26_PM.png89.6 KBezra-g
Screenshot_4_19_13_2_24_PM.png108.61 KBezra-g
Screenshot_4_19_13_2_28_PM-2.png135.82 KBezra-g

Comments

ezra-g’s picture

Also, an email notification should be sent when a user receives a private message or invitation, and when an invitation is confirmed.

amitaibu’s picture

Nice feature! Some technical breakdown:

  1. Every user == Group
  2. Define a new OG membership type called "trusted contacts", with a "Confirmed" boolean field indicating the relationship is complete. By default the state will be == Pending; and a "answer date" date field
  3. Add a 2nd group-audience field to all group content referencing users (i.e. not nodes!) with the new OG membership type. It should be with ER-prepopulate, and if no context exists "hidden"
  4. The new radio buttons on the home page (i.e. when there's no og-context) will just show/ hide the node's group-audience field, and if needed make sure the group-content is saved to the correct group in the submit handler
the604’s picture

really like this feature, great work!

ezra-g’s picture

Great to see folks are excited for this feature :).

Add a 2nd group-audience field to all group content referencing users (i.e. not nodes!) with the new OG membership type. It should be with ER-prepopulate, and if no context exists "hidden"

I'm not sure I understand this part (though I certainly trust your expertise here). Could you elaborate on the purpose of this field?

Also, one thing to be aware of: There may be a few places in Commons Groups and Commons Radioactivity that assume that groups are nodes. This may not affect the feature here but I'm mentioning it just in case.

amitaibu’s picture

I'm not sure I understand this part (though I certainly trust your expertise here). Could you elaborate on the purpose of this field?

Since User == Group we need a new group-audience field to be able to reference it (as each group-audience field == entity reference field -- can reference only a single group type).

So 1st group-audience, is the "default" will reference nodes.
2nd will reference users.

Also, one thing to be aware of: There may be a few places in Commons Groups and Commons Radioactivity that assume that groups are nodes.

Indeed, I saw this. We're patching it as we stumble upon it (e.g. grant role on first contribution)

victoria_b’s picture

Ezra-g,

Fantastic! I was playing around with the Private Message module trying to get something like this to work. This is exactly what I need!

Just one question at the moment...

1) Will we somehow be able to over-ride the "Trusted Contact" text everywhere (string overrides module - maybe) ? I would prefer it to say "Friend"

Thank you!

ezra-g’s picture

1) Will we somehow be able to over-ride the "Trusted Contact" text everywhere (string overrides module - maybe) ? I would prefer it to say "Friend"

My assumption is that this will be possible, at least through a code-based alter/override, though configuration would be a nice option. I think that making the text configurable would be a great separate followup issue.

victoria_b’s picture

Ezra-g,

Excellent and thank you for the quick reply.

Keep up the great work as this addition is really making me excited for using Commons V3!

NofarG’s picture

Work in progress.

  • Added Trust link
  • Og-memberships are created, referencing each other so once they move from pending to active, it happens to both of them.

Next is working on providing access API for private-message to hook in.

NofarG’s picture

Assigned: Unassigned » NofarG

Assigning to myself.

NofarG’s picture

Work in progress.

  • Added a 'Message' link in profile page.
  • The link is rendered by a formatter that checks if the logged-in user is a trusted contact of the viewed user.

Next is working on Invitations view & Trusted Contacts view.

victoria_b’s picture

NofarG,

I'm following this development and it looks great.

Re: The "Message" link. Could we eventually have this as a button in the same style as "Follow" ?

Thank you!

NofarG’s picture

Work in progress.

  • Added "Trusted Contacts" view. Path: /contacts
  • Added "Trusted Contacts Invitations" view. Path: /contacts/invitations
NofarG’s picture

Work in progress.

  • Bug fix.
amitaibu’s picture

Note that the patch requires OG --dev version.

amitaibu’s picture

+++ b/commons_groups.moduleundefined
@@ -24,6 +23,47 @@ function commons_groups_entity_view($entity, $type, $view_mode, $langcode) {
+function commons_groups_menu() {

PHPdocs

+++ b/commons_groups.moduleundefined
@@ -24,6 +23,47 @@ function commons_groups_entity_view($entity, $type, $view_mode, $langcode) {
+    'access arguments'	=>	array(1,2),

Tabs.

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+ * @param OgMembership $og_membership

Remove.

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+    return;

Explain each "return early"

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+  $token = md5(substr(str_shuffle('12458cdefghrstuvwxABCWXYZ'), 0, 10) . rand(100000, 999999));

Simplify code

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+  $og_membership2 = og_group('user', $og_membership->etid, $values, FALSE);

Comment that we get a non-saved OG-membership.

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+  $wrapper2->field_membership_token->set($token);

Add comment (i.e. the purpose of this token).

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+  // Make sure OG membership is updated.

, and not re-saved.

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+function commons_groups_request_trust($account, $ajax) {

PHPdocs.

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+    // User cannot join his own group.

his => thier

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+    '@{approve-url}' => l('Approve', 'approve-trust/' . $og_membership->id . '/' . $token),

message type should be

Approve . So the argument should be only the url().

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+  // Ajax

Remove

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+  // This actually deletes 2 OG memberships - one for each user.

, in commons_groups_...

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+function commons_groups_ignore_trust($og_membership) {

Add type hint

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+    // User can only ignore his requests.

his -> thier.

+++ b/commons_groups.moduleundefined
@@ -550,4 +608,473 @@ function commons_groups_preprocess_views_view_grid(&$variables, $hook) {
+  return drupal_valid_token($token, 'un' . ':' . $account->uid . ':' . $user->uid);

un => untrust

+++ b/modules/commons_groups_directory/commons_groups_directory.infoundefined
@@ -17,3 +17,11 @@ features[ctools][] = panelizer:panelizer:1
+; Information added by drush on 2013-04-22
+version = "7.x-3.0+21-dev"
+core = "7.x"
+project = "commons_groups"

make sure to git checkout . after drush make.

+++ b/views/handlers/commons_groups_handler_send_message.incundefined
@@ -0,0 +1,8 @@
+    return l('Send private message', 'messages/new/' . $values->og_membership_etid);

missing t().

NofarG’s picture

Private-Msg module comes with a "view" (not using Views) - list of messages, but it seems too different from the design above. If we want it to be exactly like the design, it might be easier to create our own View's view than modify the out-of-the-box one. What do you think?

NofarG’s picture

StatusFileSize
new40.36 KB
new48.63 KB
new30.58 KB
new100.09 KB

Work in progress.

  • Code review fixes.
  • View for private messages.
  • Write new private message in Overlay.

Note that the patch requires:

Next:

  • Fixing the duplication on private messages view.
  • People view.
NofarG’s picture

Work in progress.

  • Bug fixes.
  • Notifications counting. (Needs work)

Next:

  • Notifications - finish.
  • People view.
NofarG’s picture

Work in progress.

  • Notifications: Unread invitations & Unread messages.
NofarG’s picture

Work in progress.

  • Trusted Contacts page: /contacts - Total contacts count on title.
  • Invitations page: /contacts/invitations - New invitations count on title.
  • Messages: /contacts/message - New messages count on title.

Trusted Contacts  3    Commons.png

Invitations  2    Commons.png

Messages  1    Commons.png

amitaibu’s picture

+++ b/commons_groups.module
@@ -100,6 +127,95 @@ function commons_groups_admin_paths() {
+      return t('Trusted Contacts' . ($count ? " [$count]" : ''));

use @ t('Trusted Contacts (@count)', array('@count' => ...

+++ b/commons_groups.module
@@ -100,6 +127,95 @@ function commons_groups_admin_paths() {
+      require_once(drupal_get_path('module', 'privatemsg') . '/privatemsg.pages.inc');

module_load_include()

+++ b/commons_groups.module
@@ -100,6 +127,95 @@ function commons_groups_admin_paths() {
+ * Page callback;

Page callback; Trusted contacts related pages

+++ b/commons_groups.module
@@ -100,6 +127,95 @@ function commons_groups_admin_paths() {
+      $view = views_get_view('trusted_contacts');

return views_embed_view()

+++ b/commons_groups.module
@@ -100,6 +127,95 @@ function commons_groups_admin_paths() {
+      break;

No need.

NofarG’s picture

StatusFileSize
new3.51 KB
new105.52 KB

Work in progress.

  • Code review fixes.
NofarG’s picture

StatusFileSize
new1.24 KB
new105.54 KB

Work in progress.

  • Code review fixes.
NofarG’s picture

StatusFileSize
new47.13 KB
new99.73 KB

Work in progress.

  • Bug fixes.
  • Trusted Contacts menus.

menus.png

NofarG’s picture

Also notice that this patch is updated with the latest changes on commons --dev version.

itamar’s picture

The field instances of og_user_group_ref are missing. I'm attaching a patch to the patch, for adding the instances.

amitaibu’s picture

Let's not patch the patch :), just push to the working repo

NofarG’s picture

Work in progress.

  • Bug fixes.
NofarG’s picture

Work in progress.

  • Bug fixes.
NofarG’s picture

Work in progress.

  • Bug fixes.
NofarG’s picture

Status: Needs work » Needs review

[ Needs Review ]

NofarG’s picture

Work in progress.

  • Bug fix.
NofarG’s picture

StatusFileSize
new2.61 KB

Work in progress.

  • Fix.
NofarG’s picture

StatusFileSize
new423 bytes
new96.67 KB

Work in progress.

  • Fix.
NofarG’s picture

Please ignore the previous patch, it's the wrong one.

Here's the right patch.

NofarG’s picture

amitaibu’s picture

+++ b/commons_notify.module
@@ -84,4 +84,93 @@ function commons_notify_comment_insert($comment) {
+      'title' => $unread_invitations . t (' Invitations'),

Please move numbers inside t().

+++ b/drupal-org.make
@@ -220,7 +220,8 @@ projects[oauthconnector][download][revision] = "0ce7ac9614710c0f68d0a58cb4ae4667
+projects[og][patch][] = "http://drupal.org/files/1983090-save_created-3.patch"

Patch already committed, you can remove this.

NofarG’s picture

ezra-g’s picture

Thanks for this work, NofarG!

diff --git a/modules/commons_group_privacy/commons_group_privacy.info b/modules/commons_group_privacy/commons_group_privacy.info
new file mode 100644
index 0000000..9199a81
--- /dev/null
+++ b/modules/commons_group_privacy/commons_group_privacy.info
@@ -0,0 +1,14 @@
+name = Commons Group Privacy
+core = 7.x
+package = Commons - Building blocks
+dependencies[] = commons_groups
+dependencies[] = features
+dependencies[] = list
+dependencies[] = og_access
+features[features_api][] = api:1
+features[field_base][] = group_access
+features[field_base][] = group_content_access
+features[field_base][] = og_roles_permissions
+features[field_instance][] = node-group-group_access
+features[field_instance][] = node-group-og_roles_permissions
+features[field_instance][] = node-post-group_content_access

It looks like we're re-introducing part of the commons_group_privacy module in this patch. This seems like an accidental inclusion but I wanted to check.

More functional review coming soon but I wanted to note the above first given our differing timezones :).

NofarG’s picture

ezra-g’s picture

Status: Needs review » Needs work

Note to folks who may be reviewing that you also need the commons_user_profile_pages patch from #9.

A) Thanks for the repository URLs. I'm not sure this answers my question in #40 but I assume that the info file is an accidental addition. I'll plan to not include it in the commit for this issue unless you direct otherwise.

B) With the present group of patches, the components of trusted contacts and private messaging features are distributed across commons_groups and commons_notify but really, they are distinct pieces of functionality. Is there a particular benefit to not submitting them as individual feature modules?

C) I'd love to see some light code commenting inside our hook_field_formatter_view() implementation.

D) Without og_access enabled, we should make sure that we don't present UI that suggests that content will be private to trusted contacts. I wasn't able to get far enough into the functional review to see how we handle this (see below).

E) I wan't seeing the "Trusted contact" formatter when viewing an existing user's Panels-powered user profile page. Initial debugging shows that we're returning at

if (!og_is_group($entity_type, $entity)) {

for existing users on the site. There should be an upgrade path to make sure existing site users are groups if necessary. I did a drush cc all, drush features-revert-all for good measure.

F) To work around E, I tried to test by creating a new user, I attempted to add another user at admin/people/create, but after submitting the form I get a " Maximum function nesting level of '100' reached" error. At this point I stopped the functional review.

Here's the backtrace:

Fatal error: Maximum function nesting level of '100' reached, aborting! in /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/database/database.inc on line 2147 Call Stack: 0.0002 665376 1. {main}() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/index.php:0 0.1108 10123352 2. menu_execute_active_handler() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/index.php:21 0.1112 10125512 3. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/menu.inc:517 0.1112 10125848 4. user_admin() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/menu.inc:517 0.1112 10126024 5. drupal_get_form() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/modules/user/user.admin.inc:29 0.1112 10126872 6. drupal_build_form() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/form.inc:131 0.1139 10646176 7. drupal_process_form() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/form.inc:374 0.2176 15467104 8. form_execute_handlers() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/form.inc:860 0.2178 15465192 9. user_register_submit() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/form.inc:1464 0.2222 15476272 10. user_save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/modules/user/user.module:3818 0.5146 19168616 11. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/modules/user/user.module:590 0.5204 19173544 12. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5204 19173968 13. og_entity_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5214 19185528 14. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:802 0.5287 19466848 15. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.5295 19475568 16. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.5295 19475568 17. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.5336 19568792 18. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.5420 19573096 19. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.5428 19574992 20. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5428 19575328 21. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5444 19585392 22. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.5486 19617088 23. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.5492 19625808 24. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.5492 19625808 25. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.5515 19626904 26. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.5559 19628736 27. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.5559 19630008 28. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5559 19630344 29. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5580 19643880 30. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.5624 19675552 31. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.5631 19684272 32. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.5631 19684272 33. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.5653 19685368 34. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.5700 19687200 35. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.5700 19688472 36. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5700 19688808 37. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5714 19702344 38. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.5749 19734016 39. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.5755 19742736 40. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.5756 19742736 41. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.5778 19743832 42. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.5821 19745664 43. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.5822 19746936 44. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5822 19747272 45. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5836 19760808 46. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.5874 19792480 47. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.5884 19801200 48. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.5885 19801200 49. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.5913 19802296 50. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.5968 19804128 51. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.5968 19805400 52. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5968 19805736 53. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.5982 19819272 54. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.6016 19850944 55. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.6021 19859664 56. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.6021 19859664 57. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.6050 19860760 58. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.6097 19862592 59. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.6098 19863864 60. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.6098 19864200 61. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.6112 19877736 62. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.6151 19909408 63. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.6159 19918128 64. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.6159 19918128 65. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.6183 19919224 66. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.6230 19921056 67. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.6231 19922328 68. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.6231 19922664 69. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.6243 19936200 70. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.6280 19967872 71. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.6287 19976592 72. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.6287 19976592 73. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.6316 19977752 74. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.6362 19979584 75. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.6363 19980856 76. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.6363 19981192 77. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.6375 19994728 78. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.6409 20026400 79. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.6415 20035120 80. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.6415 20035120 81. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.6436 20036216 82. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.6492 20038048 83. module_invoke_all() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:352 0.6492 20039320 84. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.6492 20039656 85. commons_groups_og_membership_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:857 0.6506 20053192 86. og_group() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/commons_groups/commons_groups.module:1183 0.6540 20084864 87. OgMembership->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/og.module:1968 0.6546 20093584 88. Entity->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/og/includes/og.membership.inc:77 0.6546 20093584 89. EntityAPIController->save() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.inc:188 0.6570 20094680 90. EntityAPIController->invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:455 0.6570 20094848 91. field_attach_insert() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/profiles/commons/modules/contrib/entity/includes/entity.controller.inc:335 0.6583 20097744 92. module_invoke() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/modules/field/field.attach.inc:967 0.6583 20099064 93. call_user_func_array() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:833 0.6583 20099680 94. field_sql_storage_field_storage_write() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/module.inc:833 0.6587 20112032 95. InsertQuery_mysql->execute() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/modules/field/modules/field_sql_storage/field_sql_storage.module:451 0.6588 20113472 96. DatabaseConnection->query() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/database/mysql/query.inc:36 0.6588 20115568 97. DatabaseConnection->prepareQuery() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/database/database.inc:679 0.6588 20116008 98. PDO->prepare() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/database/database.inc:480 0.6588 20117696 99. DatabaseStatementBase->__construct() /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-4/includes/database/database.inc:480 Variables in local scope (#99): $dbh = class DatabaseConnection_mysql { protected $needsCleanup = TRUE; protected $target = 'default'; protected $key = 'default'; protected $logger = NULL; protected $transactionLayers = array ('drupal_transaction' => 'drupal_transaction', 'savepoint_1' => 'savepoint_1', 'savepoint_2' => 'savepoint_2', 'savepoint_3' => 'savepoint_3', 'savepoint_4' => 'savepoint_4', 'savepoint_5' => 'savepoint_5', 'savepoint_6' => 'savepoint_6', 'savepoint_7' => 'savepoint_7', 'savepoint_8' => 'savepoint_8', 'savepoint_9' => 'savepoint_9', 'savepoint_10' => 'savepoint_10'); protected $driverClasses = array ('MergeQuery' => 'MergeQuery', 'DatabaseTransaction' => 'DatabaseTransaction', 'SelectQuery' => 'SelectQuery', 'UpdateQuery' => 'UpdateQuery', 'InsertQuery' => 'InsertQuery_mysql', 'DeleteQuery' => 'DeleteQuery'); protected $statementClass = 'DatabaseStatementBase'; protected $transactionSupport = TRUE; protected $transactionalDDLSupport = FALSE; protected $temporaryNameIndex = 0; protected $connectionOptions = array ('database' => 'acquia_cl4', 'username' => 'root', 'password' => '', 'host' => 'localhost', 'port' => '', 'driver' => 'mysql', 'prefix' => array (...)); protected $schema = NULL; protected $prefixes = array ('default' => ''); protected $prefixSearch = array (0 => '{', 1 => '}'); protected $prefixReplace = array (0 => '', 1 => '') }

amitaibu’s picture

are distributed across commons_groups and commons_notify but really

Commons notify only deals with the notifications for new events. It's not really coupled with the Trusted contacts feature.

we should make sure that we don't present UI that suggests that content will be private to trusted contacts.

No problem, let me know the exact wording you want -- it would be better than my own English ;)

I wan't seeing the "Trusted contact" formatter when viewing an existing user's Panels-powered user profile page.

Indeed, the patch for the user profile panels was missing, I'll upload it.
In fact we have setup the above github repos, which make it easier to code review, but it can also create the diffs

Nice UI: https://github.com/NofarGizra/commons_groups/compare/7.x-3.x...trusted_c...
Add .diff to end of the URL and you'll see a proper diff https://github.com/NofarGizra/commons_groups/compare/7.x-3.x...trusted_c...

I attempted to add another user at admin/people/create

Fixed. Also make sure to clear Drush cache, so you indeed download the latest --dev of OG. (+We need automatic testing so much!)

amitaibu’s picture

Issue summary: View changes

Clarification.

amitaibu’s picture

Status: Needs work » Needs review

I have updated the issue summary with all the repos, poiniting to their compare. Append a .diff to the URL and you get the patch file.

ezra-g’s picture

Functional issues:

- 42 E is still not addressed. To clarify: even with the trusted contact/user group field added to display on the user profile Panels page, this field never displays for users that existed on upgrading sites. It looks like this is because the group_group field is empty for pre-existing users on upgrading sites.

I was able to create a new user account for testing, however when viewing that user's profile page, I click the "Trusted contact" toggle, the wheel spins and I get a popup with the error:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /dev/acquia/commons_nightly/commons/latest-6/request-trust/10/psp7_6_sPsI3U4mudZtlzdJkGG7D4hF374KsSiEKjr0/ajax
StatusText: OK
ResponseText: Fatal error: Maximum function nesting level of '100' reached, aborting! in /Users/ezra/Developer/htdocs/dev/acquia/

At this point I stopped functional testing.

Architectural issues:

Commons notify only deals with the notifications for new events. It's not really coupled with the Trusted contacts feature.

I'm not sure that this addresses my concern about separation of features. Plenty of sites may have no use for the private contacts feature at all, especially if they're not using OG access. The same is true of Private Messaging functionality. Is there a specific reason we don't have these new features separated in new feature modules like the rest of the Commons features?

Similarly:

+ * Task callback; Set permissions.
+ */
+function commons_set_permissions() {
+ // Set permissions for authenticated users.
+ $permissions = array(
+ 'read privatemsg',
+ 'write privatemsg',
+ 'delete privatemsg',
+ 'access overlay',
+ );
+ user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, $permissions);
+}
+
+/**
+ * Task callback; Set variables.
+ */
+function commons_set_variables() {
+ // Do not inform the user about new messages on login.
+ variable_set('privatemsg_display_loginmessage', FALSE);
+}
+

Setting configuration (variables + permissions) in the profile for one specific feature seems like relatively tight coupling. Like all such exportable components, these should be Featurized.

No problem, let me know the exact wording you want -- it would be better than my own English ;)

Yep, I'll provide once I'm farther into the functional testing.

ezra-g’s picture

Status: Needs review » Needs work
amitaibu’s picture

Ok, we can move the code from commons_groups into a new commons_trusted_contacts.
I still think we need to keep the on-screen notifications separated, so they can be used also by other modules.

because the group_group field is empty for pre-existing users on upgrading sites.

Indeed, we should probably create the group-group field on .install and db_update() all existing fields (i.e. make all users become groups)

amitaibu’s picture

btw, @ezra-g, until we re-roll it you can do a functional teting on a fresh install.

amitaibu’s picture

Status: Needs work » Needs review

@ezra-g, let's talk about the upgrade path -- I think we'll need to provide a (scalable) solution outside of the installation process, to turn all existing users to groups.

ezra-g’s picture

I'm running into some issues with my local environment that are preventing me from moving forward with testing on a fresh install:

Uncaught exception thrown in session handler.

PDOException: SQLSTATE[HY000]: General error in _drupal_session_write() (line 209 of /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-7/includes/session.inc).

Uncaught exception thrown in shutdown function.

PDOException: SQLSTATE[HY000]: General error in _menu_set_expanded_menus() (line 3325 of /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly/commons/latest-7/includes/menu.inc).

I believe these are specific to my environment and am troubleshooting.

ezra-g’s picture

Status: Needs review » Needs work
StatusFileSize
new49.64 KB

I got this setup and went through functional testing. I'm impressed with how well this works and the smoothness of the integration with Private Message module.

I ran into the following issues (listed in priority order) and fixed some:

A) Fields didn't revert/weren't properly defined on a fresh install - Fixed.
B) No "no new messages" link per the designs - Fixed.
C) Upgrade path for existing sites.
D) In some cases I get a UI where the "Operations" field set is empty.
Screenshot_5_15_13_10_54_AM.png

E) Can we move #1987136: Browsing widget without group context - radio buttons for posting to own-group or a specific group into the Commons Trusted Contacts module, since that UI only makes sense when the module is enabled?
F) The Invitations/Messages/Trusted Contacts tabs are implemented as local tasks, but the intention is for them to be similar to the tabs for users' Notifications preferences, which are implemented with QuickTabs. The main reason for refactoring here is for consistency - The alternative would be to alter the theming of this specific set of local tasks but note in other places.
G) Can we send an email when invitations are sent and accepted? This seems acceptable as a followup issue.

ezra-g’s picture

Also, I discussed upgrade path with amitaibu earlier this week and we landed on "prompt to visit menu callback with batch process" as the general approach.

itamar’s picture

StatusFileSize
new395 bytes

Issue 52E is resolved on the commons_trusted_contacts github repository, but requires this additional patch.

amitaibu’s picture

Itamar, can you please push the fix to that repo - let's avoid patches on patches

itamar’s picture

Points C and F are resolved as well. I didn't find the cause for D yet.

@amitaibu, the patch above is on commons_bw dev, do we need a new repository for that?

ezra-g’s picture

If it's a one line patch to Commons BW from my perspective I'm happy to just commit that without the need for a repo.

ezra-g’s picture

Points C and F are resolved as well.

Thanks, however I don't see any updates to the tabs as specified in F. Perhaps a commit needs to be pushed?

Zarabadoo’s picture

Theming has begun (starting with the header notification) at http://drupalcode.org/project/commons_origins.git/shortlog/refs/heads/is.... If it makes things simpler for your work, feel free to pull this in.

amitaibu’s picture

> @amitaibu, the patch above is on commons_bw dev, do we need a new repository for that?

No, sorry I thought it was for the commons_trusted_contact repo.

djvito’s picture

Has anyone had an issue with the ajax functions (delete, mark as read/unread) on the user/%/contacts/messages page? When I try any of the actions (admin account or reg user) I get this error:

An AJAX HTTP error occurred. 
HTTP Result Code: 200
Debugging information follows.
Path: /system/ajax
StatusText: OK
ResponseText: Fatal error: Call to undefined function privatemsg_list_submit() in [...]/includes/form.inc on line 1464

If I'm on the /messages page, the actions work as they're supposed to.

Any ideas?

itamar’s picture

Thanks, however I don't see any updates to the tabs as specified in F. Perhaps a commit needs to be pushed?

Sorry, I pushed it to the wrong repository. Now it's there.

itamar’s picture

StatusFileSize
new55.23 KB

I fixed the URLs that were leading to the previous tabs to lead to the new quick-tabs.

quicktabs.png

itamar’s picture

I didn't find the reason for why the "create private message" page is not shown as an overlay, even though I was able to display it as overlay using the overlay_paths module.

Zarabadoo’s picture

StatusFileSize
new24.14 KB

In the course fo theming, I noticed the "Trusted contact" link on profiles is showing for anonymous users.

Trusted contact link showing for anonymous users.

itamar’s picture

I fixed #65: Users without subscribe access and anonymous users were seeing the "Trusted Contact" link:

https://github.com/NofarGizra/commons_trusted_contacts/commit/2070831ef4...

giorgio79’s picture

#63 How about adding "Invitations" or "Messages" as a "subject" column between "contact" and "received" to avoid too much of a clickety click experience?

ezra-g’s picture

Status: Needs work » Needs review

This is ready for re-review.

Zarabadoo’s picture

It think I have touched most pages in this branch. One thing that I cannot really touch is the output of the views bulk operations form. At least, I am not sure what to do with it. It appears when there are no options available an the button text and options are a bit confusing.

ezra-g’s picture

Assigned: NofarG » ezra-g

I fixed 52D (n some cases I get a UI where the "Operations" field set is empty.) with https://github.com/NofarGizra/commons_trusted_contacts/commit/e072b0666c....

Zarabadoo is working to wrap up the themeing on this feature, and I'll work on adding any missing hook_update_N() implementations, such as for Commons User Profile pages and Commons Utility links.

I plan to file followups for:

* Followup: Add "direct message" button on user profiles
* Followup: Performing "Break contact" batch API text is awkward, then "Performed Break Contact on 1 item." let's just do it without batch.
* Followup: Change to "Add as trusted contact" or "Add to trusted contacts"
* Followup: Consider moving invitations field and notifications code from commons notify into commons trusted contacts.

ezra-g’s picture

Status: Needs review » Needs work

I've made several commits to the GitHub repos to fix minor issues and make sure the Features are revertable to default status, with descriptive commit messages to explain the motivations for the commits.

However, the following blocking functional issues remain:

A) "All" tab does not contain the "Posts" short form.

B) I receive these errors when posting into a group from the short form:

Notice: Undefined property: stdClass::$form_state in commons_trusted_contacts_node_presave() (line 828 of /Users/ezra/Developer/htdocs/acquia/commons-builds/latest-5/profiles/commons/modules/contrib/commons_trusted_contacts/commons_trusted_contacts.module).
Notice: Undefined property: stdClass::$form_state in commons_trusted_contacts_node_presave() (line 834 of /Users/ezra/Developer/htdocs/acquia/commons-builds/latest-5/profiles/commons/modules/contrib/commons_trusted_contacts/commons_trusted_contacts.module).
Warning: Invalid argument supplied for foreach() in commons_trusted_contacts_node_presave() (line 834 of /Users/ezra/Developer/htdocs/acquia/commons-builds/latest-5/profiles/commons/modules/contrib/commons_trusted_contacts/commons_trusted_contacts.module).
Notice: Undefined variable: gids in commons_radioactivity_incident_groups() (line 148 of /Users/ezra/Developer/htdocs/acquia/commons-builds/latest-5/profiles/commons/modules/contrib/commons_radioactivity/commons_radioactivity.module).

It looks like commons_trusted_contacts_node_presave() is expecting a $node->form_state property.

C) Form validation currently prevents users from submitting the short form on the site homepage when no groups are specified. However, the intent with this design was to allow folks to submit content that is site-wide/not tied to a specific group.
D) We shouldn't show the "Private/Specific groups" form elements when OG Access module is disabled, since it would likely give the impression to users that their resulting content will be private when that is not the case.

itamar’s picture

@ezra-g

Issues A, B & C (On comment #71) are resolved once the patch from comment #54 is applied and the github repositories are updated with the latest 7.x-3.x changes.

About D: I'm not sure where we're showing this. Can you please add a screenshot showing what should be removed?

ezra-g’s picture

StatusFileSize
new35.13 KB

Thanks, itamar - I'll try with the patch attached.

Re C, it appears that this validation is unrelated to the patch, but I'll double check:

/**
 * Validation handler; Make sure that a group is selected in case the
 * group_audience_type is set to "Specific groups".
 */
function commons_trusted_contacts_partial_node_form_validate($form, $form_state) {
  if ($form_state['values']['group_audience_type'] == 'custom' && empty($form_state['values'][OG_AUDIENCE_FIELD][LANGUAGE_NONE][0])) {
    form_set_error(OG_AUDIENCE_FIELD, t('No groups were selected.'));
    return FALSE;
  }
}

Here's the form elements I'm referring to in D:
Screenshot_6_2_13_10_59_AM.png

itamar’s picture

Status: Needs work » Needs review

Thanks ezra.

I pushed to commons_trusted_contacts on github a fix for hiding the audience type selection when og_access is disabled.

Now the validation you quoted is taking place only when og_access is on and you select "Post to specific groups". I hope this is what you meant.

ezra-g’s picture

Thanks, itamar. I don't see new commits at https://github.com/NofarGizra/commons_trusted_contacts/commits/master - Perhaps you forgot to push?

itamar’s picture

I accidentally pushed the previous fix to the wrong commons_trusted_contacts repository. Now it's in the correct one.

ezra-g’s picture

Great - Thanks, itamar.

Did you get a chance to look at 71 A?

A) "All" tab does not contain the "Posts" short form.

itamar’s picture

@ezra-g - Yes, I'm seeing the posts form on the All tab both on a fresh install with all 1975198 applied and also after applying them on a clean 7x installation.
I verified that the problem was that some of the github repositories were not updated to the current 7x status.

Zarabadoo’s picture

Assigned: ezra-g » Zarabadoo

Snagging this to work on a couple small issues.

ezra-g’s picture

One thing I just noticed - The "Approved trusted contact request" mail has an unreplaced token:

Subject: "[message:field-approving-user:field-name] approved your Trusted-Contact request."

[message:field-approving-user:field-name] approved your Trusted-Contact
request.

View their profile.. etc.

Zarabadoo’s picture

There is a small javascript bug on the partial forms on the front page.

  1. Go to the front page and expand the "Post" form.
  2. Click on the radio to expand the group selection.
  3. Go to a the "Q&A" tab.
  4. Expand the form.
  5. Try to use the radio buttons to switch between private contacts and groups.
  6. The radio buttons will act inconsistently.

My guess (as i have not had a chance to fully troubleshoot) is that Drupal's dependency javascript was not made to work with multiple forms on a page. One form's script is seeing the other forms and vice versa, and they are all fighting with each other. The second form is actually acting on the previous form and so you are not seeing the proper actions.

ezra-g’s picture

Status: Needs review » Needs work

Marking as "needs work" per 80 and 81.

ezra-g’s picture

Status: Needs work » Reviewed & tested by the community

Zarabadoo and I resolved 80 and 81 with: https://github.com/NofarGizra/commons_trusted_contacts/commit/60eb38d6b7... and https://github.com/NofarGizra/commons_trusted_contacts/commit/fe939400d9....

I believe this is RTBC.

In the short term, I'll create a new Drupal.org project to be consistent with the other Commons components. In the long-term, we should likely move this into the main Commons repository with #2009294: Consider moving invitations field and notifications code from commons notify into commons trusted contacts..

chenhaw’s picture

StatusFileSize
new49.95 KB

Hello everyone,

I am wondering what is the minimum Drupal Common version required for https://drupal.org/project/commons_trusted_contacts to works? I downloaded the modules and when trying to activate it in Commons-7.x-3.2, it gave me error as below.
Error message

japerry’s picture

Version: » 7.x-3.x-dev

This was missed the first time -- I've committed it here:

http://drupalcode.org/project/commons_bw.git/commit/89ec4a3

Status: Fixed » Closed (fixed)

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

BetaTheta’s picture

Quick question: will there be an option to disable 'Trusted contacts'? I'm trying to develop a site for my organization and I'd like any member to email any other member.

ezra-g’s picture

@BetaTheta: Please open a new issue for new questions and support requests. Thanks!

ezra-g’s picture

Issue summary: View changes

Updated issue summary.

deeray’s picture

I really like this feature, How can I use this as a module on my live site?

deeray’s picture

I really like this feature, How can I use this as a module on my live site?
Or is there a similar module I can use in achieving this?
Thanks

bjp232004’s picture

Issue summary: View changes

Facing issue with Bulk approval for Trusted Contacts. I have installed latest version of Drupal commons and send request for Trusted contacts. When I am trying to select checkbox and bulk approve it's not working as expected.

bdupls’s picture

As administrator under private messaging I have no pending invitations, but if I look at a particular user that previously did request membership from me I see awaiting approval. Can anyone tell me the name of the field in the database where I can manually un-check this awaiting approval from this member and start over.
Previously when trying to approve the user I got an bulk update AJAX error and have been unable to solve it, I am wondering if its the same error as bjp232004.
ajax error StatusText: error ResponseText: ReadyState: 0