Results 1 to 3 of 3

Thread: Upgrade 2.11.11 to Contao 3.1.0, mysql error

  1. #1
    New user respinar's Avatar
    Join Date
    09-17-10.
    Location
    Tabriz, Iran
    Posts
    14

    Default Upgrade 2.11.11 to Contao 3.1.0, mysql error

    Hi,

    In Installtion Tools, upgrading Contao 2.11.11 to 3.1.0, In "version 3.1 update" step it return error:

    Code:
    Fatal error: Uncaught exception Exception with message Query error: Can't DROP 'path'; check that column/key exists (ALTER TABLE `tl_files` DROP INDEX `path`) thrown in system/modules/core/library/Contao/Database/Statement.php on line 346
    
    #0 system/modules/core/library/Contao/Database.php(228): Contao\Database\Statement->query('ALTER TABLE `tl...')
    #1 system/modules/core/library/Contao/Database/Updater.php(468): Contao\Database->query('ALTER TABLE `tl...')
    #2 contao/install.php(956): Contao\Database\Updater->run31Update()
    #3 contao/install.php(530): InstallTool->update31()
    #4 contao/install.php(181): InstallTool->runDatabaseUpdates()
    #5 contao/install.php(971): InstallTool->run()
    #6 {main}
    How I can fix this?
    Hamid Abbaszadeh
    https://respinar.com

  2. #2
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Upgrade 2.11.11 to Contao 3.1.0, mysql error

    Does the error repeat when you try opening the contao/install.php script and update a second time?

    The obvious workaround is to add an index to that field so the install script can remove it. It may be you need to add the path field if it doesn't exist instead of adding/removing the key. It is probably either one or the other because an assumption is done and appears untrue.

    These are the two relevant fields. You can't import this code, but need to use a tool like PhpMyAdmin to make a field path and add the key
    Code:
    CREATE TABLE `tl_files` (
      `path` blob,
      UNIQUE KEY `path` (`path`)
    );
    I must say; I've ran into several db errors when upgrading contao installations. I bothers me they exist, but everytime I reload the script Contao continues and I'm on my way again, forgetting the error even happened. Contao will always check the entire database and every field to make sure it is correct when you run the installer or the "update database" script. So even if you have such an error, normally you would be able to rcover without changing the db structure (I've never had to create/change a single field since using Contao)

  3. #3
    New user
    Join Date
    11-16-13.
    Posts
    2

    Frage same error on me

    Quote Originally Posted by Ruud View Post
    Does the error repeat when you try opening the contao/install.php script and update a second time?

    The obvious workaround is to add an index to that field so the install script can remove it. It may be you need to add the path field if it doesn't exist instead of adding/removing the key. It is probably either one or the other because an assumption is done and appears untrue.

    These are the two relevant fields. You can't import this code, but need to use a tool like PhpMyAdmin to make a field path and add the key
    Code:
    CREATE TABLE `tl_files` (
      `path` blob,
      UNIQUE KEY `path` (`path`)
    );
    I must say; I've ran into several db errors when upgrading contao installations. I bothers me they exist, but everytime I reload the script Contao continues and I'm on my way again, forgetting the error even happened. Contao will always check the entire database and every field to make sure it is correct when you run the installer or the "update database" script. So even if you have such an error, normally you would be able to rcover without changing the db structure (I've never had to create/change a single field since using Contao)



    HTML Code:
    Fatal error: Uncaught exception Exception with message Query error: Can't DROP 'path'; check that column/key exists (ALTER TABLE `tl_files` DROP INDEX `path`) thrown in C:\Program Files\BitNami\apache2\htdocs\system\modules\core\library\Contao\Database\Statement.php on line 282
    #0 C:\Program Files\BitNami\apache2\htdocs\system\modules\core\library\Contao\Database.php(202): Contao\Database\Statement->query('ALTER TABLE `tl...')
    #1 C:\Program Files\BitNami\apache2\htdocs\system\modules\core\library\Contao\Database\Updater.php(468): Contao\Database->query('ALTER TABLE `tl...')
    #2 C:\Program Files\BitNami\apache2\htdocs\contao\install.php(986): Contao\Database\Updater->run31Update()
    #3 C:\Program Files\BitNami\apache2\htdocs\contao\install.php(544): InstallTool->update31()
    #4 C:\Program Files\BitNami\apache2\htdocs\contao\install.php(181): InstallTool->runDatabaseUpdates()
    #5 C:\Program Files\BitNami\apache2\htdocs\contao\install.php(1001): InstallTool->run()
    #6 {main}
    and when i run this sql query:
    i also get an error on syntax ,
    can you show me a exact query ?
    i haven't understood the full part .
    and i have tried emptying the table tl_files but doesnt works on /contao/install.php
    thanks in advanced,
    i need this issue to be fixed as soon as possible .
    looking forward.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •