GithubHelp home page GithubHelp logo

contao / installation-bundle Goto Github PK

View Code? Open in Web Editor NEW
8.0 11.0 9.0 1.07 MB

[READ-ONLY] Contao Installation Bundle

License: GNU Lesser General Public License v3.0

PHP 76.34% Twig 23.66%
contao cms php symfony contao-bundle installer

installation-bundle's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

installation-bundle's Issues

Backend-Sprache des im Installtool angelegten Benutzers

Wenn im Backend ein neuer Benutzer angelegt wird, ist dessen Backend-Sprache standardmäßig die Sprache, die während dem Anlegen des Benutzers eingestellt ist.

Wenn im Installtool jedoch der Benutzer angelegt wird, ist dessen Backend-Sprache stets Englisch. Stattdessen sollte hier auch die Sprache, die im Installtool verwendet wird, gesetzt werden.

Install tool cache warm up in dev environment

Since #63 the install tool warmups the cache. When being in dev environment I usually don't warm up the cache. Calling the install tool will always warm up the cache. Shouldn't it only be warmed up in the prod environment?

Check for disabled symlink function

I recently had a problem on a Hoster where the Contao Install Tool was unable to create symlinks for unknown reasons (at the time). Unfortunately, the error message regarding the creation of symlinks will only either be

Unable to create […] link due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?'

(Windows only, see Symfony/Component/Filesystem/Filesystem.php#L392) or

Failed to create […] link from "[…]" to "[…]".

(see Symfony/Component/Filesystem/Filesystem.php#L395). The latter does not tell you much what the actual problem is.

In my case it was because the symlink function was disabled. In that case calling the symlink function would usually show a warning:

Warning: symlink() has been disabled for security reasons

This warning is of course swallowed by Symfony by using @symlink(…).

In order to provide better feedback in the Install Tool for such simple problems, may be a check could be integrated for this case? i.e.

in_array('symlink', explode(',', ini_get('disable_functions')))

If not, then I'll add it to the Contao Check at least.

Add a script handler to run the database update classes

Currently we have the following database update classes in the installation bundle:

  • Version330Update
  • Version350Update
  • Version400Update
  • Version410Update
  • Version430Update

They are run if the user opens the install tool but shouldn't there be a Composer post-update-cmd script handler executing them? @contao/developers

CacheWarmup missing?

We use isotope with contao 4 and now we had several problems with missing dca-files in cache after cache:clear. then isotope cannot load the relations correctly (isotope/core#1832).
after calling cache:warmup everything is fine because the cache is recreated.

so I researched in the code and found the 'cache_clearer' in the InstallationController. Now I understand, that after every Installation the problem occured.

Why is there no cache_warmer in the installation-bundle???

E-Mails are not logged

Due to the switch to Monolog, E-Mails are no longer logged. The current configuration logs emails to the default logger, which will only log if an error occurs.

InstallTool logException

In Contao Managed Version the path to the log file should be something like

$this->rootDir.'/../var/logs/prod-'.date('Y-m-d').'.log'

in InstallTool.php, Line 395

Installtool Entsperren

Nach mehrfacher falscher Passworteingabe erscheint folgende Fehlermeldung:

Es ist ein Fehler aufgetreten
Das Installtool wurde gesperrt!
Aus Sicherheitsgründen wurde das Installtool gesperrt, nachdem dreimal hintereinander ein falsches Passwort eingegeben wurde. Um es zu entsperren, führen Sie den Befehl app/console doctrine:cache:clear contao.cache auf der Konsole aus.

$ php app/console doctrine:cache:clear contao.cache
Clearing the cache for the contao.cache provider of type Doctrine\Common\Cache\FilesystemCache

Das Installtool ist jedoch weiterhin gesperrt.

Container property is not being set for the System class

Trying to run the latest install tool is causing the following error for me after logging in to the install tool:

Fatal error: Call to a member function getParameter() on a non-object in ...\vendor\contao\core-bundle\src\Resources\contao\library\Contao\Config.php on line 125

It looks like the container isn't being set before \System::getContainer() is called. \System::getContainer() returns null instead of returning the container which causes the error.

A strange side effect of this error seems to be that all of my public assets are being deleted. The originals, not just the symlinks. For example if I have a public folder files/images which contains sub-folders, all of the sub-folders are deleted when I run into this error on the install tool. Also, all of the bundle assets are deleted - again, it's the original ones in /vendor and not just the sym-linked versions. I have to do a complete composer re-install to get them back.

I'm on Windows 10. Contao 4.0.2, install bundle 0.9.6.

4.2.0.-beta1 possible bug: Config class redlecaration

Issue by @DanielSchwiperich
April 25th, 2016, 19:07 GMT

Wanted to test #426 in a fresh install and used the new beta release. However when calling the install.php I get the following error:

Fatal error: Cannot redeclare class Contao\Config in /var/www/share/contao-426.test.local/htdocs/standard-edition-4.2.0-beta1/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Config.php on line 22

Does not happen with 4.1.3.
Did not dig into it. Maybe s1 can confirm (or not)?

Symlink auf /files Ordner in /web fehlt?

Hi, fehlt in der abgeschlossenen Installation nicht ein Symlink auf den eine Ebene höher liegenden /files Ordner. Quasi wie es mit /assets geregelt ist?
Damit scheitern alle Dateiabfragen auf Daten in dem /files Ordner, auch z.B. das {{image)) Inserttag.

Habe ich etwas übersehen?

Variable "database_error" does not exist.

/contao/install throws the following error when the database doesn't exist:

Variable "database_error" does not exist.
in vendor/contao/installation-bundle/src/Resources/views/database.html.twig at line 7

Steps to reproduce:

  • composer create-project contao/standard-edition contao-test
  • Enter invalid db settings
  • Start webserver
  • Navigate to https://youraddress/install.php and accept the license
  • Enter password and submit

Environment:

  • macOS 10.12.2
  • PHP 7.0.14 (via fpm-fcgi)
  • webserver: Caddy 0.9.4
  • Composer 1.3.0

DB update loads schema of none Contao tables

$fromSchema = $this->dropNonContaoTables($this->connection->getSchemaManager()->createSchema());

Here the full database schema is loaded first and non-Contao parts are dropped after.
This causes errors, when database specific column types (like MySQL's POINT) are used in non-Contao database assets, that Doctrine doesnt know about:

[2017-12-19 03:09:26] app.CRITICAL: An exception occurred. {"exception":"[object] (Doctrine\\DBAL\\DBALException(code: 0): Unknown database type point requested, Doctrine\\DBAL\\Platforms\\MySqlPlatform may not support it. at /vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php:429)"} []

Doctrine's Schema asset filter option should be used, to prevent loading irrelevant Schema parts:

$config = $this->connection->getConfiguration();
$previousSchemaFilter = $config->getFilterSchemaAssetsExpression();
$config->setFilterSchemaAssetsExpression('@^tl_@');
$fromSchema = $this->connection->getSchemaManager()->createSchema();
$config->setFilterSchemaAssetsExpression($previousSchemaFilter);

Though it would be probably better to use a separate connection configured via doctrine bundle config for the install tool, insteadof "hot"-changing doctrine connection configuration.

Install-Tool can't handle ORM without migrations

If Doctrine Migrations is not installed, the install tool will not detect ORM entities and suggest to drop the respective tables.

I really doubt anyone is actively using ORM but not the CLI for DB, but who knows…

SQL error in install tool

After installing Contao 4.2.0 with

composer create-project contao/standard-edition <target> 4.2.0

and then opening the Install Tool with /web/install.php, I get the following SQL error:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'c42dev.tl_cron' doesn't exist' in C:\xampp\htdocs\c42dev\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:57 Stack trace: #0 C:\xampp\htdocs\c42dev\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php(57): PDO->exec('LOCK TABLES `tl...')
#1 C:\xampp\htdocs\c42dev\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(1025): Doctrine\DBAL\Driver\PDOConnection->exec('LOCK TABLES `tl...')
#2 C:\xampp\htdocs\c42dev\vendor\contao\core-bundle\src\Resources\contao\library\Contao\Database.php(644): Doctrine\DBAL\Connection->exec('LOCK TABLES `tl...')
#3 C:\xampp\htdocs\c42dev\vendor\contao\core-bundle\src\Resources\contao\controllers\FrontendCron.php(140): Contao\Database->lockTables(Array)
#4 C:\xampp\htdocs\c42dev\vendor\contao\core-bundle\src\Resources\contao\controllers\FrontendCron.php(54): Contao\FrontendCron->hasToWait()
#5 C:\xampp\htdocs\c42dev\vendor\contao\core-bundle\src\Even in C:\xampp\htdocs\c42dev\app\bootstrap.php.cache on line 2991

Someone else encountered the same issue here: https://community.contao.org/de/showthread.php?60137-Installations-Fehler&p=411922&viewfull=1#post411922

Hook "sqlCompileCommands" not called

in the contao-standard-edition we have the problem with the extension "pct_customelements_customcatalog" that the hook "sqlCompileCommands" is not called, because a event-listener is missing.

in the managed-edition everything is fine, because there exists an event-listener (InstallCommandListener), that will call "Database/Installer->compileCommands", so that the hooks are executed.

is there an solution for the standard edition?
or is the hook not available at the moment in standard-edition?

Redirect during instalation.

Issue by @wad2eq
August 1st, 2016, 07:19 GMT

I'm trying install contao on localhost i put in adress bar localhost/contao/web/install.php i check box i agree with Contidion and i get redirection do localhost/contao/install and error 404

Change /web to /public_html

Issue by @t-me
January 19th, 2017, 21:15 GMT

Hello All,

I want to change the "/web" directory to "/public_html".

When i follow this link : symfony.com/override-the-web-directory

and do a composer update it looks fine. But when i go to install.php i get a error 500. in the log files i see this

[Thu Jan 19 21:06:15.625264 2017] [lsapi:error] [pid 234676] [client 82.75.164.96:0] [host t-me.nl] Backend fatal error: PHP Fatal error:  Uncaught InvalidArgumentException: The target directory "/home/debxxx/domains/t-me.nl/app/../web" does not exist. in /home/debxxx/domains/t-me.nl/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php:85\nStack trace:\n#0 /home/debxxx/domains/t-me.nl/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php(262): Symfony\\Bundle\\FrameworkBundle\\Command\\AssetsInstallCommand->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))\n#1 /home/debxxx/domains/t-me.nl/vendor/contao/installation-bundle/src/Controller/InstallationController.php(170): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))\n#2 /home/debxxx/domains/t-me.nl/vendor/contao/installation-bundle/src/Controller/InstallationController.php(133): Contao\\InstallationBundle\\Controller\\InstallationController->runCommand(Object(Symfon in /home/debxxx/domains/t-me.nl/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php on line 85\n

The reason i want to change it is because i cant change public_html to web directory as root folder.

Integrate real DB migrations

Having a real DB migration framework would open up for a better extension maintenance

possible solution:

  • directly use an existing db migration framework (problem: what concepts they provide in terms of plugin based db schemas)
  • greatly increase doctrines schema tool features to work with procedures, triggers and views (and ofc contribute this back to the doctrine project)
  • build a migrations system on our own
  • just use the hook (which is currently missing :D) and let the developer feel the pain

schema manager fails with unknown db types

I am in the process of migrating a Contao 3.5 installation to version 4 that contains some tables with POINT and other geometric data types (mysql spatial extension).

When opening the install tool a DBALException is thrown because doctrine unfortunately doesn't know anything gemoetric column types:

Unknown database type point requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.

This only happens if the table has a column of an 'unknown type' and the table name starts with tl_.

My quick fix for that was to add a custom mapping to my config.yml like so...

doctrine:
  dbal:
    mapping_types:
      point: blob

... but isn't there a better (more general) way? Why does doctrine need to know about those columns for the migration?

ContainerFactory hardcodes some directories to /var/…

Try the following scenario:

  1. Install Contao 4.2.5 via composer create-project contao/standard-edition <target> 4.2.5.
  2. Open example.org/install.php.
  3. Update the installation to Contao 4.3.0 via composer update.
  4. Delete the /system/logs symlink.
  5. Open example.org/install.php.

The creation of the symlink for /system/logs in the Contao Install Tool will fail, because the ContainerFactory hardcodes the log directory for the kernel to /var/logs: ContainerFactory.php#L53. This directory will only be present, if you directly installed the contao/standard-edition 4.3, instead of updating to it.

Doing php app/console contao:symlinks instead of using the Install Tool will work.

\cc @stefansl

4.4.0: Install tool fails without functioning MySQL connection

I ran into trouble when trying to move a minimal Contao 4.4.0 "Hello World" website that I created through the .zip file (manual installation) to a remote host. The install tool under (contao/install) would throw an error related to MySQL, which makes little sense because obviously I need to use that very tool in order to fix the MySQL connection and point it to the new database.

The problem can be reproduced locally by creating a simple website (with website root and article) and turning off the MySQL server. The install tool then fails with this error:

[2017-06-21 12:55:06] app.CRITICAL: An exception occurred. {"exception":"[object] (Doctrine\\DBAL\\Exception\\ConnectionException(code: 0): An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory at /home/alex/lampp/nucontao/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:103, Doctrine\\DBAL\\Driver\\PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /home/alex/lampp/nucontao/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47, PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /home/alex/lampp/nucontao/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43)"} []

This breaks the migration process described in the manual.

Forum Thread (in German):
https://community.contao.org/de/showthread.php?67128-Contao-Install-Tool-scheitert-ohne-MySQL-Verbindung&p=443236#post443236

Running the installer deletes files and destroys symlinks

I have to admit, that I am not sure, if this is related to the installer. However this bug happened the last time, I run the installer to update my database.

This are the facts:

  • My composer links several files into the web-folder of my symfonie application
  • It occured several times, that these links get deleted for a random reason but not only this: even the original content which was linked is missing after that. Only chance to get it back is to uninstall the dependency and reinstall it. It seems like there is a recursive rm call or something
  • I noticed that behavior the last time, when I run the database update via the installer because my editor complained about a changed/removed file which was still open.

As I already said: I dont know if this is just coincident. If its not the installer then what else?
Any help is appreciated.

I should add, that this only happens for links in the web-folder. However the asset-link never got removed.

html lang and body class missing

In the install tool, the <html> language and the <body> class are missing in Contao 4.1.3 and 4.2.0-beta1 for some reason:

<!DOCTYPE html>
<html lang=""><body class="">

It appears the Twig variables language and ua are set with an empty string.

Interestingly, it works on the license accept page (see HTML source in #14).

Environment:

  • Windows 10
  • XAMPP 5.6.14
  • PHP 5.6.14
  • PHP running under CGI

Constant VERSION is not set

The VERSION constant isn’t set in the install tool. If you use something like this in the DCA of an extension:

'sql' => version_compare(VERSION, '3.2', '<') ? "varchar(255) NOT NULL default ''" : "binary(16) NULL",

It installs the wrong column type.

InstallationKernel redirects to wrong route

The InstallationKernel redirects to the indexAction of the InstallationController, whenever the system is able to boot:

if ($this->canBootRealSystem()) {
    return new RedirectResponse('../contao/install');
}

https://github.com/contao/installation-bundle/blob/1.1.0/src/HttpKernel/InstallationKernel.php#L70

However, this redirect does not work when you access the Install Tool like this:

http://dev.env/contao-4.2.0/web/contao/install.php

because it will then redirect to

http://dev.env/contao-4.2.0/contao/install

due to ../

Allow more special characters in database names

As per this commit the install tool no longer allows special characters in database names except $ and _ . That can be a problem because some hosters don't allow you to choose database names freely. On HostEurope WebPacks, for example, database names always start with wp123456789-. You can choose what comes after the hyphen but you can't get rid of the hyphen itself. Please allow for such situations.

unable to open install tool with incomplete localconfig.php

If your /system/config/localconfig.php is incomplete (for whatever reason) and you want to access the Install Tool (/web/install.php), the following error happens:

Fatal error: Uncaught exception 'Contao\CoreBundle\Exception\IncompleteInstallationException' with message 'The installation has not been completed. Open the Contao install tool to continue.'

The error message suggests to "Open the Contao install tool to continue.", however that's exactly what I tried to do ;)

The only way to get out of this is to completely delete the localconfig.php.

install tool does not (cannot) display errors of install commands

If some errors happen while running InstallationController::runPostInstallCommands for example, the errors will not be displayed to the user and the installation might be left in an incomplete state without him knowing. For instance, if some errors happen while creating the symlinks, e.g.:

 ------- ------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------- 
          Symlink                  Target / Error                                                                                                                                     
 ------- ------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------- 
  ERROR   system/themes/flexible   Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?  
  ERROR   web/assets               Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?  
  ERROR   web/system/themes        Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?  
  ERROR   system/logs              Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?  
 ------- ------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------

These errors are catched by the command and then written to the SymfonyStyle object, which creates the styled output for the command line. That output will go nowhere though, since InstallationController::runPostInstallCommands uses a NullOutput

$command->run(new ArgvInput([]), new NullOutput());

So they are not visible nor logged anywhere.

May be these post-install-commands should be put in an InstallService for example, so that errors can be handled differently by the callers? The contao:symlinks command would then call these functions from the InstallService, catch the errors and display them on the command line as usual, while the InstallationController can catch the errors and then display them in the Install Tool instead.

Cannot install managed edition

Not sure but I guess this should solve it:

    public function installAction()
    {
        if ($this->container->has('contao.framework')) {
+            try {
                $this->container->get('contao.framework')->initialize();
+            } catch (IncompleteInstallationException $e) {}
        }

/cc @aschempp @leofeyer

Robots Meta-Tag

Wie bei /contao/login sollte bei /contao/install auch das Meta-Tag <meta name="robots" content="noindex,follow"> gesetzt werden.

Problem with assets path on license accept view

In Contao 4.1.3 as well as 4.2.0-beta1, on the page where the license needs to be accepted, I get the following HTML output:

<!DOCTYPE html>
<html lang="en">
<head>

  <meta charset="utf-8">
  <title>Contao Open Source CMS</title>
  <meta name="generator" content="Contao Open Source CMS">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">

  <link rel="stylesheet" href="/http://localhost/c42dev/web/assets/stylect/css/stylect.min.css">
  <link rel="stylesheet" href="/http://localhost/c42dev/web/system/themes/flexible/basic.css">
  <link rel="stylesheet" href="/http://localhost/c42dev/web/system/themes/flexible/install.css">
  <!--[if IE]><link rel="stylesheet" href="/http://localhost/c42dev/web/system/themes/flexible/iefixes.css"><![endif]-->

  <script>var Contao={theme:'flexible',path:'http://localhost/c42dev/web'}</script>
  <script src="/http://localhost/c42dev/web/assets/mootools/js/mootools.min.js"></script>
  <script src="/http://localhost/c42dev/web/assets/stylect/js/stylect.min.js"></script>
  <script src="/http://localhost/c42dev/web/assets/contao/js/mootao.min.js"></script>
  <script src="/http://localhost/c42dev/web/assets/contao/js/core.min.js"></script>
  <script src="/http://localhost/c42dev/web/system/themes/flexible/hover.js"></script>
  <!--[if lt IE 9]><script src="/http://localhost/c42dev/web/assets/html5shiv/js/html5shiv.min.js"></script><![endif]-->

</head>
<body class="win firefox gecko fx46">

  <div id="header">
    <h1>Contao install tool</h1>
  </div>

  <div id="container">
    <div id="main">
        <fieldset class="tl_tbox nolegend">
    <h3>GNU Lesser General Public License</h3>
    <div id="license">
      <pre></pre>
    </div>
    <form class="tl_install_form" method="post">
      <div class="tl_formbody_submit">
        <input type="hidden" name="FORM_SUBMIT" value="tl_license">
        <input type="hidden" name="REQUEST_TOKEN" value="">
        <div class="tl_submit_container">
          <button type="submit" class="tl_submit">Accept license</button>
        </div>
      </div>
    </form>
  </fieldset>
    </div>
  </div>

</body>
</html>

All assets cannot be loaded, because the URL is preceeded by a forward slash. In fact, when putting {{ asset('') }} into the template, it echos /http://localhost/c42dev/web/. This happens on every page load (as long as the license is not accepted).

Environment:

  • Windows 10
  • XAMPP 5.6.14
  • PHP 5.6.14
  • PHP running under CGI

Caching issue

The install.php runs in production mode. This means that whenever you add or edit e.g. DCA files in the "dev" environment, the installation bundle will not notice this because the DcaExtractor checks for the production file cache to exist.

fatal error when using database password with two %

Reproduction

  1. Set the password of your MySQL database user to asd%asd%asd for example.
  2. Install the Contao Managed Edition and open the Install Tool
  3. Fill in the credentials of your database user and save.

The following fatal error will occur:

Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException: You have requested a non-existent parameter "asd". 
in …\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php:100 Stack trace:
#0 …\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag.php(56): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('asd') #1 …\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php(232): Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag->get('asd')
#2 [internal function]: Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->Symfony\Component\DependencyInjection\ParameterBag\{closure}(Array)
#3 …\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php(242): preg_replace_callback('/%%|%([^%\\s]+ 
in …\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php on line 100

Cause

The Install Tool creates the following parameters.yml:

parameters:
    database_password: asd%asd%asd

If any of your Symfony parameters contain two %, you need to escape them. This will work:

parameters:
    database_password: asd%%asd%%asd

According to https://stackoverflow.com/a/27274304/374996 using double quotes should also work, but I cannot confirm that. The error still occurs when using "asd%asd%asd".

Install Tool does not work in dev environment

Reproduction

  1. Create a new Contao installation via composer create-project contao/managed-edition.
  2. Create a fresh, empty database.
  3. Open the install tool via example.org/app_dev.php/contao/install.
  4. Accept the license, then enter a password.
  5. Enter the database credentials and save the settings.

On the next step you will see the following error message:

Variable "sql_message" does not exist.

This is because the Twig template main.html.twig uses

{% if sql_message is not empty %}

However, at this point sql_message is a non-existing variable. It would be defined here - but in a fresh installation the function returns here - thus the variable is never defined for the Twig rendering context.

Using is not empty on non-existent variables will lead to the Variable "…" does not exist error in the dev environment (it will not yield this error in the prod environment). See also https://straightupcraft.com/articles/testing-if-something-exists-is-defined-length-is-not-null-is-not-empty

You should use

{% if sql_message|default %}

instead.

Re-add the backend link

now that we have the real container, it should be possible to re-add the link to the backend in the install tool, right?

Install tool: TypeError: $(...) is null

Issue by @Fuzzyma
June 29th, 2016, 16:06 GMT

Iam using contao 4.2. When running the install tool, I get a javascript error in Firefox:

TypeError: $(...) is null
Theme.setupMenuToggle() hover.js:2
<anonym> hover.js:2
.fireEvent/<() mootools.min.js:3
forEach() self-hosted:232
forEach() self-hosted:243
.each() mootools.min.js:2
.fireEvent() mootools.min.js:3
h() mootools.min.js:4
1 hover.js:2:2766

Installation 4.4.0

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

Blank page on unsuccessful installation

If the parameters.yml file exists but is invalid, the install tool will simply show an empty page. It would probably make sense to try-catch the kernel booting in the install.php

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.