On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi!
    Unfortunately, GoodNews UnSubscription does not work on my website. This does not work on the direct link either for the page (for example, GoodNews Unsubscribe)
    GoodNews generates normal Format string with security key for each
    [[~[[*id]]]]?sid=[[!+sid]]
    , but after execution there is an incorrect transformation
    http://test.loc/index.php?id=GoodNews Unsubscribe page id ? sid=security key for each subscriber
    . User is not removed from the User's list.
    The same thing happens with the link in the template.
    <a href="http://test.loc:/index.php?id=GoodNews Unsubscribe page id ? sid=security key for each subscriber"...>Unsubscribe</a>

    Reset to start page (configured in MODX for error page)

    -- Apache 2.4.35
    -- PHP 5.6.38
    -- MODX Revolution 2.6.5-pl (traditional)
    -- MySQL 5.6.43-cll-lve
    -- There are no errors on the log
    You can check it at the link http://signboard.by/index.php?id=23 http://signboard.by/goodnews-subscription.html for Subscription and UnSubscription

    I can not understand what my mistake. Please help.

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

    [ed. note: septon last edited this post 2 years, 5 months ago.]
    • This is not a normal URL:

      http://test.loc/index.php?id=GoodNews Unsubscribe page id?sid=security


      There should only be one question mark to indicate the query string. It should look like this:

      http://test.loc/index.php?id=GoodNews Unsubscribe page id&sid=security


      GoodNews may require that you have Friendly URLS on and working. Did you create an .htaccess file with the FURLs part uncommented. And do you have the Friendly URLs System Setting turned on?

      FYI, You can go to this page and request support if you paid for it less than a year ago: http://www.bitego.com/extras/goodnews/goodnews-support.html.

        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
      • Quote from: septon at Feb 28, 2019, 07:17 PM
        Hi!
        Unfortunately, GoodNews UnSubscription does not work on my website. This does not work on the direct link either for the page (for example, GoodNews Unsubscribe)
        GoodNews generates normal Format string with security key for each [[~[[*id]]]]?sid=[[!+sid]]:
        http://test.loc/index.php?id=GoodNews Unsubscribe page id?sid=security key for each subscriber, but nothing happens. User is not removed from the User's list.
        The same thing happens with the link in the template.
        <a href="http://test.loc:/index.php?id=GoodNews Unsubscribe page id?sid=security key for each subscriber" ...="">Unsubscribe</a>
        Reset to start page (configured in MODX for error page)

        -- Apache 2.4.35
        -- PHP 5.6.38
        -- MODX Revolution 2.6.5-pl (traditional)
        -- MySQL 5.6.43-cll-lve
        -- There are no errors on the log
        You can check it at the link http://signboard.by/index.php?id=23 for Subscription and UnSubscription

        I can not understand what my mistake. Please help.

        Hello,

        as I told you in my personal mail I can't reproduce your problem! I have a test-install in a MODX 2.7.1 version and GoodNews 1.5.1-pl2. The only difference here is, that we are using PHP 7.x. But it should work on 5.6 without problems.


        Quote from: septon at Feb 28, 2019, 07:17 PM

        This does not work on the direct link either for the page (for example, GoodNews Unsubscribe)
        GoodNews generates normal Format string with security key for each [[~[[*id]]]]?sid=[[!+sid]]:
        http://test.loc/index.php?id=GoodNews Unsubscribe page id?sid=security key for each subscriber, but nothing happens. User is not removed from the User's list.
        The same thing happens with the link in the template.
        <a href="http://test.loc:/index.php?id=GoodNews Unsubscribe page id?sid=security key for each subscriber" ...="">Unsubscribe</a>
        Reset to start page (configured in MODX for error page)

        Sorry, but I think I don't understand your question. You can’t access pages with "unsubscribe" or "update-profile" snippets directly. You will need to follow the „Unsubscribe“ or „Update profile“ Links from within a newsletter. GoodNews generates individual security keys for each subscriber which is attached to the links in a newsletter. Without these secure-id’s (or wrong ids) the snippet won’t let you do anything and leads to your 404 page.

        A correct (sample) link should look like this:

        http://www.domain.com/goodnews-unsubscribe.html?sid=6924f3c9e9730cab87a6baf9f4598df9

        or

        http://www.domain.com/goodnews-subscription-update.html?sid=6924f3c9e9730cab87a6baf9f4598df9

        Hope this helps a bit...
          Freelancer @bitego http://www.bitego.com
          ---
          GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
          More infos here: http://www.bitego.com/extras/goodnews/
        • Quote from: BobRay at Feb 28, 2019, 10:19 PM
          This is not a normal URL:

          http://test.loc/index.php?id=GoodNews Unsubscribe page id?sid=security


          There should only be one question mark to indicate the query string. It should look like this:

          http://test.loc/index.php?id=GoodNews Unsubscribe page id&sid=security


          Thanks for jumping in Bob!
          He probably posted only a sample url with placeholder values...

          Quote from: BobRay at Feb 28, 2019, 10:19 PM
          GoodNews may require that you have Friendly URLS on and working. Did you create an .htaccess file with the FURLs part uncommented. And do you have the Friendly URLs System Setting turned on?

          GoodNews doesn't require to use friendly URLs so that can't be the problem. I think something is wrong in his MODX setup.
            Freelancer @bitego http://www.bitego.com
            ---
            GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
            More infos here: http://www.bitego.com/extras/goodnews/
          • Dear friends!
            Thank you all and I will explain what I had in mind by writing the query string:
            The initial query string is leaving correctly.
            http://test.loc/index.php?id=GoodNews Unsubscribe page id&sid=security
            ,
            but then, after executing the <form> turns it into an incorrectly written
            http://test.loc/index.php?id=GoodNews Unsubscribe page id?sid=security 


            Thanks to BobRay
            GoodNews may require that you have Friendly URLS on and working. Did you create an .htaccess file with the FURLs part uncommented. And do you have the Friendly URLs System Setting turned on?
            This really fixed the problem. And since I did not use FURL in the test page, of course I did not configure .htaccess.

            Thanks to Martin!
            GoodNews doesn't require to use friendly URLs so that can't be the problem. I think something is wrong in his MODX setup.
            I also think that the problems in my settings this particular MODX.

            However, you lit my way, and now I know where to go. smiley
            I will spend today's night and report on the results
            • Dear friends!
              I tried to compare the dependence of the job GoodNews unsubscribing depending on the values of the fields:
              automatic_alias; friendly_urls; use_alias_path & and settings FURL in .htaccess
              tested on a local server with a "base" .htaccess
              # The Friendly URLs part
              RewriteCond %{REQUEST_FILENAME} !-f
              RewriteCond %{REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

              full reboot after every change.

              All the same, I am inclined to the fact that Bob is right
              GoodNews may require that you have Friendly URLS on and working.
              [s]here is a dependency table (Tested obviously false too for purification of conscience)

              automatic_alias /friendly_urls /use_alias_path /.htaccess FURL on / GoodNews unsubscribing
              no /yes /no /yes /success
              no /yes /yes /yes /success
              yes /yes /no /yes /success
              yes /yes /yes /yes /success
              no /no /no /yes /don't work
              no /no /yes /yes /don't work
              yes /no /no /yes /don't work
              yes /no /yes /yes /don't work
              no /no /no /no /don't work
              no /no /yes /no /don't work
              yes /no /no /no /don't work
              yes /no /yes /no /don't work
              no /yes /no /no /Object not found!
              no /yes /yes /no /Object not found!
              yes /yes /no /no /Object not found!
              yes /yes /yes /no /Object not found!

              Thank you all for your help!
              [ed. note: septon last edited this post 2 years, 5 months ago.]
              • Friendly URLS off - not working unsubscribe,
                Friendly URLS on -do not send reach the recipient of the letters,all reports come, no errors.
                I do not understand what to do.
                I proceed from the postulate of Martin
                I think something is wrong in his MODX setup.
                [ed. note: septon last edited this post 2 years, 5 months ago.]
                • discuss.answer
                  :-) This is a special case when you do not use Friendly URL
                  It is easier to perceive error than to find truth...
                  Goethe
                  Early on in your beginning, I drew your attention to incorrect handling POST requests for sending an unsubscribe:
                  http://test.loc/index.php?id=GoodNews Unsubscribe page id ? sid=security key for each subscriber

                  Unfortunately, I went the wrong way, believing that there can be no errors in the code:
                  Quote from: gadgetto at Mar 01, 2019, 12:34 PM
                  GoodNews doesn't require to use friendly URLs so that can't be the problem. I think something is wrong in his MODX setup.
                  But this is not the case, and I'm not the first day of use MODx.
                  The examples of the developer are valid for Friendly URL, but without them they work incorrectly.
                  For correct processing of the request code:
                  <form action="[[~[[*id]]]]?sid=[[!+sid]]" method="post">

                  , it is necessary instead of the sign "?" to insert an ampersand "&" before sid = security.
                  Unfortunately, this is not reflected in the documentation: http://www.bitego.com/extras/goodnews/goodnews-implementation/unsubscription-snippet.html
                  the same is true for requests to change user profiles & etc...
                  <div class="main">
                      <h2>One-click unsubscription</h2>
                      [[!+error.message:notempty=`
                          <p class="errorMsg">[[!+error.message]]</p>
                      `]]
                      <p>
                          To immediately unsubscribe from our newsletter service please click the <strong>Unsubscribe now</strong> button below.
                      </p>
                      <form id="profileform" class="gon-form" action="[[~[[*id]]]]?sid=[[!+sid]]" method="post">
                          <p>
                              <button type="submit" role="button" name="goodnews-unsubscribe-btn" value="Unsubscribe" class="button green">Unsubscribe now</button>
                          </p>
                      </form>
                  </div>

                  It is only natural that the use of the Friendly URL remove this error.
                  If you replace all instances of requests for the correct code:
                  [[~[[*id]]]]&sid=[[!+sid]]

                  everything will work without using a friendly URL! smiley

                  I still think that this is the best MODX Add-ons to the organization of mailings.
                  It is better than Sendex or what I wrote myself.
                  Now I'll take find out why, when using Friendly URL, the address of the sent letter is incorrectly formed.
                  TY [ed. note: septon last edited this post 2 years, 5 months ago.]
                  • FYI, link tags can accept parameters, so this

                    action="[[~[[*id]]]]?sid=[[!+sid]]"


                    could be rewritten as

                    action="[[~[[*id]]&sid=`[[!+sid]]` ]]"


                    Note that those are back-ticks aroung the +sid tag.

                      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