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

    After spending 3 days on this, I finally found out that the use of apostrophes in the Esay Newsletter content causes MODx to produce some parsing errors as seen below. I know this because when I remove apostrophes or replace them with \’ everything works just fine.

    Here’s a snapshot of the error

    « 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 [b]’autres déclarent venir de Tunisie ou du Proche-Orient. Les réfugi’ at line 1 »
    [/b] SQL: UPDATE easynewsletter_newsletter SET subject=’SPECIAL IMPÔT’, newsletter=’
    Selon le préfet Stéphane Bouillon, certains migrants disent être des Kurdes de Syrie, d’autres déclarent venir de Tunisie ou du Proche-Orient. Les réfugiés ont été pris en charge par la Croix-Rouge.
    ’ WHERE id=’1’
    [Copy SQL to ClipBoard]

    Parser timing
    MySQL: 0.0040 s (3 Requests)
    PHP: 1264204815.3728 s
    Total: 1264204815.3768 s

    I’m running Evo 1.02 and my content is french.

    Does any one know how to resolve this issue.

    Any help will be appreciated
      A MODx Fanatic
      • 4310
      • 2,310 Posts
      I think I had the same issue a while ago, at around line 190-201 of backend.php try replacing both instances of :
      '".$testo."'

      With this :
      '".mysql_real_escape_string($testo)."'
        • 30585
        • 833 Posts
        Way to go bunk58.

        That did the trick. We should suggest this to the author for the next release or at least update the current file.
          A MODx Fanatic
          • 4310
          • 2,310 Posts
          I don’t think it’s being developed any more sad
          There are several hacks I’ve done, but the others were specific to meet clients requirements and wouldn’t be suitable for general release.