contao / core-bundle

[READ-ONLY] Contao Core Bundle
GNU Lesser General Public License v3.0
122 stars 57 forks source link

4.0.0-alpha2: Fatal error: Class 'Contao\BackendInstall' not found in /htdocs/contao4/web/contao/install.php on line 27 #88

Closed ghost closed 9 years ago

ghost commented 9 years ago

Issue by @BugBuster1701 Saturday Jun 21, 2014 at 20:18 GMT

Install Aufruf bringt diese Meldung. Installiert wurde die alpha2 mittels der Release ZIP (grüner Button) Das Verzeichnis vendor/contao/module-core fehlt.

Warning: include(/htdocs/contao4/vendor/contao/module-core/src/controllers/BackendInstall.php): failed to open stream: No such file or directory in vendor/composer/ClassLoader.php on line 377

#0 vendor/composer/ClassLoader.php(377): __error(2, 'include(/htdocs/contao4/...', '/htdocs/contao4/...', 377, Array)
#1 vendor/composer/ClassLoader.php(377): Composer\Autoload\includeFile()
#2 vendor/composer/ClassLoader.php(269): Composer\Autoload\includeFile('/htdocs/contao4/...')
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass('Contao\\BackendI...')
#4 web/contao/install.php(27): spl_autoload_call('Contao\\BackendI...')
#5 {main}

Warning: include(): Failed opening '/htdocs/contao4/vendor/contao/module-core/src/controllers/BackendInstall.php' for inclusion (include_path='.:/usr/local/php5.4.10-cgi/lib/php') in vendor/composer/ClassLoader.php on line 377

#0 vendor/composer/ClassLoader.php(377): __error(2, 'include(): Fail...', '/htdocs/contao4/...', 377, Array)
#1 vendor/composer/ClassLoader.php(377): Composer\Autoload\includeFile()
#2 vendor/composer/ClassLoader.php(269): Composer\Autoload\includeFile('/htdocs/contao4/...')
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass('Contao\\BackendI...')
#4 web/contao/install.php(27): spl_autoload_call('Contao\\BackendI...')
#5 {main}

Fatal error: Class 'Contao\BackendInstall' not found in /htdocs/contao4/web/contao/install.php on line 27
ghost commented 9 years ago

Comment by @BugBuster1701 Saturday Jun 21, 2014 at 20:32 GMT

Genau genommen fehlen darin:

"contao/module-calendar": "4.0.0-alpha2",
"contao/module-comments": "4.0.0-alpha2",
"contao/module-core": "4.0.0-alpha2",
"contao/module-devtools": "4.0.0-alpha2",
"contao/module-faq": "4.0.0-alpha2",
"contao/module-listing": "4.0.0-alpha2",
"contao/module-news": "4.0.0-alpha2",
"contao/module-newsletter": "4.0.0-alpha2",
"contao/module-repository": "4.0.0-alpha2",
ghost commented 9 years ago

Comment by @leofeyer Sunday Jun 22, 2014 at 19:24 GMT

This wasn't a problem so far, because we were using the Contao autoloader, which looked for the classes in system/modules. The Composer autoloader, however, looks in vendor/contao, therefore we cannot delete those resources anymore.

Unfortunately, not removing those resources leads to a lot of duplicated files. @contao/developers any ideas?

ghost commented 9 years ago

Comment by @leofeyer Wednesday Jul 02, 2014 at 19:07 GMT

I have updated the binary attachments of the release. This does not solve the duplicate files issue though.

ghost commented 9 years ago

Comment by @aschempp Thursday Jul 03, 2014 at 07:17 GMT

I did not experience this problem when debugging #11. Obviously, you have to run composer update initially.

However, I've found a few other things not working, maybe that relates to your problem:

  1. I had to remove the calls to bootstrap.php.cache in app/console and system/initialize.php because the file did not exist
  2. I've also changed system/initialize.php to include app/autoload.php instead of vendor/autoload.php
  3. I've adjusted the config.yml because I got errors with missing %locale% variable

Maybe 2. solves the problem.

ghost commented 9 years ago

Comment by @leofeyer Thursday Jul 03, 2014 at 15:25 GMT

  1. We must commit the file in the distribution repository, so it is added to the .zip archive.
  2. I have adjusted the file accordingly.
  3. This is most likely because you do not have an app/config/parameters.yml file, which is automatically generated by the Contao install tool.
ghost commented 9 years ago

Comment by @leofeyer Thursday Jul 03, 2014 at 15:26 GMT

This is how the parameters.yml file should look like:

parameters:
    locale: en
    secret: <random-md5-hash>
ghost commented 9 years ago

Comment by @aschempp Friday Jul 04, 2014 at 06:33 GMT

It is likely that I did not run the install tool because I tried to fix the console app only :-)

ghost commented 9 years ago

Comment by @leofeyer Tuesday Jul 15, 2014 at 14:45 GMT

I have added the open question to #9 so we can close this ticket.