Questions and answers

Here you will find a collection of the most frequently asked questions with the appropriate answers.

If you have a suggestion for this section, use the “Edit this page” link in the top right-hand corner. If you have a GitHub account and are logged in, GitHub automatically creates a forum where you can add your suggestions. You can then use GitHub to create a pull request.

General

I have forgotten my administrator password, how can I reset it?

If there are multiple records in the database table “tl_user” for which the admin flag is set, you can reset the first value for all of them to create a new administrator in the Contao install toolbar.

I have forgotten the Install Tool password, how can I reset it?

Remove the line in the file “system/config/localconfig.php” starting with $GLOBALS['TL_CONFIG']['installPassword']. Afterwards you can set a new password with the Install-Tool.

Can I maintain multiple websites with Contao?

Yes Contao supports multi-domain operation and multilingual websites.

Can I maintain multilingual websites with Contao?

Yes Contao supports multilingual websites.

How do I enable the Contao debug mode?

You can activate the Contao debug mode via the backend.

Where can I find more Contao resources?

You can find more Contao resources on the project website.

May I use Contao for commercial projects?

Yes, the GNU Lesser General Public License (LGPL), under which Contao has been licensed since version 2.5, allows you to use the system for commercial projects. Please note that the copyright notices in the Contao files may not be removed or changed according to the license terms.

How can I refresh the »Application Cache« from the console?

If you want to refresh the »Application Cache« you can do this via the Console:

vendor/bin/contao-console cache:clear --no-warmup
vendor/bin/contao-console cache:warmup

Template

How can I display all variables of my template?

The information about this can be found under Show Template Data.

How can I configure the TinyMCE editor?

The information about this can be found under TinyMCE Editor Configuration.

How can I add a CSS class to all headlines?

You can add a CSS class to all headlines of all modern fragments (content elements or front end modules) in the front end by setting the HTML attributes of the headline object in the _headline Twig component):

{# templates/component/_headline.html.twig #}
{% use "@Contao/component/_headline.html.twig" %}

{% block headline_attributes -%}
    {%- set headline = headline|merge({attributes: attrs().addClass('foobar').mergeWith(headline.attributes|default)}) -%}
    {{ parent() }}
{%- endblock %}

Note that this will not affect content elements and modules using legacy templates - or templates that are not using the _headline component.

Installation

Notification: The database server is not running in strict mode!

This is a hint how to activate the strict mode. More information can be found here.

Configuration and adjustment

Can I change the directory »web« to »public«?

Yes. You have to rename the directory. Check if the entry "public-dir": "web" exists in the “composer.json” and remove it or change it to public. Then set this directory as the document root via the admin panel of your hosting provider. Afterwards execute composer install from the manager or the console.

How can I change the Contao backend path?

since 4.13 You can add the entry route_prefix in config.yaml and then you have to empty the application cache once using the Contao Manager or the console.

# config/config.yaml
contao:
    backend:
        route_prefix: '/myadmin'
No e-mail is sent via my Form, what do I have to do?

Check the SMTP details of your hoster in your parameters.yaml or add them if missing. Then you have to empty the application cache once via Contao Manager (“Maintenance” > “Application Cache” > “Rebuild Production Cache”) or via the console.

Can I use a different e-mail Address as sender for forms?

The e-mail address set in “Settings > E-mail address of the system administrator” is also used as the sender for e-mails sent by the form generator. You can enter an additional e-mail address in the “Site structure” section for the “Starting point of a website” page type. This E-Mail address will then be used as the sender. Since Contao 4.10 you can set different e-mail configurations per website starting point, form and newsletter channel.

How can I add the language parameter to the URL?

You can add the entry prepend_locale: true in config.yaml and then you have to empty the application cache once using the Contao Manager (“Maintenance” > “Application Cache” > “Rebuild Production Cache”) or the console. Since Contao 4.10, you can freely define the URL prefix, independently of the language.

# config/config.yaml
contao:
    prepend_locale: true
Can the URL suffix .html be removed?

You can add the entry url_suffix: '' in config.yaml and then you have to empty the application cache once using the Contao Manager (“Maintenance” > “Application Cache” > “Rebuild Production Cache”) or the console.

# config/config.yaml
contao:
    url_suffix: ''
Why is my HTML code not applied in the TinyMCE editor?

Answers can be found in the TinyMCE Editor Configuration section.

File management

My pictures are not displayed in the frontend, what can I do?

Check in the file manager if the directory with your images is marked as “Public”. Also make sure that there is no outdated .htaccess file in the /web folder or a parent folder of your installation.

Is it possible to hide the search in the file manager?

Yes. Via a DCA entry:

    //contao/dca/tl_files.php
    unset($GLOBALS['TL_DCA']['tl_files']['list']['sorting']['panelLayout']);

Theme

Why are changes to my SCSS files not applied?

If you make changes to a SCSS partial file, you must then empty the script cache in “System Maintenance”.

Contao Manager

Why do I need the Contao Manager?

You need the Contao Manager to install/upgrade/uninstall Contao and extensions. You can find more information under About Contao Manager.

Can I add the Contao Manager to an existing installation?

Yes, the Contao Manager recognizes your existing Contao installation during the installation process.

How to update the Contao Manager?

The Contao Manager automatically performs an update check when it is accessed. If a new version is available, Contao Manager will update itself.

What is the Composer Resolver Cloud?

The Composer Resolver Cloud allows you to install Composer dependencies via the Contao Manager even if your server does not have enough memory.

How can I renew the »Application Cache« via Contao Manager?

If you want to refresh the »Application Cache« you can do this in the Contao Manager »Maintenance/Application Cache« area.

The Contao Manager has hung up

If the Contao Manager stops responding, the console output window does not close, or after a reload of the manager page or after a reload of the manager page you always get the same output, delete the file contao-manager in the directory task.json. delete the file task.json.

After that, the Contao Manager should run again.

Can I rename the ».phar« file?

Yes. You can use any file name you want. However, the Contao Manager is no longer accessible from the Backend. In this case, you can change the config.yaml accordingly. Afterwards, you have to empty the application cache once using the Contao Manager (“Maintenance” > “Application Cache” > “Rebuild Production Cache”) or the console.

# config/config.yaml
contao_manager:
    manager_path: your-name.phar.php