This changes Backend::dateTime to return an empty string instead of the current date when dealing with a null date. It should only affect the date field preview instance. Credit to @pvullioud
Fixes#3260. Enables setting the target field for the trigger API to a form context an arbitrary number of levels above the current field by prepending the field name with `^` for each level to go up. For instance, if you had a field [allow_pictures] in the base form and a [records] repeater with [image] fields, and you set the target field for the trigger on [image] to [^allow_pictures] then it would work properly instead of looking for an [allow_pictures] field on the [records] field. Credit to @MartynasJanu. Documented in edc78b584b
This change allows both settings models and custom settings controllers to be registered in one definition by preventing overwriting of the provided `url` when present. This enables the use case of extending the base \System\Controllers\Settings controller to implement custom functionality on your settings controller while retaining the majority of the default functionality enabled through the use of a SettingsModel.
Credit @mcharytoniuk.
While importing over 250k records ImportModel kept running into various problems. One of them was too big memory usage - `ImportModel` loaded the complete file upfront (`$reader->fetchAll()`). Simple one-line change to `$reader->fetch()` makes `ImportModel` import CSV file row-by-row and returning an iterator which limits memory usage and allows data to be imported. This change optimizes memory usage and allows much simpler importing of larger files.
If the parent of the file attachment relationship already exists, then attach the file directly to it in this request instead of going through deferred bindings. Will continue to attach files through deferred binding if the parent relation doesn't exist.
Adds support to retrieve protected files using the class they are defined to be using if that class differs from the default System\Models\File class. This makes it possible to use a custom class extending the base file model class that does output processing on the file data (for example, an EncryptedFile class that has to decrypt the file contents before they can be output to the browser).
Stores the last visited page of list widgets in the session to restore to on next page load. Does not apply when filters / searches are applied. Credit to @tobias-kuendig
Fixes#2714, #2774.
Plugin Management UX Improvements
The plugin management screen has been improved to allow managing the status of plugins (updates disabled/enabled, plugin enabled/disabled) on the overview page and allow bulk management of plugins as well. Additionally, the Reset Plugin Data action has been added to the bulk action menu; this is essentially the same as calling `php artisan plugin:refresh Author.Plugin`, which reverses all the migrations for that plugin then reapplies them; effectively reseting the plugin's database data. Due to the destructive nature of this action it has been limited to only be available to Super Users and only when the site is in debug mode.
Thanks to @Teranode for his assistance on this.
Reported and fixed by @interworks-morr:
"Occasionally with certain IIS setups, the file will contain an out-of-date class name. This patch will verify the class name from the file before returning, and clear the cache if invalid."
Fixes: https://github.com/octobercms/october/issues/1927. Related: https://github.com/laravel/framework/issues/17508. Issue occurs when database configuration related to full support for the utf8mb4 charset is incorrect; MySQL > 5.7 & MariaDB > 10.2 doesn't have this issue because they default to the correct configuration values; this fix solves the issue for older versions of MySQL and MariaDB without requiring database server configuration changes.
The root cause of the issue with the utf8mb4 encoding is that both InnoDB and MyISAM have too low of an index key prefix limit (767 bytes and 1000 bytes respectively) to properly store 255 4-byte characters; which would take 1024 bytes. See the docs on InnoDB limitations: https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html
In MySQL >= 5.7 & MariaDB >= 10.2 this limit has been bumped to 3076 bytes by the changing of the default value of the `innodb_large_prefix` configuration property (introduced in MySQL 5.5) to true; which is what bumps up the limit. In order to manually set that property to true on earlier versions, `innodb_file_format` must be set to `BARRACUDA` and `row_format` must be `DYNAMIC` or `COMPRESSED`. See http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-avoid-error-1071/ for more information.
This change fixes the issue by changing the default string length to 191 (total of 764 bytes, within the older size limit) when the MySQL database config is detected to be using the utf8mb4 charset.
Supports absolute redirects being used in the FormController behaviour.
If the form_config.yaml specifies
```twig
create:
redirect: https://api.example.com/oauth/authorize
```
Then the behaviour will now properly redirect the user to the URL provided where previously it would redirect to a url along the lines of `october.example.com/backend/https://api.example.com/oauth/authorize`. Relative backend redirect URLs are unchanged.