Checkboxgroup malfunctions in message-sending

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

Checkboxgroup malfunctions in message-sending

Postby medic3 » 4:45pm, Thu 27 Feb, 2014

Hi, I discovered the following:

If I have a (sample) checkboxgroup attribute with:
value options A, B, and C.

User 1 chose A
User 2 chose A + B
User 3 chose B
User 4 chose B + C

If I choose A + B as sending criterion, according to the instructions at
http://docs.phplist.com/SendMessageCriteriaInfo.html
it should send to anyone who chose A OR B.

so phplist should send to all four users. Or if the instructions file "A OR B" means "A OR B" but not "A AND B" then it should send to users 1, 3, and 4.

Result is that phplist sends to users 1 and 2 only.

Help please?

I use phplist version 2.10.19 with Google Chrome version 32.0. Thank you!
medic3
phpLister
 
Posts: 11
Joined: 1:39pm, Thu 27 Feb, 2014

Re: Checkboxgroup malfunctions in message-sending

Postby medic3 » 5:57pm, Wed 12 Mar, 2014

Anyone, anyone ... Bueller ... please help ...
Thanks.
medic3
phpLister
 
Posts: 11
Joined: 1:39pm, Thu 27 Feb, 2014

Re: Checkboxgroup malfunctions in message-sending

Postby duncanc » 3:10pm, Wed 30 Apr, 2014

Use phpmyadmin to look at the row of the message table for a message that has the criteria.

The column userselection has a query that selects the appropriate users and should be something like this (your attribute id may be different)
Code: Select all
select table1.userid
from phplist_user_user_attribute as table1
where table1.attributeid = 1
and (
    find_in_set('1',table1.value) > 0
    or find_in_set('2',table1.value) > 0
)


Does that help to explain what is happening?
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Checkboxgroup malfunctions in message-sending

Postby medic3 » 6:29pm, Wed 07 May, 2014

Thank you so much duncanc for your reply.

For all rows in my phplist_message table, every instance of userselection looks something like:

select * from phplist_user_user where id in (5011, 5012)

All instances look the same except some have a longer list of user ID numbers.

No where in there is "find_in_set" or "or"

Would love more help please ... Am offering paid help at viewtopic.php?f=12&t=40978

Thanks so much,
Matt
medic3
phpLister
 
Posts: 11
Joined: 1:39pm, Thu 27 Feb, 2014

Re: Checkboxgroup malfunctions in message-sending

Postby duncanc » 10:00pm, Wed 07 May, 2014

You are using stacked attribute selection set in your config.php file, set by
Code: Select all
define("STACKED_ATTRIBUTE_SELECTION",1);

It might not be clear but you need to click the Calculate button for phplist to refresh that set of user ids. The list does not update automatically, it needs to be refreshed before you send the message.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Checkboxgroup malfunctions in message-sending

Postby medic3 » 10:55pm, Wed 07 May, 2014

Indeed I do use stacked attribute.

Each time I send a message, I before sending I choose my attributes, then I hit the calculate button to make sure the number of users matching is roughly correct, and then I queue and process queue.

And all of that, I end up with the checkboxgroup malfunction.

Kind regards,
Matt
medic3
phpLister
 
Posts: 11
Joined: 1:39pm, Thu 27 Feb, 2014

Re: Checkboxgroup malfunctions in message-sending

Postby medic3 » 7:14pm, Thu 15 May, 2014

Many thanks to duncanc for his professional help with this issue! It tentatively looks like we have a solution:

edit file admin/send_core .php

Line 501 should be
$values = join(", ",$_POST["criteria_values"]);

Change that to
$values = join(",",$_POST["criteria_values"]);

It works perfectly in dummy user testing. Soon I'll test it with real users and in using stacked attributes.

Cheers duncanc. All, I highly recommend him to perform work for you, given how smart, reasonable, and trustworthy he was to work with electronically.

:) Matt
medic3
phpLister
 
Posts: 11
Joined: 1:39pm, Thu 27 Feb, 2014

Re: Checkboxgroup malfunctions in message-sending

Postby medic3 » 6:14pm, Thu 22 May, 2014

One more note, as Duncanc pointed out to me, in the phplist_user_user_attribute table, the values for that checkboxgroup attribute must be separated by commas only, not a comma followed by a space, for this all to work properly. This further means when importing multiple users at one time, separate values for checkboxgroup by a comma and no space.
:)
medic3
phpLister
 
Posts: 11
Joined: 1:39pm, Thu 27 Feb, 2014


Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 8 guests

cron