Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 933
    • Issues 933
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #133

Closed
Open
Opened 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
5.4.0
Milestone
5.4.0
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#133