Segment not working

Your software
My Mautic version is: 3.2.4
My PHP version is: 7.2
My Database type and version is: I don’t know

Your problem
My problem is:
I set up a simple segment rule: when a contact has an empty stage, add to segment. However, it’s not working.

I already set up the corn (and, from the mails I’m receiving, everything seems fine). What might be the issue?

These errors are showing in the log (I don’t know if they are related):
[2021-02-01 10:45:38] mautic.WARNING: PHP Warning - mysqli_stmt::bind_result(): Server returned unknown type 245. Probably your client library is incompatible with the server version you use! - in file /home/wbintern/public_html/wnbigroup.com/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php - at line 197 {“params”:null,“meta”:"[object] (mysqli_result: {“current_field”:null,“field_count”:null,“lengths”:null,“num_rows”:null,“type”:null})",“fields”:["[object] (stdClass: {“name”:“is_published_0”,“orgname”:“is_published”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:1,“charsetnr”:63,“flags”:36865,“type”:1,“decimals”:0})","[object] (stdClass: {“name”:“date_added_1”,“orgname”:“date_added”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“created_by_2”,“orgname”:“created_by”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:32768,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“created_by_user_3”,“orgname”:“created_by_user”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“date_modified_4”,“orgname”:“date_modified”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“modified_by_5”,“orgname”:“modified_by”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:32768,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“modified_by_user_6”,“orgname”:“modified_by_user”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“checked_out_7”,“orgname”:“checked_out”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“checked_out_by_8”,“orgname”:“checked_out_by”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:32768,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“checked_out_by_user_9”,“orgname”:“checked_out_by_user”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“id_10”,“orgname”:“id”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:10,“charsetnr”:63,“flags”:49699,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“name_11”,“orgname”:“name”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:4097,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“description_12”,“orgname”:“description”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“subject_13”,“orgname”:“subject”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“from_address_14”,“orgname”:“from_address”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“from_name_15”,“orgname”:“from_name”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“reply_to_address_16”,“orgname”:“reply_to_address”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“bcc_address_17”,“orgname”:“bcc_address”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“template_18”,“orgname”:“template”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“content_19”,“orgname”:“content”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“utm_tags_20”,“orgname”:“utm_tags”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“plain_text_21”,“orgname”:“plain_text”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“custom_html_22”,“orgname”:“custom_html”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“email_type_23”,“orgname”:“email_type”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“publish_up_24”,“orgname”:“publish_up”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“publish_down_25”,“orgname”:“publish_down”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“read_count_26”,“orgname”:“read_count”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:36865,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“sent_count_27”,“orgname”:“sent_count”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:36865,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“variant_sent_count_28”,“orgname”:“variant_sent_count”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:36865,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“variant_read_count_29”,“orgname”:“variant_read_count”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:36865,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“revision_30”,“orgname”:“revision”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:36865,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“lang_31”,“orgname”:“lang”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:4097,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“variant_settings_32”,“orgname”:“variant_settings”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“variant_start_date_33”,“orgname”:“variant_start_date”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“dynamic_content_34”,“orgname”:“dynamic_content”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“headers_35”,“orgname”:“headers”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:63,“flags”:4241,“type”:245,“decimals”:0})","[object] (stdClass: {“name”:“public_preview_36”,“orgname”:“public_preview”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:1,“charsetnr”:63,“flags”:32768,“type”:1,“decimals”:0})","[object] (stdClass: {“name”:“category_id_37”,“orgname”:“category_id”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:10,“charsetnr”:63,“flags”:49192,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“translation_parent_id_38”,“orgname”:“translation_parent_id”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:10,“charsetnr”:63,“flags”:49192,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“variant_parent_id_39”,“orgname”:“variant_parent_id”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:10,“charsetnr”:63,“flags”:49192,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“unsubscribeform_id_40”,“orgname”:“unsubscribeform_id”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:10,“charsetnr”:63,“flags”:49192,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“preference_center_id_41”,“orgname”:“preference_center_id”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:10,“charsetnr”:63,“flags”:49192,“type”:3,“decimals”:0})"],“columnNames”:[“is_published_0”,“date_added_1”,“created_by_2”,“created_by_user_3”,“date_modified_4”,“modified_by_5”,“modified_by_user_6”,“checked_out_7”,“checked_out_by_8”,“checked_out_by_user_9”,“id_10”,“name_11”,“description_12”,“subject_13”,“from_address_14”,“from_name_15”,“reply_to_address_16”,“bcc_address_17”,“template_18”,“content_19”,“utm_tags_20”,“plain_text_21”,“custom_html_22”,“email_type_23”,“publish_up_24”,“publish_down_25”,“read_count_26”,“sent_count_27”,“variant_sent_count_28”,“variant_read_count_29”,“revision_30”,“lang_31”,“variant_settings_32”,“variant_start_date_33”,“dynamic_content_34”,“headers_35”,“public_preview_36”,“category_id_37”,“translation_parent_id_38”,“variant_parent_id_39”,“unsubscribeform_id_40”,“preference_center_id_41”],“col”:"[object] (stdClass: {“name”:“preference_center_id_41”,“orgname”:“preference_center_id”,“table”:“m0_”,“orgtable”:“maunu_emails”,“def”:"",“db”:“wbintern_maut703”,“catalog”:“def”,“max_length”:0,“length”:10,“charsetnr”:63,“flags”:49192,“type”:3,“decimals”:0})",“refs”:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],“value”:null,“key”:41}

your/mautic/app/config/local.php

change line 3 to 'pdo_mysql’

you may also need to run doctrine:schema:validate to see if you have an issue

1 Like

Thank you @EJL :slight_smile:
the logs stopped giving any error after the modification you recommended.

However, the segment is still not working. I tried creating a new one, aiming at the contact’s country, but still, it gives no contact (and it should give a few of them)

Well thats half the problem solved. Are you running mautic:segments:update to effect these changes in segments. You must do so in order to update the segments.

1 Like

It’s running via Cron every 5 minutes. From the messages CPanel is sending me, it seems that the cron is working just fine. Is there a way to see if there’s an issue? Or a way to run it manually?

yes. run the command via ssh. add -vvv to the end to see debug level logging

1 Like

Hi @EJL , thank you very much :slight_smile:

It worked perfectly. What do you recommend now? Do I add the -vvv to the corn job as well, or now it should work normally? Thank you :slight_smile:

I only use -vvv when i’m running commands manually via SSH. If everything is working properly there is no need to add it to your cron jobs.

1 Like