We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    All it needs is to connect so a valid host,password and user is all that is needed, it will work if the db does not exist yet. I just tried it with an nonexistent db and the select box populated with the collations even though the check database failed.

    Connection to host: passed... Checking database: failed - could not select database modxagain!

    I have only tested this with mysql5, i will see what happens on 4.

    If this (or similar) could be worked into the interface if could be a nice feature that could help minimize the number of issues people have with charset/collation errors.
      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

      Something is happening here, but you don't know what it is.
      Do you, Mr. Jones? - [bob dylan]
      • 7231
      • 4,205 Posts
      Just tested on mysql4, no problems. Again all it needed was a valid host, user and pass.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 5811
        • 1,717 Posts
        Find enclosed a proposal to improve the installer. As discussed previously with Shane & Jason, I have added :
        - a server test, to check the test connection and get the available collations (ajax request)
        - an update of the collation drop down list with the available collations
        - a database selection or database creation (if needed)
        - some new messages linked to the "next" button

        Tested with Firefox2.0 and IE6.0 - MySQL 5.0 - Not tested with Opera neither Safari.
        Migration mode not tested but also not modified.

        [EDIT: Removed. Deployed in 0.9.6.2]You can test this version on http://www.asso.wangba.fr/install0962_fake

        Of course, this is a fake (no access to any database, but the collations come from my database ). Only in English.

        For a good coverage of tests do as follow (or as you want laugh):

        1/ Server connexion tests

        >> To success the tests use "wangba" as host name, "root" as login name, "mysql" as password

        test1: try to do "next". => you need a login name !

        test2: entry a login name (something different of "root") eg: zzzzzz and then do "next" => you need to test your connection

        test3: do a server connection test => Connection to host: failed

        test4: do "next" => The test of your server connection has failed

        test5: try again with login name = "root" => Connection to host: passed - collations now available


        2/ Database connexion tests

        >> To success the tests use use "modx0962" as database name and mod2_ as table prefix

        test6: do "next" before any test => you need to create your database or test the selection of your database

        test7: entry database name = modx0962 and table prefix = mod3_ and do a test => Checking database: failed - table prefix already in use!

        test8: do "next" => the test of your database has failed!

        test9: entry database name = modx0962 and table prefix = mod2_ and do a test => Checking database: passed - database selected

        test10: entry database name = modxxxx and table prefix = modx_ and do a test => Checking database: passed - database created

        3/ once you have reached the "options" page do a "backward" move. You should find again your previous entries.


        Files modified :
        - action.options.php - to correct the database_connection_charset initialisation
        - action.connection.php
        - style.css
        - english.inc.php. Lot of messages have been modified. Others languages files should be updated !!!

        New files:
        2 js files included in the action.connection.php (Not in header.php to avoid addEvent on inexisting elements )
        - connection.js : runs the ajax request to connection.xxx.php
        - connection.mootools.1.11.js (limited to Core, Class, Native, Element.Event, Element.Form, Window.DomReady, XHR, Ajax)

        - connection.servertest.php : test the server connection
        - connection.databasetest.php : test the selection of database or create the database
        - connection.collation.php : get the available collations


        This needs a JIRA ticket first of all. Then you attach a patch (a unified diff created by running svn diff on your local working copy containing your changes). You can also create a code review and attach the patch so the team can review the code using Crucible; this way we can review the changes in the context of the code online as a team before we commit anything. I’d love to see that happen here as a test of this.
        I will post the updates in JIRA & crucible, as soon as I get some feedbacks.

        For those which are interesting by a local test, dowload the zip file and upgrade a copy of your installer. All the files come from the install directory except of the english langage file. Thanks for your feedbacks especially about the design.
          • 5811
          • 1,717 Posts
          See the previous post. Thanks for your feedbacks, before to post the updates in JIRA & crucible
            • 7231
            • 4,205 Posts
            Nice, looks good. All the tests worked on your remote test install. I have downloaded the files and will test locally as well.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 5811
              • 1,717 Posts
              Thanks for the tests.
              I loosed lot of time on an issue with IE >:(
              IE don’t manage properly the addEvent function on <SELECT></SELECT> tag. So I was obliged to enclosed this tag by a DIV to add the event.
              An other difficulty (for me) was to add twice the same type of event(click) on the same <a>test server link</a>. Rather to use the addEvents function of Mootools, I choose to:
              1/ do the test connection, get the collations, populate the drop down list
              2/ and then, test the connection and display the status message
              3/ and then, if the status is "passed", set the color of the drop dow list to green

              Rather to use grey buttons, I prefer links, but may be it is not sharing by everybody.
              In the same way, the green drop down list is a personal choice which could be changed to be conform to the graphical chart
                • 5811
                • 1,717 Posts
                I discover the post [TEST ME] Install mod to verify MySQL version + strict mode. I have downloaded on 11th of march, the source code of action.connexion.php and I didn’t see the modifications regarding MySQL 5.0.51 or strict mode sad
                Is this code validated ? If yes, I could be relevant to integrate these updates too.

                I have posted the "database charset connection value empty" issue both in Tracker and Jira. And then created a code review under crucible
                  • 7231
                  • 4,205 Posts
                  I am not sure if 5.0.5.1 is the only release with bug. I think that 5.0.5.1a might also be bugged, but I am not sure. I am confident regarding the safe-mode check.
                    [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                    Something is happening here, but you don&#39;t know what it is.
                    Do you, Mr. Jones? - [bob dylan]
                    • 5811
                    • 1,717 Posts
                    Find enclosed a new version of installer for the 0.9.6.2 version. COMMITED on REV3724
                    This proposal correct #MODx87 and #MODx141

                    #MODx87 : see http://modxcms.com/forums/index.php/topic,23664.msg146324.html#msg146324
                    - a server test, to check the test connection and get the available collations (ajax request)
                    - an update of the collation drop down list with the available collations
                    - a database selection or database creation (if needed)
                    - some new messages linked to the "next" button

                    #MODx141 : see http://modxcms.com/forums/index.php/topic,23164.0.html
                    - Warnings for MySQL version 5.0.51 + strict mode

                    Tested with Firefox2.0 and IE6.0 - MySQL 5.0 - Not tested with Opera neither Safari.
                    Migration mode not tested but also not modified. Should be tested.

                    To test in local, this installer find :
                    1/ a patch to SVN3704 (differences for updated files and new files)
                    or
                    2/ a complete new installer (update of SVN3704)

                    English language only available (other language files should be translated after)

                    You can test this version on http://www.asso.wangba.fr/install0962_fake
                    See here for more informations about possibles tests. Tests with MySQL 5.0.51 and strict mode not available.

                    Thanks for your feedbacks (issues, comments) before to validate this update for 0.9.6.2.
                      • 5811
                      • 1,717 Posts
                      This new version solve two majors issues #MODx87 and #MODx141. Thanks for your contribution.