I am trying to test the mass-contact form but I am unable to do so because I cannot figure out how to assign a user to a category

When I try I get the message "No users were in the selected category". There is only one user other than the administrator (me)

Comments

dRaz’s picture

+1 same issue.

I have added all roles too.

oadaeh’s picture

Categories are currently based on user roles, so in order to assign a user to a category, follow these steps:

  1. If you don't want to use any of your existing roles, create a role to use as a categroy. That is done at People -> Permissions -> Roles (admin/people/permissions/roles).
  2. Assign the users you want to send messages to to a user role. That can be done on the People page (admin/people), or by editing the individual users. (It's easier to use the People page.)
  3. Create a category, selecting one or more roles. That is done on the Configuration -> Mass Contact -> Add Category page (admin/config/system/mass_contact/add).

Keep in mind that if you only have yourself (based on email address) in the chosen category, the module will not send the message.

dRaz’s picture

Still nothing I'm afraid.

I still get the message:

"No users were in the selected category(ies), and therefore, the message was not sent."

I have created new category.
Assigned all existing roles to the category to receive.
Go to site/mass_content and write a test email.
Click send.

Any more help? Is this a bug?

tjtj’s picture

Same issue for me. I have a category that contains all authenticated users, and that is a role. I get the same message that there are no users in the category. And it does not even send a copy to the sender. I have lots of users too, and all are "authenticated users."

tjtj’s picture

Category: support » bug
v.zhakov’s picture

I have same issue.

I create category "News" and add role "registered user" for this category.

Try to send message with /mass_contact.

I recieve message:
"No users were in the selected category(ies), and therefore, the message was not sent."

oadaeh’s picture

Status: Active » Postponed (maintainer needs more info)

I am still not seeing this behavior. I even uninstalled and re-installed the module, forcing it to be reconfigured, and it still works as advertised.

I'm going to need to see someone's configuration settings. Please send me a screen shot of each of the these four administrative settings pages:

  • admin/config/system/mass_contact
  • admin/config/system/mass_contact/settings
  • admin/config/system/mass_contact/settings/header
  • admin/config/system/mass_contact/settings/body

You may send the screen shots directly to me using my contact form, if you don't want to attach them to this issue.

oadaeh’s picture

Title: How do I assign a user to a category » No users were in the selected category
Component: Documentation » Code

Marked #1371254: Impossible to send mass mailing: no users in group as a duplicate of this issue. Changing the name of this issue to make it easier to locate.

tjtj’s picture

StatusFileSize
new40.19 KB
new103.68 KB
new85.1 KB
new93.84 KB

Any way to debug this? I attach the requested screen shots.

Slicric’s picture

Priority: Normal » Critical
StatusFileSize
new173.5 KB

I offer a Newsletter from my Website to my Clients and the Mass Email was working fine up to the 25 of November, and all of a sudden i'm getting "No users were in the selected category(ies), and therefore, the message was not sent." is there anyone that knows how to solve this PLEASE, i'm not a programmer nor a developer but i'm having a crisis here.

Carlton

oadaeh’s picture

Assigned: Unassigned » oadaeh
Status: Postponed (maintainer needs more info) » Needs review

I believe I have fixed this issue here: http://drupalcode.org/project/mass_contact.git/commit/22308b7

Please try the 7.x-1.x-dev version when it has a more current date than 2011-Nov-26, and let me know if it is working for you.

oadaeh’s picture

I went ahead and tagged a new version, because I want to commit another change that may create this issue again, and I don't want to leave people hanging again. Here it is 7.x-1.0-alpha4.

tjtj’s picture

The new version works! Thanks a bunch.

infines’s picture

Status: Needs review » Reviewed & tested by the community
fernly’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.0-alpha4
Status: Reviewed & tested by the community » Active

Still having the same issue with version 7.x-1.0-alpha4.
Trying to send it to a category containing 2 users (admin not included).

oadaeh’s picture

lennartvv: would you please provide the same information tjtj provided in comment #9?

julia_g’s picture

I had the same issue. A bit of debugging led me to the following conclusion:
I had two roles in my category, and only the first one was used to create the recipient list. It only contained myself, so the recipients list was empty. When I removed this role from the category, everything worked as expected. If I add another user to the first role, and use both roles in the category, still only the first role is used.

I can't figure out why it's happening. The query in _mass_contact_create_recipient_list seems to be constructed correctly, running it on my database gives correct results, but the query result in the module code only has the users with the first role. Can there be some odd bug in Drupal database query API? I have no idea but maybe this will help.

oadaeh’s picture

Status: Active » Postponed (maintainer needs more info)

I'm still not seeing this behavior.

Julia, would you mind attaching a few screen shots, like in comment #9? Maybe some combination of settings is causing this.

Also, I just tagged a new version, 7.x-1.0-alpha5. Maybe updating to that version will make your problem go away. If it's not already, be sure to install Chaos tool suite before you update Mass Contact.

julia_g’s picture

Update to alpha5 seems to have solved the issue, thanks.

oadaeh’s picture

Version: 7.x-1.0-alpha4 » 7.x-1.x-dev
Priority: Critical » Major
Status: Postponed (maintainer needs more info) » Fixed

Assuming this to finally be fixed.

Status: Fixed » Closed (fixed)

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