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

    I’m not sure if I’m on the right section, but I need help.
    I installed Easynewsletter and I have an HTML code which I copied and paste it in the create newsletter by clicking on the HTML button. After copying I will save the newsletter and this is what I get: Could you please tell me what do I need to fix here as I’m very new to this CMS?
    Thanks


    Deprecated: Function ereg_replace() is deprecated in C:\wamp\www\modx-1.0.4\assets\modules\easynewsletter\backend.php on line 188« MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’Arial’, sans-serif; font-size: 10px; font-weight: normal; ’ at line 1 »
    SQL: INSERT INTO easynewsletter_newsletter VALUES(’’, now(), ’’,’’, ’’, ’Newsletter 1’, ’


      • 1778
      • 659 Posts
      Quote from: tintincute at Aug 05, 2010, 06:17 AM

      [i]
      Deprecated: Function ereg_replace() is deprecated in C:\wamp\www\modx-1.0.4\assets\modules\easynewsletter\backend.php on line 188« MODx Parse Error »

      You have to change the line 188 in the file "C:\wamp\www\modx-1.0.4\assets\modules\easynewsletter\backend.php";
      change "ereg_replace()" by "preg_replace()" - ereg() and eregi() are deprecated in PHP 5.3 and have to be replaced by "preg" (preg_match(), preg_match_all(), etc...)
      Have a look at the php doc for more info...
      Hope this helps
      Cheers
        • 4310
        • 2,310 Posts
        In assets\modules\easynewsletter\backend.php at around line 188 & 197, try replacing :
        $testo = ereg_replace('src="assets/images/','src="'.$site_url.'assets/images/',$_POST['tvmailMessage']);
        

        With :
        $testo = preg_replace('/src="assets\/images\//', 'src="'.$site_url.'assets/images/',$_POST['tvmailMessage']);
          • 30086
          • 110 Posts
          ok thanks for your help again. i will re-install the TXNewsletter and see if it will have the same problems again
          I just uninstalled the wamp and installed xampp

            • 4310
            • 2,310 Posts
            If you’re using PHP 5.3 in either WAMP or XAMPP the function ereg_replace() is deprecated, so the code would need to be changed for easynewsletters