With Comment Driven active, Team Notifications (http://drupal.org/project/notifications_team) don't show up. Instead of the checkboxes for selecting people to update, all that appears is the word Array

Comments

arhak’s picture

Category: bug » support

notice that this wouldn't be considered a bug
it is rather a support request
which might be achievable depending on feedback
and #746870: FAQ: what might be the problem with comment-related modules?

what version of notifications_team are you using?
is there any other detail regarding its configuration that you might add?

Brentnauer’s picture

I'm using Team Notifications UI (6.x-2.0-beta6) which depends on the following:

Content Notifications (6.x-2.2), Notifications (6.x-2.2), Messaging (6.x-2.2) and Token (6.x-1.12).

My particular content type uses Conditional Fields 6.x-1.1, but I can produce the same results on content types that don't use it. I have no weird configurations... Simply enabling Comment Driven on the node type and selecting "Node Title" is enough to cause Team Notifications to display that Array message.

arhak’s picture

Title: Comment Driven prevents correct display of Team Notifications (OpenAtrium) » support Team Notifications
Component: User interface » Code
Status: Active » Needs review

based on a quick review to notifications_team's code
I'll take a guess (note that this hasn't been tested not even tried)
please, test it and report whether it produces the desired effect, just partially, or none at all
- go to file comment_driven.module
- find the function _comment_driven_disguise_children (on my local version it is near line 190)
- within it, find comment line // protect ourself against 3rd parties creating NULL children... (near line 200)
- right before that line insert the following code:

    // support #761288: Compatibility with Team Notifications: notifications_team
    if ($key == 'notifications' && module_exists('notifications_team')) {
      $element[COMMENT_DRIVEN__DISGUISE_PREFIX . $key] = $element[$key];
      unset($element[$key]);
      continue; // don't go in depth
    }

note that this is just a test,
if it works it will still need some tuning

PS:
- not particularly related to OA
- I wasn't asking for cdriven's config, rather for notifications_team's config, but it won't be necessary since I recognized the cause of conflict

arhak’s picture

IMPORTANT: in the above code (@#3) make the $key comparison a triple equal sign
i.e. if ($key === 'notifications' ...

Brentnauer’s picture

Yessir! That worked!

As far as Notification Team's config... It's whatever OpenAtrium beta 5 ships with. I know it doesn't matter at this point though; sorry for the misunderstanding! Anything else I can do to help just let me know!

arhak’s picture

Anything else I can do to help

you can run another test,
since you opened this issue as "User interface" then I'm telling you that the theme function was not the only thing broken, at that point notifications weren't working,
now we need to know if notifications work properly

test:
- disable comment_driven
- use notifications_team as usual, make a comment and verify that you were notified
- then enable comment_driven (with the modification done) and repeat the experiment to verify that you get the expected notification
- report back

EDIT: spelling nonsense

arhak’s picture

PS: note that I haven't installed that module, just reviewed its code, therefore, this depends on your tests

arhak’s picture

here is the proposed patch
very similar to #3 with minor tunings and commented code

Brentnauer’s picture

Oops, it allows Team Notifications to show up, but it doesn't send anything when you update the node.

However, it works correctly with Comment Driven disabled.

arhak’s picture

Status: Needs review » Postponed

well, then it can't be solved by just reviewing code
I'll have to set up those modules and debug
but right now, I'm in the middle of many other stuffs

I guess that the problem is within notifications_ui
do you have an "Update" button for some subscriptions?

Brentnauer’s picture

Status: Postponed » Reviewed & tested by the community

False alarm, it DOES work... There was a problem with my mail configuration.

I tried your new proposed patch, also works splendidly. Marking this as reviewed and tested. Thank you for being so quick to help!

arhak’s picture

Title: support Team Notifications » Compatibility with Team Notifications

nevertheless, it would be nice to have a second review of that notifications_ui submission handler (mentioned at #10)

bibo’s picture

The patch fixed it for me too!

team_notifications seem to work fine, so please commit this :).

On a sidenote the casetracker UI still looks pretty bad when comment_driven is enabled. But it's usable, and not caused by this patch.

I think I need to find out how I can theme the "Assign user"-radiobuttons back like they where.
Hopefully I can find a theme override without patching.. Nothing to do with this case though.

arhak’s picture

please, open a different issue for casetracker UI (with some screenshots if possible)
perhaps this module should take care of some theme support, and also other users might jump in an provide their thoughts

bibo’s picture

Ok, created casetracker issue --> #768202: Compatibility with casetracker

arhak’s picture

Status: Reviewed & tested by the community » Needs work

@#15 they ended up being related issues after all
the proposed patch for this issue is RTBC, but I'm considering a more generic approach

arhak’s picture

Status: Needs work » Needs review

please, test this other patch instead (which is the one attached to #768202-9: Compatibility with casetracker)
and report back whether it solves this issue

EDIT: this patch requires to clear the cache

vishnu2010’s picture

please help to solve this issue
http://drupal.org/node/769636

arhak’s picture

@#18 and how is that supposed to be related to this issue or even this module?

nicholas.alipaz’s picture

Just posting my experience here, patch in #17 does not seem to work for me. I did clear caches and theme registry, also cleared browser cache. #8 does however seem to be working.
--
Los Angeles Web Design and development for Drupal.

arhak’s picture

Status: Needs review » Reviewed & tested by the community

@#20 thanks, that would be enough

according to #16 & #20, we stay with patch proposed at #8

bibo’s picture

Version: 6.x-1.0-alpha1 » 6.x-1.0-alpha2
Status: Reviewed & tested by the community » Needs review

I just found out the patch in #17 works great with a very small adjustment: adding $element['#theme_used'] = false; to the theme_comment_driven_proxy()-function.

Fixes team_notifications and casetracker UI. The patch can be found in my casetracker related post: here. Note that the patch is against alpha-2 (just like the patch in #17).

arhak’s picture

@#22 the new proposed patch for this issue would be then 2010-04-03_support_notifications_team_and_casetracker[unix].patch
both issues will be solved with a unified approach, and in passing by, lots of other modules as well

arhak’s picture

arhak’s picture

Status: Needs review » Fixed

commited to HEAD (the same fix at #768202)

remember that this requires to clear cache
(there is a new theme function)

Status: Fixed » Closed (fixed)

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