Closed fkaminski-dev closed 7 years ago
Other users on the forum have reported the same problem.
Falls es hilft: $this->connection->isConnected() in der Funktion canRunDbQuery in \vendor\contao\core-bundle\src\Cors\WebsiteRootsConfigProvider.php gibt an dieser Stelle bereits true zurück.
In der Debug-Bar wurde mir auch ein Database Query angezeigt, obwohl Contao keine Verbindungs-Daten vorliegen.
Ich habe es nun umgehen können, indem ich im xampp Panel den Mysql Server gestoppt habe. Nachdem ich dann die DB-Daten speichern konnte, habe ich ihn wieder gestartet und es läuft.
@fkaminski-dev: which Browser did you use?
Chrome hauptsächlich (aber auch mit Firefox o. IE11 probiert) ...
Nachtrag: Firefox stimmte nicht ... Versuche ich gerade - Scheint mit Firefox zu gehen ... Melde mich dann nochmals ...
Also die Installation über das .zip Archiv o. php composer mit Firefox Browser unter Windows geht. Gleiches mit Chrome Browser geht nicht (s.o). Allerdings kann ich im Anschluß mit dem Chrome Browser ins Backend.
Die Installation über das .zip Archiv mit Firefox Browser auf der Synology Diskstation geht. Mit Chrome Browser nicht (s.o.). Installation über den Contao Manager bricht nach Downloads ab:
console.ERROR: Command "tenside:runtask c53dd1ef79686f5689452c0d5427a736 -v --no-interaction" exited with code "1" {"command":"tenside:runtask c53dd1ef79686f5689452c0d5427a736 -v --no-interaction","code":1} []
Kann ich bestätigen (zip/win10/xampp). Im Firefox & Edge funktioniert es - im Chrome nicht.
The cause of the problem is the same as https://github.com/contao/core/issues/8681, basically.
Specifically this code: WebsiteRootsConfigProvider.php#L44
As mentioned here the mere presence of an Origin
header does not necessarily indicate that the request is a CORS request. See also nelmio/NelmioCorsBundle/EventListener/CorsListener.php#L68 - there a request is only considered a CORS request, if the Origin
header is present and the value of the Origin
header is different from the current request's scheme and host.
Thus the installation only fails in some browsers, like Chrome, since those browsers set the Origin
header when sending POST
data.
Full stack trace for reference:
Doctrine\DBAL\Exception\ConnectionException:
An exception occurred while executing 'SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'':
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected
at vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractMySQLDriver.php:103
at Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception occurred while executing \'SHOW FULL TABLES WHERE Table_type = \'BASE TABLE\'\':SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected', object(PDOException))
(vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:128)
at Doctrine\DBAL\DBALException::driverExceptionDuringQuery(object(Driver), object(PDOException), 'SHOW FULL TABLES WHERE Table_type = \'BASE TABLE\'', array())
(vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php:855)
at Doctrine\DBAL\Connection->executeQuery('SHOW FULL TABLES WHERE Table_type = \'BASE TABLE\'', array(), array())
(vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php:785)
at Doctrine\DBAL\Connection->fetchAll('SHOW FULL TABLES WHERE Table_type = \'BASE TABLE\'')
(vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\AbstractSchemaManager.php:219)
at Doctrine\DBAL\Schema\AbstractSchemaManager->listTableNames()
(vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\AbstractSchemaManager.php:207)
at Doctrine\DBAL\Schema\AbstractSchemaManager->tablesExist(array('tl_page'))
(vendor\contao\core-bundle\src\Cors\WebsiteRootsConfigProvider.php:82)
at Contao\CoreBundle\Cors\WebsiteRootsConfigProvider->canRunDbQuery()
(vendor\contao\core-bundle\src\Cors\WebsiteRootsConfigProvider.php:44)
at Contao\CoreBundle\Cors\WebsiteRootsConfigProvider->getOptions(object(Request))
(vendor\nelmio\cors-bundle\Options\Resolver.php:46)
at Nelmio\CorsBundle\Options\Resolver->getOptions(object(Request))
(vendor\nelmio\cors-bundle\EventListener\CorsListener.php:58)
at Nelmio\CorsBundle\EventListener\CorsListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
at call_user_func(array(object(CorsListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\WrappedListener.php:106)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))
at call_user_func(object(WrappedListener), object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))
(vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php:212)
at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent))
(vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php:44)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
(vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher.php:146)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
(vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:129)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php:171)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(web\app_dev.php:62)
/cc @Toflar
Just to mention it here as well: this problem only occurs under the following circumstances:
Origin
request header on POST
requests.See https://github.com/contao/core-bundle/pull/887 (thank you @fritzmg).
Wenn ich versuche über das Download Archiv (.zip) die Version 4.4.0 zu installieren erhalte ich folgenden Fehler in der log Datei (Die Lizenzabfrage erscheint und dann ist Ende):
[2017-06-17 17:23:00] app.CRITICAL: An exception occurred. {"exception":"[object] (Doctrine\\DBAL\\Exception\\ConnectionException(co de: 0): An exception occurred while executing 'SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'':\n\nSQLSTATE[3D000]: Invalid catalog name: 1046 No database selected at C:\\__WEBDEV__SITES__\\contao4\\htdocs\\vendor\\do ctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\Abstrac tMySQLDriver.php:103, Doctrine\\DBAL\\Driver\\PDOException(code: 3D000): SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected at C:\\__WEBDEV__SITES__\\contao4\\htdocs\\vendor\\do ctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConn ection.php:106, PDOException(code: 3D000): SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected at C:\\__WEBDEV__SITES__\\contao4\\htdocs\\vendor\\do ctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConn ection.php:104)"} [] [2017-06-17 17:23:00] app.CRITICAL: An exception occurred. {"exception":"[object] (Contao\\CoreBundle\\Exception\\InternalServerErro rHttpException(code: 0): The installation has not been completed. Open the Contao install tool to continue. at C:\\__WEBDEV__SITES__\\contao4\\htdocs\\vendor\\co ntao\\core-bundle\\src\\EventListener\\ExceptionConverterList ener.php:109, Contao\\CoreBundle\\Exception\\IncompleteInstallat ionException(code: 0): The installation has not been completed. Open the Contao install tool to continue. at C:\\__WEBDEV__SITES__\\contao4\\htdocs\\vendor\\co ntao\\core-bundle\\src\\Framework\\ContaoFramework.php:389)"} []
Diese erhalte ich unter windows/xampp (php 5.6) o. über eine Diskstation/nas (wahlweise php 5.6/7.0 / Apache o. nginx). Die Versio 4.3.11 kann ich auf beiden Systemen installieren.
Nachtrag: Windows7 / xampp php cgi 5.6 / php cli 5.6.11 Diskstation GNU/Liunx / php cgi 5.6 o. 7.0 / php cli 5.6.11
Gleiche Meldung erhalte ich nach der Lizenzabfrage der Installation wenn ich auf windows über den php composer gehe oder auf der Diskstation über den contao-manager ...
(Ausgerechnet beim Test über 1und1 läuft die Installation (.zip archiv) aber durch ...)
Danke