Project

General

Profile

Bug #7889

Migration error: missing Doctrine migration configuration

Added by Yannick Warnier almost 4 years ago. Updated almost 4 years ago.

Status:
Bug resolved
Priority:
Urgent
Category:
Installation / Migration
Target version:
Start date:
11/10/2015
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

[Sat Oct 10 23:13:17.755455 2015] [:error] [pid 26868] [client 127.0.0.1:43599] PHP Fatal error:  Class 'Doctrine\\DBAL\\Migrations\\Configuration\\Configuration' not found in /var/www/chamilo19x/main/install/install.lib.php on line 1995, referer: http://my.chamilo19.net/main/install/index.php?running=1&installType=update&updateFromConfigFile=main%2Finc%2Fconf%2Fconfiguration.php
[Sat Oct 10 23:13:17.755477 2015] [:error] [pid 26868] [client 127.0.0.1:43599] PHP Stack trace:, referer: http://my.chamilo19.net/main/install/index.php?running=1&installType=update&updateFromConfigFile=main%2Finc%2Fconf%2Fconfiguration.php
[Sat Oct 10 23:13:17.755518 2015] [:error] [pid 26868] [client 127.0.0.1:43599] PHP   1. {main}() /var/www/chamilo19x/main/install/index.php:0, referer: http://my.chamilo19.net/main/install/index.php?running=1&installType=update&updateFromConfigFile=main%2Finc%2Fconf%2Fconfiguration.php
[Sat Oct 10 23:13:17.755553 2015] [:error] [pid 26868] [client 127.0.0.1:43599] PHP   2. migrate() /var/www/chamilo19x/main/install/index.php:731, referer: http://my.chamilo19.net/main/install/index.php?running=1&installType=update&updateFromConfigFile=main%2Finc%2Fconf%2Fconfiguration.php

I'm interested in a fix and in knowing how this could happen at this time close to the stable release...

History

#1

Updated by Yannick Warnier almost 4 years ago

Apparently (from a first look) this is due to the fact that vendor/doctrine/migrations is a git submodule. As such, when doing a "git add" of the vendor directory for the RC package, this submodule doesn't get included, so it's not packaged. This is a big issue for the package (we don't want people to be forced to to a git pull from that directory). Looking for a way to make sure this folder gets pulled and added to the RC... (probably not using "@dev" for the doctrine/migrations requirement in composer.json might be enough...

#2

Updated by Yannick Warnier almost 4 years ago

Well, adding a stupid directory there is more complicated than I thought. When adding the folder manually, I get this error on an upgrade from 1.9 to 1.10 with a Fresh 1.9 install:

atal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'session_id' in 'where clause'' in /var/www/chamilo19x/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 71
( ! ) PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'session_id' in 'where clause' in /var/www/chamilo19x/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 104
Call Stack
#    Time    Memory    Function    Location
1    0.0001    270368    {main}( )    ../index.php:0
2    0.0778    3843120    fixIds( )    ../index.php:738
3    0.0779    3846616    Doctrine\DBAL\Connection->executeQuery( )    ../install.lib.php:2128
4    0.0779    3847056    Doctrine\DBAL\Driver\PDOConnection->query( )    ../Connection.php:833
5    0.0779    3847496    query ( )    ../PDOConnection.php:104
( ! ) Doctrine\DBAL\Driver\PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'session_id' in 'where clause' in /var/www/chamilo19x/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 106
Call Stack
#    Time    Memory    Function    Location
1    0.0001    270368    {main}( )    ../index.php:0
2    0.0778    3843120    fixIds( )    ../index.php:738
3    0.0779    3846616    Doctrine\DBAL\Connection->executeQuery( )    ../install.lib.php:2128
4    0.0779    3847056    Doctrine\DBAL\Driver\PDOConnection->query( )    ../Connection.php:833
( ! ) Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'UPDATE c_item_property SET session_id = NULL WHERE session_id = 0': SQLSTATE[42S22]: Column not found: 1054 Unknown column 'session_id' in 'where clause' in /var/www/chamilo19x/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 71
Call Stack
#    Time    Memory    Function    Location
1    0.0001    270368    {main}( )    ../index.php:0
2    0.0778    3843120    fixIds( )    ../index.php:738
3    0.0779    3846616    Doctrine\DBAL\Connection->executeQuery( )    ../install.lib.php:2128
#3

Updated by Yannick Warnier almost 4 years ago

And the migrations folder still refuses to be filled in https://github.com/chamilo/chamilo-lms/tree/1.10.0-rc/vendor/doctrine

#4

Updated by Julio Montoya almost 4 years ago

I confirm the error:

PHP Fatal error: Class 'Doctrine\\DBAL\\Migrations\\Configuration\\Configuration' not found in /var/www/chamilo19x/main/install/install.lib.php on line 1995

I will try downloading a zip file from here:

https://github.com/chamilo/chamilo-lms/tree/1.10.x

and then executing composer install/update

#5

Updated by Julio Montoya almost 4 years ago

It works for me after trying (zip from github + composer update) problem seem to be in the packaging process.

#6

Updated by Julio Montoya almost 4 years ago

Checking differences now

#7

Updated by Julio Montoya almost 4 years ago

After comparing the zip package (RC3) and (github + composer update) the difference show that "Doctrine\\DBAL\\Migrations" is not added.

vendor/webit/eval-math is not added too.

#8

Updated by Julio Montoya almost 4 years ago

Well, adding a stupid directory there is more complicated than I thought. When adding the folder manually, I get this error on an upgrade from 1.9 to 1.10 with a Fresh 1.9 install:

When adding the folder manually? You should run composer update once you finish copying the folder from 1.9 to 1.10.

I didn't get this error when doing upgrading 1.9.10.2 to chamilo 1.10.x (github + composer update).

#9

Updated by Julio Montoya almost 4 years ago

I'm going to do more tests.

#10

Updated by Julio Montoya almost 4 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Julio Montoya to Yannick Warnier

After doing a composer update in the RC3 package somehow composer thinks the "doctrine migrations" package is still there. I had to do this:

sudo rm -R vendor/ 
sudo rm - composer.lock 
sudo composer update

Then I could upgrade process with out an error.

#11

Updated by Yannick Warnier almost 4 years ago

I tried adding vendor/doctrine/migrations to git after this cleanup, but that didn't work (fatal: Path 'vendor/doctrine/migrations/bin' is in submodule 'vendor/doctrine/migrations').

I searched for a bit and found that any submodule could survive as such in the global git tree: http://stackoverflow.com/questions/16574625/how-do-i-add-files-in-git-to-the-path-of-a-former-submodule

...and that in order to delete the fact that this is a submodule, you have to do this: git rm --cached mysubmodule

So:

cd vendor/doctrine
git rm --cached migrations
git add migrations/
git commit -m "Add static resources" migrations/
git push origin 1.10.0-rc

and now finally I can see the migrations files in here: https://github.com/chamilo/chamilo-lms/tree/1.10.0-rc/vendor/doctrine/migrations

I also did this for eval-math, and pushed everything to RC5.

We need to find a way to make this automatic. This is really an issue for the packaging.

#12

Updated by Yannick Warnier almost 4 years ago

  • Status changed from Needs more info to Bug resolved
  • % Done changed from 0 to 100

Now it works.
There was also an issue with the languages selector in the install, but I think it was due to the missing doctrine component as well. Now it's fixed too. Thanks.

I've added a note for packaging on the Release_procedure page on the wiki

Also available in: Atom PDF