We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40029
    • 52 Posts
    Do not know if this goes here,
    but so I hope to help others who are upgrading their servers.
    new upgrades of PHP on CentOS servers, causing the crash of ACE as RichText

    June 30 1:35:53 Updated: php-common-3.5.14-6.el5.art.i386
    June 30 1:35:53 Updated: php-pdo-5.3.14-6.el5.art.i386
    June 30 1:35:54 Updated: php-cli-5.3.14-6.el5.art.i386
    June 30 1:35:55 ​​Updated: php-3.5.14-6.el5.art.i386
    June 30 1:35:55 ​​Updated: php-xmlrpc-3.5.14-6.el5.art.i386
    June 30 1:35:55 ​​Updated: php-pgsql-5.3.14-6.el5.art.i386
    June 30 1:35:56 Updated: php-snmp-3.5.14-6.el5.art.i386
    June 30 1:35:56 Updated: php-odbc-3.5.14-6.el5.art.i386
    June 30 1:35:56 Updated: php-mysql-5.3.14-6.el5.art.i386
    June 30 1:35:56 Updated: php-imap-3.5.14-6.el5.art.i386
    June 30 1:35:57 Updated: php-xml-5.3.14-6.el5.art.i386
    June 30 1:35:57 Updated: php-gd-3.5.14-6.el5.art.i386
    June 30 1:35:57 Updated: php-mbstring-3.5.14-6.el5.art.i386
    June 30 1:36:01 Updated: php-devel-5.3.14-6.el5.art.i386

    however, "CodeMirror" still works.


    theoretically this story is valid also for other systems, but I can only secure it so I could try.
    The 5.3 has a good list of incompatibilities that must be taken into account, and may also have other extras not work well.

     http://www.php.net/manual/en/migration53.incompatible.php

    Regards. [ed. note: rtoskit last edited this post 14 years, 3 months ago.]
      Developer of RTOS and Drivers
      Specializes in portability of BSD/Linux
      • 39194
      • 149 Posts
      I have tested ACE on php 5.3.9 and did not find any problem.
      I don't think, that ACE uses any version-specific features in its own code.
      So, could you describe error you got?
        • 40029
        • 52 Posts
        Quote from: danya_postfactum at Jun 30, 2012, 05:38 PM
        I have tested ACE on php 5.3.9 and did not find any problem.
        I don't think, that ACE uses any version-specific features in its own code.
        So, could you describe error you got?


        Hi Danil,

        There is no error, everything is just completely blank, as if not installed any rich text.

        I can pass you the list of all the updates from yesterday including perl and other modules, but I do not think are related.

        Or if you want, I'll open a virtual server on a machine updated tonight with MODx installed and so you can try it yourself.

        Regards.
        [ed. note: rtoskit last edited this post 14 years, 3 months ago.]
          Developer of RTOS and Drivers
          Specializes in portability of BSD/Linux
          • 40029
          • 52 Posts
          yes! this is an incompatibility.
          I was able to devote some time to the problem, also because l'extra "ACE" is my "code editor" preferred.

          Apparently the 5.3 is more strict, in the treatment and control of text under interpretation online.



          Surely this concept will be very boring for an experienced programmer like you, but may be useful to others and, above all eliminates the BUG in ACE
          under PHP 5.3


          in the code of your plugin, there's something not really like, to the new PHP.

          But this can have a quick fix solution, knowing that the javascript will need braces.

          view "$mydata"
          With a concatenation of supertext:

          
          $modx->regClientStartupScript('<script type="text/javascript">'."
              // <![CDATA[
              Ext.onReady(function() {
                  var TextArea = Ext.getCmp('{$field}');
          		var CodeArea = MODx.load({
          			xtype: 'modx-codearea',
          			anchor: TextArea.anchor,
          			width: 'auto',
          			height: TextArea.height,
          			name: TextArea.name,
          			value: TextArea.getValue(),
          			mode: '{$mode}'
          		});
          		
                  TextArea.el.dom.name = '';
                  TextArea.el.setStyle('display', 'none');
                  CodeArea.render(TextArea.el.dom.parentNode);
          		CodeArea.on('change', function(e){TextArea.fireEvent('keydown', e);});
          	});
          	Ext.apply(MODx.lang, { ".$mydata."});
              // ]]>
          ".'</script>', true);
          
          
          





          Not associated with an interpretation:

          
          $modx->regClientStartupScript('<script type="text/javascript">'."
              // <![CDATA[
              Ext.onReady(function() {
                  var TextArea = Ext.getCmp('{$field}');
          		var CodeArea = MODx.load({
          			xtype: 'modx-codearea',
          			anchor: TextArea.anchor,
          			width: 'auto',
          			height: TextArea.height,
          			name: TextArea.name,
          			value: TextArea.getValue(),
          			mode: '{$mode}'
          		});
          		
                  TextArea.el.dom.name = '';
                  TextArea.el.setStyle('display', 'none');
                  CodeArea.render(TextArea.el.dom.parentNode);
          		CodeArea.on('change', function(e){TextArea.fireEvent('keydown', e);});
          	});
          	Ext.apply(MODx.lang, { ${$mydata}});
              // ]]>
          ".'</script>', true);
          
          
          



          It is very important, the space between the first parentisi and the dollar sign!

          SI
           ... { ${action ...   
          NO
           ... {${action ...   



          There are also other solutions concatenation, but they increase the running time.


          But all this only serves to not generate javascript errors, the error was actually generated in the "method" "modLexicon :: fetch" but not because of the role, if not because of the data to be processed.
          Banal as corrupt data in your file "default.inc.php"




          What this is?
          $_lang['ui_ace.message_replaced'] = 'Ïðîèçâåëîñü çàìåí: [[+count]].'; 


          and I thought, write bad English smiley
          $_lang['ui_ace.message_replaced'] = 'Changed: [[+count]].';



          If it is demonstrated that the earlier versions of PHP simply generate an error, returning a "big white" (display_errors == 0), and the new version tries to overcome the error, through everything you read, and that in other passages the program causes errors of interpretation, parsing, etc

          I think that's a good practice in any case, generating a model code "assert"
          or replace the errors with "empty valid" in this way:

          $lang = $modx->toJSON($modx->lexicon->fetch('ui_ace'));
          $lang = ($lang)?$lang:'{ }';
          
          ...
          
          $modx->regClientStartupScript('<script type="text/javascript">'."
              // <![CDATA[
              Ext.onReady(function() {
                  var TextArea = Ext.getCmp('{$field}');
          		var CodeArea = MODx.load({
          			xtype: 'modx-codearea',
          			anchor: TextArea.anchor,
          			width: 'auto',
          			height: TextArea.height,
          			name: TextArea.name,
          			value: TextArea.getValue(),
          			mode: '{$mode}'
          		});
          		
                  TextArea.el.dom.name = '';
                  TextArea.el.setStyle('display', 'none');
                  CodeArea.render(TextArea.el.dom.parentNode);
          		CodeArea.on('change', function(e){TextArea.fireEvent('keydown', e);});
          	});
          	Ext.apply(MODx.lang, $lang);
              // ]]>
          ".'</script>', true);
          
          



          take this opportunity to congratulate you for the development of the extra "ACE" is an indispensable component for who writes much code directly on the server.



          Greetings.


          PS. I hope you will later take more seriously the signs of bugs.
          In my humble opinion: what makes it useful open source projects, is the dialogue between developers and users
            Developer of RTOS and Drivers
            Specializes in portability of BSD/Linux
            • 39194
            • 149 Posts
            Great! Thank you, Maurizio!

            I have placed the project to github: http://github.com/danyaPostfactum/modx-ace

            I have already pushed fixes you offer, so, could you go to github, download package, build it and test in your environment?

            To build package, you have to rename build.config.sample.php to build.config.php, define your MODX_BASE_PATH there, and run build.transport.php. (built package will be placed to core/packages).
            Then you go to manager and run local package search and install.

            By the way, I am not so experienced as you think smiley
            I hope you will later take more seriously the signs of bugs.
            I didn't mean that ace have no bugs, I just meaned that I can't find problem, described by you, in my environment.
            Thank you again.
              • 40029
              • 52 Posts
              Hi Danil,
              Ok! when I release a little work, I will try.

              My work environment is the most common that you can find in the "web service":
              dedicated servers, high performance x86, OS: CentOS and Miracle Linux(new entry),
              Management panels: Virtuemin, Webmin and Cloudmin.
              httpd: Apache 2.
              Apps: PHP, RoR and ZK.
              web cms: MODx or nothing!
              i18n: en, es, it
              char format: UTF-8

              if something is based on all this, you have secured 70% market share (the percentual I just invented smiley, but it seems to me real)
              We always update our servers, 10 days after leaving the official updates.
              We manage all our clients, because if we decided to install an extra we do in all of our clients, so I was so sure it was an incompatibility, because at the same time, "the extra ACE", stopped going at all servers on which the update had been made.

              Regards
                Developer of RTOS and Drivers
                Specializes in portability of BSD/Linux