We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27106
    • 147 Posts
    Can anyone suggest how to put an "Unsubscribe" link in an email created using Bob Ray's Subscribe add-on.

    The classic use case here is that the user clicks the "Unsubscribe" link in their email and the system a) brings up a web page telling them that they have been unsubscribed; or b) takes them to a web page saying "if you are sure you want to unsubscribe, click here" with an "Unsubscribe" form button underneath. In either case, the username and password need to be passed (in encrypted form) to log the user in before that page comes up.

    [Using MODX Revolution 2.2.4-pl (traditional) and Subscribe 1.1.4-pl]

    [ed. note: shorewalker last edited this post 13 years, 9 months ago.]
      David Walker
      Principal, Shorewalker DMS
      Phone: 03 8899 7790
      Mobile: 0407 133 020
      • 3749
      • 24,544 Posts
      I don't know of an easy way to do this, though it's a good feature request. Subscribe Users who log in will see a "Manage Preferences" option in the menu. That will take them to a page where they can unsubscribe.
        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
        • 38076
        • 15 Posts
        Hi Bob,
        I just installed and tried to configure subscribe 1.2.1 and Notify 1.1.1 and they seem to work fine so far but there's supposed to be a link to manage preferences or unsubscribe placed in the emails but I can't seem to get that to happen. Is there some manual way to do that?

        Have I understood it correctly that the user gets logged in through that link and doesn't have to login separately?

          • 3749
          • 24,544 Posts
          Yes, that's how it's supposed to work. The insertion of the unsubscribe/manage prefs link is not working for me right now either. I'll try to look into it today or tomorrow.
            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
            • 3749
            • 24,544 Posts
            I released Notify 1.1.2, which should fix this.

            If the upgrade doesn't show up in Package Manager, click on "Download" and put "Notify" in the Search Box.

            Thanks for letting me know about the problem.
              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
              • 38076
              • 15 Posts
              Thanks for answering so quickly.
              The link is there now but it seems to log in as admin user, no matter what user it's sent to - even if the admin is logged out. That's of course a huge security problem.

              When I installed this update, I got the following error message so maybe that has something to do with it:

              Error 23000 executing statement: INSERT INTO `modx_element_property_sets` (`element`, `element_class`, `property_set`) VALUES (66, 'modSnippet', 3) Array ( [0] => 23000 [1] => 1062 [2] => Duplicate entry '66-modSnippet-3' for key 'PRIMARY' ) 


              No idea what that's about.
                • 3749
                • 24,544 Posts
                That would be serious. I'll check on it. Of course that looked normal to me when I tested it, since I AM the admin user.
                  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
                  • 38076
                  • 15 Posts
                  I played around with some more and it doesn't seem to actually log me in as admin. It just takes me to the manage-preferences page of the admin user and those can then be changed. But you still can't then just go to the manager as admin (fortunately). But they will at least be shown the admin username.

                  Still the point is that the user can edit their own preferences or unsubscribe. So for now, I'll work around it by including a link to the login page and redirect that to the manage-preferences page. That works fine and it's only an extra step for the user.
                    • 3749
                    • 24,544 Posts
                    I'm still looking into this. I've reproduced the problem on my local install, but I still haven't figured out what's happening. It's good to know that it doesn't give users manager access. Thanks for checking that out.

                    It was all working before and none of the link-creation code has changed, but everyone seems to get the same encoded link. It's a mystery.

                      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