I'm not sure if I'm the only one having this issue, but before, I had workbench set up to send emails out to specific people assigned to particular sections. In my organization, every section had their assigned editor. When they would update content on the site, an email is sent out to that particular editor. Now it appears that that feature is no longer valid. I have discovered that emails are only sent out by role only. Meaning a role has to be assigned to a particular section and everyone who is that role will now get an email. I couldn't divide and conquer like before. Is there any reason why this feature was taken out of Workbench Email?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TheGentleman created an issue. See original summary.

frosev’s picture

Thanks for the report. We didn't take any functionality out, so this must be a bug. You're using workbench_access to assign users to sections I imagine? Would it be possible to share your configuration for workbench_email and workbench_access? I want to replicate it locally to try to debug it locally.

Thank you.

frosev’s picture

Assigned: Unassigned » frosev
TheGentleman’s picture

Title: Sending Emails by Section and Role not just by Roll » Sending Emails by Section and Role not just by Role
TheGentleman’s picture

Frosev

Yeah I can get you my configuration. What exactly do you need to see?

I am set up on Workbench Email and I have editors getting auto notifications. I assigned editors to different sections. And they were getting emails for their specific section with no problem. One day the emails just stopped. I couldn't figure out what it was.

It wasn't until I assigned the "Editor" role to all of sections did they start receiving emails again. Please see all my attached images.

frosev’s picture

That's everything I need. Thank you! I'm going to replicate this locally over the weekend, and report back. Thank you again!

TheGentleman’s picture

frosev,

How is everything going? Just wanted to check up to see if you were able to recreate the problem.

Best,
TG

frosev’s picture

Hi TG,

I'm still working on it. Unfortunately I didn't get much time over the weekend to try and reproduce the issue. I'm going to give it a go later tonight. I'll let you k now if I have any issues reproducing the error. Thank you.

frosev’s picture

Hi TG,

I had a few extra minutes to spare and I think I've found the issue. The code added from the following issue: https://www.drupal.org/node/2532198 is causing the issue. I'm going to try and get that fixed over the weekend and provide a patch. Once that's tested I can create a new release.

TheGentleman’s picture

Frosev,

Thank you! Looking forward to it.

frosev’s picture

TG,

I'm whipped up a quick patch. The previous issue was that a user that had multiple roles was getting multiple emails, even though the section was only assigned to a single role that the user belonged to. So I decided to short circuit the check for user's emails if their roles didn't match the sections, however that was short circuiting for when workbench_email was looking for single editors (when a given user is assigned to a section). I've moved the short circuit to AFTER workbench_email has accumulated all the editors.

I've attached a patch, which works for both this issue and the issue previously mentioned (https://www.drupal.org/node/2532198). Let me know if it works for your case.

frosev’s picture

Hi TG,

I was wondering if you had a chance to test the patch?

frosev’s picture

Status: Active » Needs review

Status: Needs review » Needs work
TheGentleman’s picture

Sorry,

Haven't gotten around to patching. Ran into another issue with mail. Will try this week.

Best,
TG

TheGentleman’s picture

FileSize
25.52 KB

frosev,

I finally got around to patching however the patch didn't take. Maybe I'm doing something wrong. Take a look at my recent attachment and let me know what you think.

Best,
V

frosev’s picture

TG,

I ran the patch command you did on the 7.x-3.11 version of the module and it applied properly. Could you try the patch command with the --ignore-whitespace option. It could be a mismatch in the type of line endings we're each using.

TheGentleman’s picture

FileSize
13.11 KB

Still getting this error

frosev’s picture

Hmm, it's not ignoring the line endings. I've attached a patch where I've ignored the line endings. Could you see if that works?

TheGentleman’s picture

FileSize
27.58 KB

Still getting this...I'm probably doing something wrong. I don't understand why it wouldn't work.

frosev’s picture

Could you try applying the patch manually? The patch moves a few lines further down the function.

TheGentleman’s picture

I patched it in manually. I'm going to see how it works out over the next week. I'll get back to you.

Best,
TG

frosev’s picture

Thanks TG. Let me know how it goes, and happy holidays!

frosev’s picture

Hi TG,

Were you able to test the patch?

frosev’s picture

Hi TG,

Following up to see if the patch worked for you. I was thinking about creating a release for this next week.

  • frosev committed 2f68b82 on 7.x-3.x
    Issue #2829761 by frosev, TheGentleman: Sending Emails by Section and...
frosev’s picture

Status: Needs work » Fixed

A release has been pushed to 7.12

Status: Fixed » Closed (fixed)

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