We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22289
    • 41 Posts
    Hooray! OK- the fix for me was to edit line 1479 of txnewsletters.inc.php

    from:

    $html = file_get_contents($url)

    to:

    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $html = curl_exec($ch);
    curl_close($ch);
      • 7291
      • 129 Posts
      what a great addition to Modx! I tried a few other newsletter snippets to no avail and this one looks like it’s going to solve all the problems, Thanks!

      Had the same error but the above post solved it...

      Everything else is working great except the ’unsubscribe’ feature. Double checked the setup but when I click on unsubscribe it shows: www.url/%7Blink_unsubscribe%7D (takes me to the error page)

      ... not sure where I went wrong. Anyone else get such a problem?

      Thanks again for the fantastic Modx feature... especially the sorting feature for newsletters
      Derek
        [center]-- smiley --[/center]
        [center]New View Media - Custom Website Design[/center]
        [center]Custom Website Design & Marketing = Strategic Business![/center]
        • 32645
        • 377 Posts
        Hi,

        I’ve tried 3 times - but TXNewsletters never appears to be working.

        I did the following;


        1)  copied txnewsletters directory to " assets/modules/ "
        2)  created "assets/upload/" folder with read/write permissions
        3)  created TXNewsletters snippet and dumped the contents of "txnewsletters.snippet.tpl" as content
        4)  created TXNewsletters module and dumped "txnewsletters.module.tpl"
        5)  Enable parameter sharing and set up module configuration to follow;

        &emailFrom=Sending Email;text;[email protected] &newslettersBaseId=Newsletters directory (id);text;1 &nbPerPage=Item per page;text;15 &idPageSubscribe=Page Subscribe;text;1 &idPageUnsubscribe=Page Unsubscribe;text;1
        


        6) changed the dependencies so that TXNewsletters shared dependancies with module and snippet.
        7) selected "Import module shared parameters" from snippet configuration.
        8) Created 1 newsletter page (id=70) with a blank template.
        9) Put the following call in my newsletter page

        [!TXNewsletters? &action=add!]
        


        10) Changed the module parameters so that the following is true:


        • Newsletters directory (id)=70
        • Page Subscribe=70
        • Page Unsubscribe=70

        11) Logged out.
        12) Logged back in.
        13) TXNewsletters appears in my module menu bar.  If I click on it, I get no messages, no error messages, nothing.  Nothing happens.
        14) I click on the newsletter page (id=70) and there is no content. Nothing. No forms. No messages, etc.

        I’m not sure what I’ve done wrong.  Could you tell me what I’ve done wrong? Thanks.

        All I get whenever I try to run the module, or click the module name is a blank page. There are not even any new tables added in MySQL?!

          • 7291
          • 129 Posts
          Just had a quick browse at your list and it looks like you missed a few minor steps...have a thorough read through
          http://modxcms.com/TXNewsletters-0.9-1942.html

          It definitely works nicely... I just can’t get the unsubscribe to work
            [center]-- smiley --[/center]
            [center]New View Media - Custom Website Design[/center]
            [center]Custom Website Design & Marketing = Strategic Business![/center]
            • 32645
            • 377 Posts

            Sorry. I tried again. From scratch. But its still not working.  I keep getting a blank page when I try to run the module.

            I followed all the steps on http://modxcms.com/TXNewsletters-0.9-1942.html  and even created an empty newsletter template.

            But I don’t think its the templates, but there must be something wrong with the module as it doesn’t even run. At all.

            I’m going to try one more time offline, but to be honest - its very frustrating.  Any possibility you could upload a screencast of the steps you took to install this software?

            Thanks.


            I’ve got TXNewsletters working offline with no problem at all.

            It looks like there is an issue with Module IDs. But I’m going to try one more time on the live site to see if I can fix it.
              • 4775
              • 47 Posts
              Anyone getting this error?:
              Fatal error: Call to undefined function: date_default_timezone_set() in /assets/modules/txnewsletters/txnewsletters.inc.php on line 4


              Here are lines 1-8:
              <?php
              
              ini_set ('max_execution_time', 360);
              date_default_timezone_set('UTC');
              
              if (version_compare(PHP_VERSION,'5','>='))
                require_once('domxml-php4-to-php5.php'); //Load the PHP5 converter
              
              • That function was introduced in PHP 5. Furthermore, if you’re using PHP 5 not having it will cause an error message.

                There is some more information here

                http://drakecms.sourceforge.net/index.php?option=content&id=32&Itemid=10

                (his CMS sounds interesting as well!)
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 13912
                  • 7 Posts
                  jeffrhysjones Reply #18, 16 years ago
                  This module looks awesome.

                  I have followed all the steps but it seems something is not quite right. At first I thought I had nailed it first time, the module page seems to work - tables obviously created fine, and I can download newsletters - so that also works, I also can place the subscribe widget etc.

                  But I can’t subscribe!

                  The problem I have is common to both the ’add item’ on the module side, and subscribe widget on the web user side.

                  I add the item on the module side, and the page appears to refresh, but not items are listed. So it didn’t take the subscription. There’s no error.

                  On the web user side, I sign myself up, save it, and the page refreshes to a blank screen. There is no subscriber in the system. Again, there is no error.

                  I really have followed the (very good) instructions to the letter - so I can’t really figure out where I’ve gone wrong...

                  I’m a bit of newb to php - can someone give me some pointers on enabling some debug on the server (I have full desktop access to it) - perhaps I can try to get some clues as to what’s going wrong?

                  Cheers,

                  J
                    • 7291
                    • 129 Posts
                    Same thing happened to me when I tried to change around the config xml file (order and adding new items to the form).

                    Were you able to subscribe with the original config file? Might want to try that first then make changes after...
                      [center]-- smiley --[/center]
                      [center]New View Media - Custom Website Design[/center]
                      [center]Custom Website Design & Marketing = Strategic Business![/center]
                      • 13912
                      • 7 Posts
                      jeffrhysjones Reply #20, 16 years ago
                      Hey thanks for the reply!

                      Nope I’m using the default XML file.

                      Blank screen issues like this are the most frustrating as you’re not given any clues as to what’s the problem.

                      Did you get it working after you changed your XML file?

                      J