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

    Sorry my english is poor.

    I’m using version 1.0.2 of modx.

    I’ve got several prob of this modx (problem about error when i’m saving snippets), i would like to change my version of modx with a earlier version (0.9.6.3).

    Is is possible to move the version and keeping my website alive ?

    Tks you very very much for your answert
      • 34120
      • 236 Posts
      I’m not sure about the moving versions.

      About the snippet problem, what is the error message? "Method Not Implemented
      GET" ?
        • 7606
        • 39 Posts
        It’s a very very long message of errors :
        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: '\xC3\x80\xC3\x81\xC3\x82...' for column 'snippet' at row 1 »
              SQL: INSERT INTO `modx`.`modx_site_snippets` (name, description, snippet, moduleguid, locked, properties, category) VALUES('test', '', '\r\n\r\nif(isset($_FILES[\'photo\']))\r\n{\r\n // params\r\n unset($erreur);\r\n $extensions_ok = array(\'doc\', \'docx\');\r\n $taille_max = 100000;\r\n $dest_dossier = \'frecu/\';\r\n // vérifications\r\n if( !in_array( substr(strrchr($_FILES[\'photo\'][\'name\'], \'.\'), 1), $extensions_ok ) )\r\n {\r\n $erreur = \'Veuillez sélectionner un fichier de type doc ou docx !\';\r\n }\r\n elseif( file_exists($_FILES[\'photo\'][\'tmp_name\'])\r\n and filesize($_FILES[\'photo\'][\'tmp_name\']) > $taille_max)\r\n {\r\n $erreur = \'Votre fichier doit faire moins de 500Ko !\';\r\n }\r\n // copie du fichier\r\n if(!isset($erreur))\r\n {\r\n $dest_fichier = basename($_FILES[\'photo\'][\'name\']);\r\n // formatage nom fichier\r\n // enlever les accents\r\n $dest_fichier = strtr($dest_fichier, \'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ\', \'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiii ioooooouuuuyy\');\r\n // remplacer les caracteres autres que lettres, chiffres et point par _\r\n $dest_fichier = preg_replace(\'/([^.a-z0-1]+)/i\', \'_\', $dest_fichier);\r\n // copie du fichier\r\n move_uploaded_file($_FILES[\'photo\'][\'tmp_name\'], $dest_dossier . $dest_fichier);\r\n }\r\n}\r\n\r\n', ' ', '0','', '0');
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9135 s   
          Total:    1259313191.9155 s   
        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: '\xC3\x80\xC3\x81\xC3\x82...' for column 'description' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,'Parser','\n \n \n \n \n
        « MODx Parse Error »
        \n \n \n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \'\\xC3\\x80\\xC3\\x81\\xC3\\x82...\' for column \'snippet\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_site_snippets` (name, description, snippet, moduleguid, locked, properties, category) VALUES(\'test\', \'\', \'\\r\\n\\r\\nif(isset($_FILES[\\\'photo\\\']))\\r\\n{\\r\\n // params\\r\\n unset($erreur);\\r\\n $extensions_ok = array(\\\'doc\\\', \\\'docx\\\');\\r\\n $taille_max = 100000;\\r\\n $dest_dossier = \\\'frecu/\\\';\\r\\n // vérifications\\r\\n if( !in_array( substr(strrchr($_FILES[\\\'photo\\\'][\\\'name\\\'], \\\'.\\\'), 1), $extensions_ok ) )\\r\\n {\\r\\n $erreur = \\\'Veuillez sélectionner un fichier de type doc ou docx !\\\';\\r\\n }\\r\\n elseif( file_exists($_FILES[\\\'photo\\\'][\\\'tmp_name\\\'])\\r\\n and filesize($_FILES[\\\'photo\\\'][\\\'tmp_name\\\']) > $taille_max)\\r\\n {\\r\\n $erreur = \\\'Votre fichier doit faire moins de 500Ko !\\\';\\r\\n }\\r\\n // copie du fichier\\r\\n if(!isset($erreur))\\r\\n {\\r\\n $dest_fichier = basename($_FILES[\\\'photo\\\'][\\\'name\\\']);\\r\\n // formatage nom fichier\\r\\n // enlever les accents\\r\\n $dest_fichier = strtr($dest_fichier, \\\'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ\\\', \\\'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiii ioooooouuuuyy\\\');\\r\\n // remplacer les caracteres autres que lettres, chiffres et point par _\\r\\n $dest_fichier = preg_replace(\\\'/([^.a-z0-1]+)/i\\\', \\\'_\\\', $dest_fichier);\\r\\n // copie du fichier\\r\\n move_uploaded_file($_FILES[\\\'photo\\\'][\\\'tmp_name\\\'], $dest_dossier . $dest_fichier);\\r\\n }\\r\\n}\\r\\n\\r\\n\', \' \', \'0\',\'\', \'0\');\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9135 s   
          Total:    1259313191.9155 s   
        ','1')
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9263 s   
          Total:    1259313191.9283 s   
        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: '\xC3\x80\xC3\x81\xC3\x82...' for column 'description' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,'Parser','\n \n \n \n \n
        « MODx Parse Error »
        \n \n \n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \'\\xC3\\x80\\xC3\\x81\\xC3\\x82...\' for column \'description\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\'Parser\',\'\\n \\n \\n \\n \\n
        « MODx Parse Error »
        \\n \\n \\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\'\\\\xC3\\\\x80\\\\xC3\\\\x81\\\\xC3\\\\x82...\\\' for column \\\'snippet\\\' at row 1 »
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9135 s   
          Total:    1259313191.9155 s   
        \',\'1\')\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9263 s   
          Total:    1259313191.9283 s   
        ','1')
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9271 s   
          Total:    1259313191.9290 s   
        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: '\xC3\x80\xC3\x81\xC3\x82...' for column 'description' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,'Parser','\n \n \n \n \n
        « MODx Parse Error »
        \n \n \n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \'\\xC3\\x80\\xC3\\x81\\xC3\\x82...\' for column \'description\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\'Parser\',\'\\n \\n \\n \\n \\n
        « MODx Parse Error »
        \\n \\n \\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\'\\\\xC3\\\\x80\\\\xC3\\\\x81\\\\xC3\\\\x82...\\\' for column \\\'description\\\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\\\'Parser\\\',\\\'\\\\n \\\\n \\\\n \\\\n \\\\n
        « MODx Parse Error »
        \\\\n \\\\n \\\\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\\\\\'\\\\\\\\xC3\\\\\\\\x80\\\\\\\\xC3\\\\\\\\x81\\\\\\\\xC3\\\\\\\\x82...\\\\\\\' for column \\\\\\\'snippet\\\\\\\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_site_snippets` (name, description, snippet, moduleguid, locked, properties, category) 
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9135 s   
          Total:    1259313191.9155 s   
        \\\',\\\'1\\\')\\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9263 s   
          Total:    1259313191.9283 s   
        \',\'1\')\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9271 s   
          Total:    1259313191.9290 s   
        ','1')
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9278 s   
          Total:    1259313191.9298 s   
        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: '\xC3\x80\xC3\x81\xC3\x82...' for column 'description' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,'Parser','\n \n \n \n \n
        « MODx Parse Error »
        \n \n \n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \'\\xC3\\x80\\xC3\\x81\\xC3\\x82...\' for column \'description\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\'Parser\',\'\\n \\n \\n \\n \\n
        « MODx Parse Error »
        \\n \\n \\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\'\\\\xC3\\\\x80\\\\xC3\\\\x81\\\\xC3\\\\x82...\\\' for column \\\'description\\\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\\\'Parser\\\',\\\'\\\\n \\\\n \\\\n \\\\n \\\\n
        « MODx Parse Error »
        \\\\n \\\\n \\\\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\\\\\'\\\\\\\\xC3\\\\\\\\x80\\\\\\\\xC3\\\\\\\\x81\\\\\\\\xC3\\\\\\\\x82...\\\\\\\' for column \\\\\\\'description\\\\\\\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\\\\\\\'Parser\\\\\\\',\\\\\\\'\\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n
        « MODx Parse Error »
        \\\\\\\\n \\\\\\\\n \\\\\\\\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\\\\\\\\\\\\\'\\\\\\\\\\\\\\\\xC3\\\\\\\\\\\\\\\\x80\\\\\\\\\\\\\\\\xC3\\\\\\\\\\\\\\\\x81\\\\\\\\\\\\\\\\xC3\\\\\\\\\\\\\\\\x82...\\\\\\\\\\\\\\\' for column \\\\\\\\\\\\\\\'snippet\\\\\\\\\\\\\\\' at row 1 »
        
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9135 s   
          Total:    1259313191.9155 s   
        \\\\\\\',\\\\\\\'1\\\\\\\')\\\\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9263 s   
          Total:    1259313191.9283 s   
        \\\',\\\'1\\\')\\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9271 s   
          Total:    1259313191.9290 s   
        \',\'1\')\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9278 s   
          Total:    1259313191.9298 s   
        ','1')
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9289 s   
          Total:    1259313191.9309 s   
        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: '\xC3\x80\xC3\x81\xC3\x82...' for column 'description' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,'Parser','\n \n \n \n \n
        « MODx Parse Error »
        \n \n \n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \'\\xC3\\x80\\xC3\\x81\\xC3\\x82...\' for column \'description\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\'Parser\',\'\\n \\n \\n \\n \\n
        « MODx Parse Error »
        \\n \\n \\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\'\\\\xC3\\\\x80\\\\xC3\\\\x81\\\\xC3\\\\x82...\\\' for column \\\'description\\\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\\\'Parser\\\',\\\'\\\\n \\\\n \\\\n \\\\n \\\\n
        « MODx Parse Error »
        \\\\n \\\\n \\\\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\\\\\'\\\\\\\\xC3\\\\\\\\x80\\\\\\\\xC3\\\\\\\\x81\\\\\\\\xC3\\\\\\\\x82...\\\\\\\' for column \\\\\\\'description\\\\\\\' at row 1 »
              SQL: INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,3,1259313191,\\\\\\\'Parser\\\\\\\',\\\\\\\'\\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n
        « MODx Parse Error »
        \\\\\\\\n \\\\\\\\n \\\\\\\\n
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Incorrect string value: \\\\\\\\\\\\\\\'\\\\\\\\\\\\\\\\xC3\\\\\\\\\\\\\\\\x80\\\\\\\\\\\\\\\\xC3\\\\\\\\\\\\\\\\x81\\\\\\\\\\\\\\\\xC3\\\\\\\\\\\\\\\\x82...\\\\\\\\\\\\\\\' for column
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9308 s   
          Total:    1259313191.9328 s   
        \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\',\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\')\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9331 s   
          Total:    1259313191.9351 s   
        \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\',\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\')\\\\\\\\\\\\\\\\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9366 s   
          Total:    1259313191.9386 s   
        \\\\\\\\\\\\\\\',\\\\\\\\\\\\\\\'1\\\\\\\\\\\\\\\')\\\\\\\\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313191.9408 s   
          Total:    1259313191.9428 s   
        \\\\\\\',\\\\\\\'1\\\\\\\')\\\\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313192.0304 s   
          Total:    1259313192.0324 s   
        \\\',\\\'1\\\')\\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313192.3034 s   
          Total:    1259313192.3054 s   
        \',\'1\')\n
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313192.5689 s   
          Total:    1259313192.5709 s   
        ','1')
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL:    0.0020 s   (1 Requests)
          PHP:    1259313193.3952 s   
          Total:    1259313193.3972 s
        
          • 34120
          • 236 Posts
          Ok, that’s not what I was thinking, sorry I can’t help. Hopefully someone else can.
          Good luck
            • 5811
            • 1,717 Posts
            @djwaves

            I think that coming back to 0.9.6.3 is not the correct solution. Your issue comes from the content of your snippet not from the MODx version.
              • 7606
              • 39 Posts
              i’m not sure !!!

              i try my php-code into a "simple" .php file and it’s working perfect.

              It’s only when i do copy/paste and click on "save" my modx-page into "snippet" directory that’s i have this prob...
                • 29774
                • 386 Posts
                Looks like that modx is choking on some characters in your snippet (are you using UTF-8 for your database? If not this may be issue - but I’m not actually sure); instead of pasting the whole snippet in you could try just including the snippet file:

                <?php
                return include($modx->config['base_path'] . 'assets/snippets/my_snippet.php');
                ?>
                
                  Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                  • 5811
                  • 1,717 Posts
                  Probably an installation issue as the current connection charset used is "eucjpms" and the charset database = utf8

                  see (in French) : http://modxcms.com/forums/index.php/topic,42753.msg256009/topicseen.html#msg256009