Contao 5.1 has been released and offers exciting new features such as a dark mode, back end favorites, form submission via Ajax and much more. In this article we present the most important new features.
Create back end favorites
From now on you can create your own favorites list in the back end. You need frequent access to the front end modules or a special layout? No problem!
This is how it works:
Open the desired menu item and click on the "star icon" in the upper navigation bar. Quickly assign a name and your new favorite is already saved. You can even nest the favorites and create submenu items for even better tidiness.
If you have used the extension "easy_themes" so far, then use the favorites for it in Contao 5, because the support for "easy_themes" ends with Contao version 4.13.
Form sending without any forward page
Frequently requested and now included in the Contao core. Forms can now be submitted directly via Ajax. This eliminates the need for a separate redirect page.
This is how it works:
Go to the configuration of the form and activate the checkbox "Send via Ajax". Then add a confirmation message. In the confirmation text you have the possibility to access the submitted form data with the help of Simple Tokens. For example, you can output the field "firstname" with the notation ##firstname##
.
Copy repeatedly
Imagine you've created certain sample elements that you want to copy and paste into multiple articles or pages. Until now, you had to copy the content elements to the clipboard each time you wanted to paste them. For this use case there is now the new function "Copy repeatedly". This means that the clipboard is not automatically cleared when pasting.
This is how it works:
Click on "Edit multiple" and then select the desired elements. Now you will find a new button "Copy repeatedly". Click on it and then paste the elements as many times as you want. To empty the clipboard and end the "Copy repeatedly" process, click on the button "Clear clipboard".
Improvement of sorting and search
The search function is now preconfigured to useful standard fields. When searching, many fields can now be sorted ascending or descending. Developers also have the option of specifying their own standard fields for the search.
Dark Mode and further improvements in the back end display
The back end has also been adapted in one place or another. Most noticeable is certainly the new dark mode and the clearer distinction of the content elements. In addition, there is a new grid system in the back end, which now allows to place several fields next to each other. This shortens the length of the individual input forms.
In the profile settings, there is a new option "Do not collapse content elements". This means that the preview of content elements is no longer automatically shortened.
In addition, protected articles are now better marked by a lock icon.
Further improvements and changes
- A message is now displayed if the system administrator's e-mail address is missing.
- In the layout, the viewport setting is now independent of the CSS framework and receives a suitable default value.
- The system log displays the affected URI and page ID for better error analysis.
- The login screen always displays the same message, regardless of whether the back end user really exists or not.
- The feed reader module has been adapted and now additionally supports the JSON format.
- New background workers allow long-lived processes to run asynchronously in the background.
- Cron jobs have been improved and new functions added.
- Error handling for forms has been extended.
A complete list of all changes can be found in the changelog at the end of this blog post. Also worth reading is the official release article on contao.org and worth watching is the YouTube video of the Contao Academy.
trakked is compatible with Contao 5.1
As usual, all known trakked functions are also available for Contao 5.1.
Update to Contao 5.1 directly with trakked?
Since we get this question often, we would like to address this point again very briefly. The update function of trakked is only suitable for bugfix releases, because for major and minor releases, manual adjustments have to be made to the installation outside of trakked. More about the concept of Semantic Versioning can be found in the Contao documentation.
Should I update to Contao 5.1?
With the release of Contao 5.1, support for version 5.0 ends. If you are using Contao 5.0, we recommend that you update as soon as possible.
If you are using Contao 4.x, you have to decide for yourself if an update to Contao 5.1 is already possible and reasonable. Fortunately, the first extensions and themes are now compatible with Contao 5. Basically, if you only have core functions and compatible extensions in use, then nothing stands in the way of an update.
Thank you for the development of Contao!
We would like to thank everyone who contributes to the constant development and improvement of our favorite CMS.
Changelog of the fixed issues in Contao 5.1.0-RC3:
Changelog of the fixed issues in Contao 5.1.0-RC2:
- #5704 Do not require overwriting the console path (leofeyer)
- #5714 Use the HTML sanitizer component as Twig filter (ausi)
- #5697 Fix the module wizard (leofeyer)
- #5703 Fix the Gulp watch task (fritzmg)
- #5702 Make "$consolePath" a required argument (leofeyer)
- #5695 Use two different icons for light and dark mode (leofeyer)
- #5691 Correctly toggle the favorites menu group (leofeyer)
- #5687 Move the dark mode toggle to the header bar (leofeyer)
- #5689 Make console_path a general Contao configuration (Toflar)
- #5690 Fix the icons when toggling structures in dark mode (leofeyer)
Changelog of the new features in Contao 5.1.0-RC1:
- #4847 Add a new feed reader implementation (bezin)
- #5682 Allow to pass an array of allowed attributes to Input::stripTags() (leofeyer)
- #5672 Add more back end grid classes (leofeyer)
- #5673 Add an attributes_callback for DCA fields (aschempp)
- #5671 Allow a minimum amount of workers for autoscaling (Toflar)
- #3694 Add the URI and page ID to log entries (SeverinGloeckle)
- #5427 Check the administrator email address (fritzmg)
- #5405 Introduce background workers (Toflar)
- #5631 Implement a dark scheme toggle (aschempp)
- #5368 Enable the login rate limit (bytehead)
- #5598 Also minify the core.js and mootao.js scripts with Webpack (leofeyer)
- #5031 Add a dark mode for the back end (leofeyer)
- #4936 Support the native date input type for text fields in the form generator (fritzmg)
- #5307 Add a confirmation message to forms and provide Ajax out of the box (qzminski)
- #4898 Add error handling to the form data processing (rabauss)
- #5425 Allow sorting DCA fields ascending and descending (aschempp)
- #5417 Add a button to copy multiple records and paste them multiple times (aschempp)
- #5591 Remove localconfig.disableCron in favor of a new zero config approach (Toflar)
- #5602 Adjust the name of the default guests group (leofeyer)
- #5116 Add the MemberActivationMailEvent (fritzmg)
- #5478 Add the "#[\SensitiveParameter]" attribute (ausi)
- #5371 Allow to set the locale in "Template::trans" (fritzmg)
- #5609 Improve the content elements view (leofeyer)
- #5607 Use CSS variables for all colors and CSS classes instead of inline styles (leofeyer)
- #5592 Add a favorites menu in the back end (leofeyer)
- #5594 Also add the new "idempotent actions" logic to DC_Folder (leofeyer)
- #5406 Add stimulus controllers in the back end (aschempp)
- #5554 Add support for async CLI cron jobs (Toflar)
- #5461 Disable the request token check for idempotent actions (aschempp)
- #5364 Allow defining a default search field (leofeyer)
- #5403 Add a user option to not collapse content elements (aschempp)
- #5379 Use sendfile for local files downloads (m-vo)
- #5359 Change the default value for tl_layout.viewport (leofeyer)
- #5347 Add a markdown help text (leofeyer)
- #5304 Add a lock overlay for protected articles (leofeyer)
Changelog of the fixed issues in Contao 5.1.0-RC1:
- #5683 Fix the skippable cronjobs (fritzmg)
- #5680 Add isRequired() for desired_size and max settings on workers (Toflar)
- #5679 Add a default value for the worker "min" configuration (Toflar)
- #5670 Do not add the request token to idempotent actions (leofeyer)
- #5666 Skip cron execution for minutely cron and messenger cron in web scope (Toflar)
- #5653 Fix the tree indentation (leofeyer)
- #5652 Only hide the dark/light theme icons via CSS (leofeyer)
- #5647 Ensure Doctrine connections are closed after message handling (Toflar)
- #5646 Use enumNode instead of custom validation (Toflar)
- #5597 Correctly open and close tree nodes if there is a filter (leofeyer)
- #5593 Fix the "aia-hidden" attribute in the tips.js file (leofeyer)
About Contao 5.1
The first stable version of Contao 5.1 has been released on 15 February 2023 and was the successor of Contao 5.0. 5.1 has been updated until 14 August 2023, after which it has been replaced by Contao 5.2.