The image service no longer supports upscaling images for reasons of bandwidth and storage consumption. Images should be upscaled via CSS if needed.
The form template
form.html5 has been renamed to
form_wrapper.html5, so it can be overridden with a custom template in the form settings.
String class is not compatible with PHP 7, we have renamed it to
String class remains available for reasons of backwards compatibility, however it has been deprecated and will be removed in a future version.
The mime icons have been removed from all front end templates. Instead, a new style sheet called
icons.css has been added to the layout builder, which restores the mime icons for downloads and enclosures via CSS.
The “article_raster_designer” hook has been removed. Use the “getArticles” hook instead and return a string to override the default articles content.
The “add submit button” option in the form generator has been removed. To generate an inline form, add a text field and a submit button and assign the CSS class
inline-form to the form element (requires the
form.css style sheet to be enabled in the page layout).
The field “space before/after” has been removed. Use a CSS class instead and define the spacing in your style sheet.
If an element is included in another element, the CSS classes are now merged instead of overwritten, e.g. if content element A has the CSS class
elemA and includes a front end module with the CSS class
elemB, both CSS classes will be applied (
Here’s how to select the elements separately:
The form option “tableless” has been removed, because all forms are now tableless by default. Instead, the
form.css style sheet of the layout builder has been enhanced to provide basic formattings for labels and input fields.
By default, labels and input fields are listed underneath each other. However, if you add the CSS class
horizontal-form to a form, they will be aligned in a horizontal layout, similar to the old table-based layout.
If you add the CSS class
inline-form, the widgets will be aligned vertically.
The form field “headline” has been removed in favor of the “explanation” field.
Every form now appends its numeric ID to the
FORM_SUBMIT parameter, so custom forms used for triggering modules such as the login module have to be adjusted to pass the correct form ID (e.g.
tl_login_12 instead of
If a front end form is set up to store the submitted data in the database, date and time fields are now automatically converted to Unix timestamps.
The meta keywords tag has been removed from the
fe_page.html5 template, as it does not serve a purpose anymore. If you still want to use it, adjust the template as follows:
Adding the schema.org tags required to insert an additional
<span> element into the following templates:
The following templates have been renamed to match the content element or module key:
The following templates have been consolidated:
Generally, we now require the template names to match the content element or module keys, so if your module has the key
taskList, the corresponding template should be named
Users can then create custom templates à la
mod_taskList_custom.html, which will be shown in the “custom module template” list.
The keys of the following front end modules have been changed:
The database classes have been mapped to the Doctrine DBAL, therefore custom drivers are no longer supported. If you have been using a custom driver for a database other than MySQL, use the corresponding Doctrine driver instead.
dump() function has been replaced by the Symfony debug bundle. Its output will be added to the web profiler.
The style sheet
files/tinymce.css and the folder
files/tiny_templates have been removed. If you want to use the feature, please adjust the TinyMCE config file, which is now a template (e.g.
Frontend::parseMetaFile() method was deprecated since Contao 3 and has been removed in Contao 4.0.
$_SESSION['TL_USER_LOGGED_IN'] flag has been removed.
Contao 4 only uses a single PHP entry point, namely the
app_dev.php file. The previous PHP entry points have been removed and a route has been set up for each one instead.
The old paths are replaced automatically in the back end, still you should adjust your templates to use
cron.php entry point has been removed. Use the
/_contao/cron route instead if you want to trigger the cron job manually.
In Contao 3 it was possible to disable aliases and make Contao use numeric IDs only. This was a workaround for an old IIS server, which has now been dropped.
More information: https://github.com/contao/core-bundle/issues/118
system/runonce.php file is no longer supported. If you need to set up a
runonce.php file, put it in the
DcaExtractor class is no longer instantiable via
new DcaExtractor(). Use the
DcaExtractor::getInstance($table) method instead.
The MooTools “slimbox” plugin has been removed. Use the MooTools “mediabox” or the jQuery “colorbox” plugin instead.
Message class now supports scopes, which can optionally be passed as second argument:
The scope defaults to
TL_MODE. The previous arguments of the
generate() method have been removed. If you want to output the messages without the wrapping element, use
The “prepareFormData” hook now passes
$this as last argument, just like in any other hook.
The navigation menus are now using
<strong> instead of
<span> to highlight the active menu item.
The search module is now using
<mark> instead of
<span> to highlight the keywords.
The newsletter channel menu is now using
<legend> instead of
The main section of the
fe_page.html template now uses the
Submit buttons now use
<button type="submit"> instead of
The book navigation module now uses the CSS class
previous instead of
prev for the link to the previous page.
The pagination menu now uses the CSS class
active instead of
current for the active menu item.
even are now correctly assigned to tables.
The form submit widget now uses the CSS class
widget widget-submit instead of
The content syndication links of the
mod_article.html5 template now have CSS classes and the class “pdf_link” has been replaced with “syndication”:
In Contao 3
new File('tmp.txt') automatically created the file if it did not exist and all write operations such as
$file->append() were carried out directly on the target file.
This behavior could already be changed in Contao 3 by passing
true as second argument; the file was then only created if there was a write operation at all and any operation was carried out on a temporary file first, which was then moved to its final destination.
In Contao 4 this changed behavior has become the default and the second argument has been dropped.
In Contao 3 the user files in the
files/ directory were publicly available via HTTP by default and it was possible to protect certain subfolders. Now, due to a technical change, the user files are protected by default and subfolders have to be published explicitly to be available via HTTP.
In Contao 3 the alias of an article was automatically used as its CSS ID, if no custom CSS ID was defined. In Contao 4 the default CSS ID will be generated from its numeric ID, e.g.
In Contao 3 the table inspection methods of the
Database class processed both tables and views. However, the Doctrine schema manager, which is used in Contao 4, only processes tables.