Fixes people have been waiting a while for
The following two "fixes" could almost be described as new features, because these things have been "broken" for quite some time (early in the 1.x series).
The first new feature was necessary because, in Sulu 2.0, we broke the mechanism to exclude templates from certain webspaces. Templates were excluded in the 1.x series by not providing a Twig template for the HTML representation. This often caused confusion, because developers were wondering why templates were sometimes missing in the dropdown. Additionally, this approach did not work nicely when Sulu was used as a headless CMS, because if just a JSON Twig template was provided, the template was still not shown in the list. This meant that a HTML Twig template always had to be provided, even if it was empty. This solution did not feel very elegant.
Since we broke this behavior anyway, we decided to introduce a fix, which is more like a new feature. The webspace configuration file now also has an option to exclude templates. So new templates always show up, which hopefully causes less confusion. And if you still want to exclude certain templates on certain webspaces, there is now an explicit way to do so.
The second fix concerns form validation. If a block contained an empty mandatory field, it was not correctly recognized by the validation. The form could even be saved without the system complaining about it. Now this kind of validation also works within blocks.
Minor bug fixes that improve the UX and DX
Apart from our two new features made necessary because the 2.0 release broke some previously existing functionality, there have been numerous other fixes, both in the UI itself as well as fixes that only concern developers.
Let's start with fixes that have a direct impact on the UI:
- The pages in the tree view could be sorted, although the API did not support it. Therefore we deactivated this feature for this specific list. It is also questionable if the sorting makes sense in that case, because this tree reflects the structure of the entire website, and changing this structure might lead to confusing situations.
- The media selection in a form crashed very badly (resulting in an absolute blank screen) when it received an invalid value. This could happen if something went wrong during a migration, or when a developer reuses a property name that was assigned to a different type previously.
- The cache will be correctly purged when an account assigned to a page changes.
- Downloading the original media from S3 resulted in an incorrect URL.
Changes affecting developers that were made with a view to improving the developer experience:
- On multiple occasions, developers reported that the login was not working for them. This was caused by other session cookies being set on the current domain, which usually only happens on a development machine when switching between different projects. This was fixed by setting a non-default session cookie name. Bear in mind that this change was done in sulu-skeleton, and if you are having this problem too you have to make this change yourself.
- The creation of the navigation link when linking internally between different webspaces was fixed. If you have this problem on your website as well, you have to incorporate that fix in your template. (Thank you therouv for reporting.)
- Related to the previous issue, the redirect when visiting the original page URL was not working either.
- The LocalizationManagerInterface can now be autowired.
- AutoConfiguration for SitemapProviders have been fixed (Kudos go to HadGS for fixing this).
- The cache was not automatically cleared after changing image formats.
- Some unused code from the NavigationItem has been removed. It might be that this causes your code to fail, but you can safely delete the failing function calls, because they didn't have any effect anyway. See our UPGRADE for more details.