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.
Adds the `useRelationCount` property to tell the list controller to use the number of related records for the specified `relation` as the value for that column.
* Fix loosly comparison to strict + argument types and return types for >=7.0
* Change hard-coded strings to ::class,
* Fix unit-tests failures - some relative to 7.0 phpunit env deployment
* Fix exception string + format return types
* Change string representation of new classes in traceLog to ::class
Credit to @arthurkushman
This change will allow settings to be saved even when Exception is thrown in Artisan::call (eg. when putenv() function is disabled).
Fixes#3339. Related: #3280.
Fixes#3332.
FileUpload widget uploads file to the disk specified by default in config/filesystem.php instead of storage.uploads.disk in config/cms.php, if we use System\Models\File following the instruction in here.
Although we can still create another class extending System\Models\File or October\Rain\Database\Attach\File and use it as the model for attachOne/Many relation, System\Models\File seems to be the one that responsible to look at storage.uploads.disk in config/cms.php, because the existing methods are using storage.uploads.*.
Credit to @pikanji
Credit to @alxy
In case a new administrator is created by a non-superuser and no permission is set directly on creation, `permissions` is not initialized correctly. Thus, when the non-superuser tries to acceess `$this->model->permissions` it is not populated with an empty array as expected.
I have actually no clue why it does work for superusers however, as they should certainly experience the same issue, but this is not the case.
Fixes#3315 by moving the manipulation of the filter widget scopes to the controller event method instead of before any part of the controller constructor method is run.
Add `data-input-preset-remove-stop-words="false"` to an element being handled with the input preset JS to disable the removal of stop words from slug generation. Credit to @tim0991.
This enables arbitrary form contexts to be defined to override the default values when using a form with custom contexts. I.e. `$this->update($id, 'mycustomcontext');` will load the form definition from `mycustomcontext[form]` instead of `update[form]`
This aligns better with the relation principal "parent saves child" / "child cannot save parent" and is more conducive to the natural workflow of a coder, ie
// Relation first
$gallery = new Gallery;
$gallery->save();
// Primary model last
$post = new Post;
$post->gallery = $gallery;
$post->save();
Refs https://github.com/octobercms/library/pull/277