Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,374
    • Issues 1,374
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • CiviCRM Core
  • Issues
  • #133

Closed
Open
Created May 21, 2018 by varshith@varshith

Reply-to field with empty string get saved in DB as NULL

Issue:

Somehow our client's mailing got saved with 'NULL' reply-to field and was causing problems. On looking into it and trying to reproduce the issue, 'reply to' field can be NULL in the following case

  • Add a new mailing (or reuse one)
  • Select a 'reply to' email (I had to enable "Enable Custom Reply-To" in 'civicrm/admin/mail')
  • Fill in other fields as usual
  • Under 'Responses' tab, check "Track Replies" checkbox. This brings up a warning message on the top right saying 'reply-to' has been cleared out (but still allows user to save mailing)
  • Proceed to next step and save mailing

Proposed Fix:

I am not sure how to fix this as the user is expected to see the warning message and act accordingly. But I think we can check and not allow NULL values for reply-to in DB. In CRM_Mailing_BAO_Mailing.php when adding a new mailing (add() method), there is a condition to check if 'reply-to' field is set and if it is not set, then 'from-email' is used. here instead if using if(!isset($params['replyto_email']))... we should use if(empty($params['replyto_email']))... so that empty string like '' will also be considered and reply-to could not be NULL

Edited May 21, 2018 by varshith
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking