We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19889
    • 616 Posts
    Hello
    tried to update a really old installation - I believe it is TP 3.2 and I’m getting the following errors:

    Creating database tables: Database Alerts!

    MODx setup couldn’t install/alter some tables inside the selected database.

    The following errors had occurred during installation

    Unknown column ’view_unpublished’ in ’modx_user_roles’ during the execution of SQL statement ALTER TABLE `modx_user_roles` ADD COLUMN `import_static` int(1) NOT NULL DEFAULT ’0’ AFTER `view_unpublished`, ADD COLUMN `export_static` int(1) NOT NULL DEFAULT ’0’ AFTER `import_static`.

    Unknown column ’import_static’ in ’field list’ during the execution of SQL statement REPLACE INTO `modx_user_roles` (id,name,description,frames,home,view_document,new_document,save_document,publish_document,delete_document,empty_trash,action_ok,logout,help,messages,new_user,edit_user,logs,edit_parser,save_parser,edit_template,settings,credits,new_template,save_template,delete_template,edit_snippet,new_snippet,save_snippet,delete_snippet,edit_chunk,new_chunk,save_chunk,delete_chunk,empty_cache,edit_document,change_password,error_dialog,about,file_manager,save_user,delete_user,save_password,edit_role,save_role,delete_role,new_role,access_permissions,bk_manager,new_plugin,edit_plugin,save_plugin,delete_plugin,new_module,edit_module,save_module,exec_module,delete_module,view_eventlog,delete_eventlog,manage_metatags,edit_doc_metatags,new_web_user,edit_web_user,save_web_user,delete_web_user,web_access_permissions,view_unpublished,import_static,export_static) VALUES (1, ’Administrator’, ’Site administrators have full access to all functions’,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1).
    Unknown column ’import_static’ in ’field list’ during the execution of SQL statement UPDATE `modx_user_roles` SET bk_manager=1, new_plugin=1, edit_plugin=1, save_plugin=1, delete_plugin=1, new_module=1, edit_module=1, save_module=1, delete_module=1, exec_module=1, view_eventlog = 1, delete_eventlog = 1, manage_metatags = 1, edit_doc_metatags = 1, new_web_user = 1, edit_web_user = 1, save_web_user = 1, delete_web_user = 1, new_chunk = 1, edit_chunk = 1, save_chunk = 1, delete_chunk = 1, web_access_permissions = 1, view_unpublished = 1, publish_document = 1, import_static = 1, export_static = 1, empty_trash = 1 WHERE `id`=1.
    Some tables were not updated. This might be due to previous modifications.

    CLOSE



    Is there any other way to do it?

    Thanks
      • 27210
      • 158 Posts
      Quote from: garryn at Nov 06, 2009, 11:07 AM

      Questions:
      - do i just copy over all of the directories over from the new modx-1.0.2 to my good-1.0.0-installation?
      - if not, then what do i do?
      There are several ways documented in the Wiki on how to do upgrades. But, in this instance, you could:

      • Copy over your custom assets files from your 1.0 install to your 1.0.2 install
      • Copy your config.inc.php from your 1.0 install to your 1.0.2 install (config.inc.php is stored in manager/includes)
      • Then, run the 1.0.2 installer in upgrade mode
      • Once installed, review the settings in the Configuration Settings screen once you log back into MODx to check any path changes - mainly for the Resource Browser

      That should give you an updated install in your 1.0.2 folder. Remember to back up your files/database before doing this in case you need to revert back to using your 1.0 install.

      Thanks Gary! - i tried what you said and i also looked at the Wiki methods. Everything seems to work but then when i try to accesss any of the files i get the following error:
      Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\modx\modx-1.0.2\manager\includes\header.inc.php:7) in C:\xampp\htdocs\modx\modx-1.0.2\manager\includes\document.parser.class.inc.php on line 2732
      « 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 ’-acc_site_tmplvars ORDER BY name ASC’ at line 1 »

      Thanks in advance for any help you can give.
      Steve
        • 10487 MODX Staff
        • 1,535 Posts
        @ mmjaeger, we did think at first that maybe you would have to do a stepping-stone upgrade to make this work (e.g. TP3.2 -> 091 -> Evo 1.0.2) but the Evo install script should be able to handle this perfectly.

        I assume now that you have a partially-updated database. Does the web_user_roles table actually now have a ’view_unpublished’ column? There is an ALTER TABLE SQL command prior to the import_static ALTER TABLE command that should add the ’view_unpublished’ column however it appears to not have been executed (which is very odd indeed)
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 19889
          • 616 Posts
          it looks to me that there is no web_user_role table at all?

          where could I download 0.9.1?
            • 10487 MODX Staff
            • 1,535 Posts
            Sorry, I meant modx_user_roles. Which, looking at your screenshot, does exist (which is a start tongue)

            091 can be downloaded from SVN (look at the tagged releases) - however I’m not entirely sure this will help. Like I said, the Evo upgrade script should handle this.
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 19889
              • 616 Posts
              you lost me - sorry - what do I have to do now?
                • 10487 MODX Staff
                • 1,535 Posts
                mmjaeger: Does the modx_user_roles table actually now have a ’view_unpublished’ column?

                Also, please post up the phpMyAdmin structure view of the table - the one that lists the database columns and types. It would probably also help to know what version of PHP and MySQL you are running.
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 19889
                  • 616 Posts
                  don’t see any unpublished... column?!

                  please see attached file as well
                    • 19889
                    • 616 Posts
                    Quote from: mmjaeger at Nov 06, 2009, 01:55 PM

                    don’t see any unpublished... column?!

                    please see attached file as well

                    0.9.1 didn’t help either - I guess the same errors:

                    lowing errors had occurred during installation

                    Unknown column ’view_unpublished’ in ’modx_user_roles’ during the execution of SQL statement ALTER TABLE `modx_user_roles` ADD COLUMN `import_static` int(1) NOT NULL DEFAULT ’0’ AFTER `view_unpublished`, ADD COLUMN `export_static` int(1) NOT NULL DEFAULT ’0’ AFTER `import_static`.

                    Unknown column ’import_static’ in ’field list’ during the execution of SQL statement REPLACE INTO `modx_user_roles` (id, name, description, frames, home, view_document, new_document, save_document, publish_document, delete_document, action_ok, logout, help, messages, new_user, edit_user, logs, edit_parser, save_parser, edit_template, settings, credits, new_template, save_template, delete_template, edit_snippet, new_snippet, save_snippet, delete_snippet, edit_chunk, new_chunk, save_chunk, delete_chunk, empty_cache, edit_document, change_password, error_dialog, about, file_manager, save_user, delete_user, save_password, edit_role, save_role, delete_role, new_role, access_permissions, bk_manager, new_plugin, edit_plugin, save_plugin, delete_plugin, new_module, edit_module, save_module, exec_module, delete_module, view_eventlog, delete_eventlog, manage_metatags, edit_doc_metatags, new_web_user, edit_web_user, save_web_user, delete_web_user, web_access_permissions, view_unpublished, import_static, export_static ) VALUES (1, ’Administrator’, ’Site administrators have full access to all functions’, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1).
                    Unknown column ’import_static’ in ’field list’ during the execution of SQL statement UPDATE `modx_user_roles` SET bk_manager=1, new_plugin=1, edit_plugin=1, save_plugin=1, delete_plugin=1, new_module=1, edit_module=1, save_module=1, delete_module=1, exec_module=1, view_eventlog = 1, delete_eventlog = 1, manage_metatags = 1, edit_doc_metatags = 1, new_web_user = 1, edit_web_user = 1, save_web_user = 1, delete_web_user = 1, new_chunk = 1, edit_chunk = 1, save_chunk = 1, delete_chunk = 1, web_access_permissions = 1, view_unpublished = 1, publish_document = 1, import_static = 1, export_static = 1 WHERE `id`=1.
                    Some tables were not updated. This might be due to previous modifications.