We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7966
    • 90 Posts
    After the upgrade I was not able to login. There was a missing field, createdon, in users table, which was not added during the install. After adding that manually, I was able to login to Dashboard.

    I later noticed that none of the custom snippets, templates etc were available in element tab. Also, in package management no provider is available.

    The front end works without any issue.

    Here is the general info about the system and what I have done so far.

    OS - CentOS Linux 7.2.1511

    Apache/2.4.6 (CentOS) PHP/5.4.45

    5.5.47-MariaDB

    Modx - Traditional upgrade - previous modx version 2.3

    No caching plgin used

    The Error log for installation

    [2016-08-09 07:31:27] (ERROR @ /var/www/html/thewebsite/core/xpdo/om/xpdoobject.class.php : 240) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modTransportProvider.active' in 'field list'
    )
    
    [2016-08-09 07:31:27] (ERROR @ /var/www/html/thewebsite/core/xpdo/om/xpdoobject.class.php : 1452) Error 42S22 executing statement:
    INSERT INTO `modx_transport_providers` (`name`, `description`, `service_url`, `username`, `api_key`, `created`, `active`, `priority`, `properties`) VALUES ('modx.com', 'The official MODX transport facility for 3rd party components.', 'http://rest.modx.com/extras/', '', '', '2016-07-21 08:14:45', 1, 10, '')
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'active' in 'field list'
    )
    
    [2016-08-09 07:31:27] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdoobjectvehicle.class.php : 207) Error saving vehicle object of class modTransportProvider; criteria: Array
    (
        [name] => modx.com
    )
    
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/ee8371d134483fff7937d51391efe348/0/ to /var/www/html/thewebsite/index.php
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/ee8371d134483fff7937d51391efe348/1/ to /var/www/html/thewebsite/ht.access
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/0/ to /var/www/html/thewebsite/manager/assets
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/1/ to /var/www/html/thewebsite/manager/controllers
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/2/ to /var/www/html/thewebsite/manager/templates
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/3/ to /var/www/html/thewebsite/manager/min
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/4/ to /var/www/html/thewebsite/manager/ht.access
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/5/ to /var/www/html/thewebsite/manager/index.php
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdofilevehicle.class.php : 103) Could not install files from /var/www/html/thewebsite/core/packages/core/xPDOFileVehicle/ba126d573d69f603cb9e9fff31de270c/ to /var/www/html/thewebsite/connectors/
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdofilevehicle.class.php : 103) Could not install files from /var/www/html/thewebsite/core/packages/core/xPDOFileVehicle/238dc0dfc087f73caca6610efa9711d2/ to /var/www/html/thewebsite/connectors/
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdofilevehicle.class.php : 103) Could not install files from /var/www/html/thewebsite/core/packages/core/xPDOFileVehicle/02f2376dfa94726d280ea70aab3c84a3/ to /var/www/html/thewebsite/connectors/
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdofilevehicle.class.php : 103) Could not install files from /var/www/html/thewebsite/core/packages/core/xPDOFileVehicle/cbab3ef3f0a5e998264a1903ee8e5e49/ to /var/www/html/thewebsite/connectors/
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/om/xpdoobject.class.php : 240) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modTransportProvider.active' in 'field list'
    )
    
    [2016-08-09 07:31:28] (ERROR @ /var/www/html/thewebsite/core/xpdo/om/xpdoobject.class.php : 240) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modTransportProvider.active' in 'field list'
    )
    
    


    Normal error.log file after logging into Dashboard

    [2016-08-09 07:31:45] (ERROR @ /var/www/html/thewebsite/core/xpdo/om/xpdoobject.class.php : 240) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modCategory.rank' in 'field list'
    )
    
    [2016-08-09 07:32:22] (ERROR @ /var/www/html/thewebsite/core/xpdo/om/xpdoobject.class.php : 240) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modCategory.rank' in 'field list'
    )
    
    


    It looks like some of the upgrade sql scripts are not run. I have given the full permission for the modx db user, and tried to re-install.

    I have given all dirs/files the apache/apache ownership and 2777 full permission.

    Updated the htaccess with minimal default code.

    I had gone through several setup install but still get the errors and features mentioned above are not available.

    During the setup, everything is green and there is no warning message at all.

    I don't know what else to try.

    Any help and suggestions?

    Thank you
      • 3749
      • 24,544 Posts
      You don't say which version you upgraded *from*. Database changes are often made in the .0 versions (2.3.0, 2.4.0, 2.5.0), so it's important to upgrade to those versions.

      One option would be to install the major versions somewhere and find out what those missing fields look like.

      The modx_categories table field is described here:

      http://bobsguides.com/blog.html/2016/06/27/missing-db-fields-(unknown-column)/

      Adding that should get your elements back.

      I don't have a version of 2.5.0 to check, so I can't give you the modx_transport_providers field, but If you find it, post it here and I'll add it to the blog post for others.

      If you have a backup, another option would be to revert and upgrade to the major versions on the way to 2.5.1. It will be easier if you use the UpgradeMODX extra to do the upgrades.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 7966
        • 90 Posts
        Thanks Bob for the reply.

        Previous version was 2.3.1.

        That is what I was also thinking. Upgrading another modx installation and manually updating the tables.

        It looks like there is not any other option.

        I upgraded another modx, version 2.4.2, to 2.5.1 without any issues.

        Following are the manual field additions to tables, in case someone else face with the same problem.

        
        TABLE - modx_users
        
        Name: createdon
        Type: int
        Length/Values: 20
        Default: Select 'as defined' and put 0 in the box that appears
        Null Checkbox: unchecked
        
        TABLE - modx_categories
        
        Name: rank
        Type: INT
        Length/Values: 11
        Default: Select 'as defined' and put 0 in the box that appears
        Null Checkbox: unchecked
        
        
        TABLE - modx_transport_providers   
        
        Name: active
        Type: tinyint
        Length/Values: 1
        UNSIGNED
        Default: Select 'as defined' and put 0 in the box that appears
        Null Checkbox: unchecked
        
        
        Name: priority
        Type: tinyint
        Length/Values: 4
        Default: Select 'as defined' and put 10 in the box that appears
        Null Checkbox: unchecked
        
        
        
        Name: properties
        Type: mediumtext
        collation: what ever collation you have for fields like "name", "description"
        Null Checkbox: unchecked
        
        
        
        


        After adding the rank field, the elements tabs began to show custom added codes.

        After adding the fields to modx_transport_providers, the default provider became available in package management.

        Only errors left in the installation error log is

        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/ee8371d134483fff7937d51391efe348/0/ to /var/www/html/thewebsite/index.php
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/ee8371d134483fff7937d51391efe348/1/ to /var/www/html/thewebsite/ht.access
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/0/ to /var/www/html/thewebsite/manager/assets
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/1/ to /var/www/html/thewebsite/manager/controllers
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/2/ to /var/www/html/thewebsite/manager/templates
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/3/ to /var/www/html/thewebsite/manager/min
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/4/ to /var/www/html/thewebsite/manager/ht.access
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdovehicle.class.php : 181) Could not copy /var/www/html/thewebsite/core/packages/core/modContext/e1605274c80a3b04714ebfb596516855/5/ to /var/www/html/thewebsite/manager/index.php
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdofilevehicle.class.php : 103) Could not install files from /var/www/html/thewebsite/core/packages/core/xPDOFileVehicle/ba126d573d69f603cb9e9fff31de270c/ to /var/www/html/thewebsite/connectors/
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdofilevehicle.class.php : 103) Could not install files from /var/www/html/thewebsite/core/packages/core/xPDOFileVehicle/238dc0dfc087f73caca6610efa9711d2/ to /var/www/html/thewebsite/connectors/
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdofilevehicle.class.php : 103) Could not install files from /var/www/html/thewebsite/core/packages/core/xPDOFileVehicle/02f2376dfa94726d280ea70aab3c84a3/ to /var/www/html/thewebsite/connectors/
        [2016-08-11 01:08:33] (ERROR @ /var/www/html/thewebsite/core/xpdo/transport/xpdofilevehicle.class.php : 103) Could not install files from /var/www/html/thewebsite/core/packages/core/xPDOFileVehicle/cbab3ef3f0a5e998264a1903ee8e5e49/ to /var/www/html/thewebsite/connectors/
        


        Not sure what these does, will they cause any issues on manager side. Are they related to missing fields errors? Any ideas.

        Thank you
          • 3749
          • 24,544 Posts
          Thanks for the scoop on those missing fields.

          The other errors are not related. They suggest that your core folder (or parts of it) are not writable by PHP. It will definitely cause problems. Those look like errors during setup, which means that at least one of your upgrades wasn't successful.

          The problem could be file or folder permission, or the ownership of the directories.
          [ed. note: BobRay last edited this post 7 years, 8 months ago.]
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 7966
            • 90 Posts
            I see no problem on front and back ends for the moment.

            I have tried the setup providing full permissions for dirs and files but it didn't make any difference.

            Aren't these both db and directory copy issues a bug of the setup. Everything is reported as green on the setup but actually it is not fully completed.

            Thank you
              • 3749
              • 24,544 Posts
              Rather than crashing out with a site partially installed, Setup writes errors to the error log. It could probably do a better job of testing for write access everywhere before doing anything, but that would slow it down and there's a risk of it timing out.

                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting