neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 222 forks source link

Static files are not linked after composer install #1658

Open joachimmathes opened 7 years ago

joachimmathes commented 7 years ago

Description

After running composer create-project --no-dev neos/neos-base-distribution . or composer install, if a composer.json with "neos/neos": "~3.1.0" exists, the static files are not linked. bildschirmfoto 2017-08-01 um 14 09 21 bildschirmfoto 2017-08-01 um 14 12 23

Expected behavior

Assets are included, i.e. the respective links in `Web/_Resources/Static/Packages/ exist.

Actual behavior

Assets are not included. You have to run ./flow cache:warmup explicitly to create the links in Web/_Resources/Static/Packages/.

[What actually happened]

Affected Versions

Neos: 3.1.4

Flow: 4.1.4

kdambekalns commented 7 years ago

I just started a fresh project with the same versions, and all went as expected. Can you provide a step-by–step way to reproduce? Also what PHP version are you using?

joachimmathes commented 7 years ago

The step-by-step way to reproduce this is:

  1. Make sure to run NEOS in FLOW_CONTEXT=Production.
  2. Run composer create-project --no-dev neos/neos-base-distribution .
  3. Open an incognito browser window to avoid browser cached CSS files and get the respective NEOS URL.

You can download a vagrant box from https://gitlab.pluspunkthosting.de/opensource/proserver-neos-box to reproduce the error partly. It comes with PHP 7.0.21.

The behavior is a little bit different than the one described above. But anyway:

20 Doctrine\DBAL\Driver\AbstractMySQLDriver::convertException("An exception occured in driver: SQLSTATE[HY000] [1…enied for user ''@'localhost' (using password: NO)", Doctrine\DBAL\Driver\PDOException) 19 Doctrine\DBAL\DBALException::driverException(Doctrine\DBAL\Driver\PDOMySql\Driver, Doctrine\DBAL\Driver\PDOException) 18 Doctrine\DBAL\Driver\PDOMySql\Driver::connect(array|7|, NULL, NULL, array|0|) 17 Doctrine\DBAL\Connection::connect() 16 Doctrine\DBAL\Connection::ping() 15 Neos\Flow\Persistence\Doctrine\PersistenceManager_Original::persistAll(TRUE) 14 Neos\Flow\Package::Neos\Flow{closure}(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController, "Neos\Flow\Mvc\Dispatcher::afterControllerInvocation") 13 Closure::__invoke(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController, "Neos\Flow\Mvc\Dispatcher::afterControllerInvocation") 12 call_user_func_array(array|2|, array|4|) 11 Neos\Flow\SignalSlot\Dispatcher::dispatch("Neos\Flow\Mvc\Dispatcher", "afterControllerInvocation", array|4|) 10 Neos\Flow\SignalSlot\SignalAspect_Original::forwardSignalToDispatcher(Neos\Flow\Aop\JoinPoint) 9 Neos\Flow\Aop\Advice\AbstractAdvice::invoke(Neos\Flow\Aop\JoinPoint) 8 Neos\Flow\Mvc\Dispatcher::emitAfterControllerInvocation(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController) 7 Neos\Flow\Mvc\Dispatcher_Original::initiateDispatchLoop(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response) 6 Neos\Flow\Mvc\Dispatcher_Original::dispatch(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response) 5 Neos\Flow\Mvc\DispatchComponent_Original::handle(Neos\Flow\Http\Component\ComponentContext) 4 Neos\Flow\Http\Component\ComponentChain_Original::handle(Neos\Flow\Http\Component\ComponentContext) 3 Neos\Flow\Http\Component\ComponentChain_Original::handle(Neos\Flow\Http\Component\ComponentContext) 2 Neos\Setup\Core\RequestHandler::handleRequest() 1 Neos\Flow\Core\Bootstrap::run()

Previous exception: Exception #1045 in line 44 of /var/www/neos/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)

19 Doctrine\DBAL\Driver\PDOConnection::__construct("mysql:charset=utf8;", NULL, NULL, array|0|) 18 Doctrine\DBAL\Driver\PDOMySql\Driver::connect(array|7|, NULL, NULL, array|0|) 17 Doctrine\DBAL\Connection::connect() 16 Doctrine\DBAL\Connection::ping() 15 Neos\Flow\Persistence\Doctrine\PersistenceManager_Original::persistAll(TRUE) 14 Neos\Flow\Package::Neos\Flow{closure}(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController, "Neos\Flow\Mvc\Dispatcher::afterControllerInvocation") 13 Closure::__invoke(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController, "Neos\Flow\Mvc\Dispatcher::afterControllerInvocation") 12 call_user_func_array(array|2|, array|4|) 11 Neos\Flow\SignalSlot\Dispatcher::dispatch("Neos\Flow\Mvc\Dispatcher", "afterControllerInvocation", array|4|) 10 Neos\Flow\SignalSlot\SignalAspect_Original::forwardSignalToDispatcher(Neos\Flow\Aop\JoinPoint) 9 Neos\Flow\Aop\Advice\AbstractAdvice::invoke(Neos\Flow\Aop\JoinPoint) 8 Neos\Flow\Mvc\Dispatcher::emitAfterControllerInvocation(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController) 7 Neos\Flow\Mvc\Dispatcher_Original::initiateDispatchLoop(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response) 6 Neos\Flow\Mvc\Dispatcher_Original::dispatch(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response) 5 Neos\Flow\Mvc\DispatchComponent_Original::handle(Neos\Flow\Http\Component\ComponentContext) 4 Neos\Flow\Http\Component\ComponentChain_Original::handle(Neos\Flow\Http\Component\ComponentContext) 3 Neos\Flow\Http\Component\ComponentChain_Original::handle(Neos\Flow\Http\Component\ComponentContext) 2 Neos\Setup\Core\RequestHandler::handleRequest() 1 Neos\Flow\Core\Bootstrap::run()

Previous exception: Exception #1045 in line 43 of /var/www/neos/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)

20 PDO::construct("mysql:charset=utf8;", NULL, NULL, array|0|) 19 Doctrine\DBAL\Driver\PDOConnection::construct("mysql:charset=utf8;", NULL, NULL, array|0|) 18 Doctrine\DBAL\Driver\PDOMySql\Driver::connect(array|7|, NULL, NULL, array|0|) 17 Doctrine\DBAL\Connection::connect() 16 Doctrine\DBAL\Connection::ping() 15 Neos\Flow\Persistence\Doctrine\PersistenceManager_Original::persistAll(TRUE) 14 Neos\Flow\Package::Neos\Flow{closure}(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController, "Neos\Flow\Mvc\Dispatcher::afterControllerInvocation") 13 Closure::__invoke(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController, "Neos\Flow\Mvc\Dispatcher::afterControllerInvocation") 12 call_user_func_array(array|2|, array|4|) 11 Neos\Flow\SignalSlot\Dispatcher::dispatch("Neos\Flow\Mvc\Dispatcher", "afterControllerInvocation", array|4|) 10 Neos\Flow\SignalSlot\SignalAspect_Original::forwardSignalToDispatcher(Neos\Flow\Aop\JoinPoint) 9 Neos\Flow\Aop\Advice\AbstractAdvice::invoke(Neos\Flow\Aop\JoinPoint) 8 Neos\Flow\Mvc\Dispatcher::emitAfterControllerInvocation(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response, Neos\Setup\Controller\LoginController) 7 Neos\Flow\Mvc\Dispatcher_Original::initiateDispatchLoop(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response) 6 Neos\Flow\Mvc\Dispatcher_Original::dispatch(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response) 5 Neos\Flow\Mvc\DispatchComponent_Original::handle(Neos\Flow\Http\Component\ComponentContext) 4 Neos\Flow\Http\Component\ComponentChain_Original::handle(Neos\Flow\Http\Component\ComponentContext) 3 Neos\Flow\Http\Component\ComponentChain_Original::handle(Neos\Flow\Http\Component\ComponentContext) 2 Neos\Setup\Core\RequestHandler::handleRequest() 1 Neos\Flow\Core\Bootstrap::run()

kdambekalns commented 7 years ago

Ok, I did this without using setup, i.e. created a DB, configured Settings.yaml and ran doctrine:migrate before hitting anything else. So it seems this is caused by something related to not being configured, could be a regression as pointed out by @bwaidelich in https://github.com/neos/flow-development-collection/issues/926

bwaidelich commented 7 years ago

-> See https://github.com/neos/neos-development-collection/issues/1663