We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48421
    • 19 Posts
    Hi

    I'm using the Notify and Login extras on a website I'm working on. Everyone who registers is added to the 'Members' group and they have the option of registering for customer alerts via the use of an extended field called 'propertyAlerts'. The extended field can have a value of 'Yes' or 'No', based upon the checkbox that is completed when registering and updating their profile.

    I've set the following system settings values as per Bob's guides tutorial - http://bobsguides.com/notify-tutorial.html:

    sbs_use_comment_field - 'No'
    sbs_extended_field - 'propertyAlerts'

    My Notify snippet property set has had the following changes made (Property : Value):

    groups : 'Members'
    tags: 'Yes' (text field)
    useExtendedFields: 'Yes'

    If I launch the Notify extra via the TV button, the 'Groups' field is pre-populated with the value of 'Members' and the 'Tags' field contains the value 'Yes'. If I check 'Notify Subscribers' and hit 'submit', the form processes but doesn't send the email - I get the 'No Messages Sent' result. However, if I remove the value of 'Yes' from the 'tags' field, the email is sent successfully (via Mandrill) and received by the test user email address.

    I've tried changing the values used within the extended field 'propertyAlerts' to '1/0' combinations and still cannot get the Notify extra to send emails when the 'tags' field contains a value. I've tried enabling the 'debug' option, but cannot seem to see where this information is output and the error log doesn't contain anything useful. By the look of it, this is something to do with either the custom field and it's configuration, or the values, can anyone help?

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      Are these System Settings (they should be)?

      sbs_use_comment_field - 'No'
      sbs_extended_field - 'propertyAlerts'

      Also, the first one has to be a literal 'No', which means it must be a text field, not a Yes/No field.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 48421
        • 19 Posts
        Hi Bobray

        Thanks for the reply, the 'sbs_use_comment_field' was set to a Yes/No field instead of a Text field. Making that change has resolved the issue.
          • 3749
          • 24,544 Posts
          FYI, the correct fix would be to change line 452 of the
          core\components\notify\processors/mgr/nfsendemail.class.php file to this:

            if ($this->modx->getOption('sbs_use_comment_field', NULL, false, true) == false) {


          and change the Setting back to a 'Yes/No' field. That would be protect it from future upgrades.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting