Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.6' into 4
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Jul 10, 2020
2 parents 1a47cde + fae61c0 commit 8d6a248
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 99 deletions.
2 changes: 0 additions & 2 deletions .upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,6 @@ skipConfigs:
excludedPaths:
- '*fixtures*'
- '*vendor*'
doctorTasks:
SilverStripe\Dev\Upgrade\UpgradeBootstrap: src/Dev/Upgrade/UpgradeBootstrap.php
warnings:
classes:
'Object':
Expand Down
42 changes: 40 additions & 2 deletions docs/en/04_Changelogs/4.6.0.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# 4.6.0 (Unreleased)
# 4.6.0

## Overview {#overview}

* [MySQL tables are auto-converted from MyISAM to InnoDB](#myisam)
* [Editing files directly in the insert-media modal](#in-modal-editing)
* [MIME Type validation now a core module](#mime-validator)
* [Solr no longer indexes draft/restricted content](#solr-updates)
* [Simplify customisation of ModelAdmin](#modeladmin-customisation)
* [Login forms module ships with installer](#loginforms)

## MySQL tables are auto-converted from MyISAM to InnoDB {#myisam}

Expand Down Expand Up @@ -63,7 +66,7 @@ HTMLEditorField. The "image placement" and "file link" forms that show when inse
HTMLEditorField have been simplified.

This does mean that the order and structure of fields have changed somewhat. If you have customised the forms in the
asset administration area or in the "Insert Media Modal", you should do some regression testing when upgrading to
asset administration area or in the "Insert Media Modal", you should do some regression testing when upgrading to
make sure your customisations still work as expected.

If your project uses the popular [jonom/focuspoint](https://github.com/jonom/silverstripe-focuspoint) community
Expand All @@ -86,6 +89,41 @@ they can be inherited from the parent folder.
Websites with the optional [UserForms](https://github.com/silverstripe/silverstripe-userforms) module installed will
show a "Form submission" icon on files uploaded through a UserForm. UserForm uploaded files without a "Restricted access" icon show a "Form submission, unrestricted access" icon instead.

## Solr no longer indexes draft/restricted content {#solr-updates}

At the time of this release a new version of the popular [silverstripe/fulltextsearch module](https://github.com/silverstripe/silverstripe-fulltextsearch) is also available, introducing more secure defaults. Most notably, draft and restricted content will no longer be indexed by default, due to a `canView()` check being performed against an anonymous user prior to (re)indexing. Restricted content means that it has a permission level of either 'Logged-in users' or 'Only these groups'.

If your project uses this module, after upgrading your website, ensure that you run the `Solr_Reindex` task on your production environment to remove previously indexed content that should no longer be there.

If your website requires draft or restricted content to be indexed, you can opt-out of the new secure defaults on a per-model basis.

This is a great opportunity to make sure that any custom indexes/search controllers in your project are correctly filtering results based on permissions and search visibility, which you can now achieve via a unified method (see `SilverStripe\FullTextSearch\Search\Services\SearchableService::isSearchable()`.)

The [silverstripe/fulltextsearch module readme provides additional information](https://github.com/silverstripe/silverstripe-fulltextsearch).

## Simplify customisation of ModelAdmin {#modeladmin-customisation}

`ModelAdmin::getEditForm()` has been split into smaller more discrete protected methods:
* `getGridField()`
* `getGridFieldConfig()`.

Two matching extension hooks have been added as well:
* `updateGridField()`
* `updateGridFieldConfig()`.

This will make it easier for developers to customise GridFields in their ModelAdmins.

Learn how to [alter the ModelAdmin GridField or Form](/developer_guides/customising_the_admin_interface/modeladmin/#altering-the-modeladmin-gridfield-or-form)

## Login forms module ships with installer {#loginforms}

The `silverstripe/login-forms` module is now part of the default installer. This alters the login form to provide
consistent styling and behaviour that's independent from the specifics in your project. Only new projects will
get the new login form. Older projects can manually require the `silverstripe/login-forms` module to get the new
login form.

View the [Silverstripe Login Forms readme](https://github.com/silverstripe/silverstripe-login-forms) on Github for more details.

<!--- Changes below this line will be automatically regenerated -->

<!--- Changes above this line will be automatically regenerated -->
1 change: 1 addition & 0 deletions src/Dev/DebugView.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ public function renderHeader($httpRequest = null)
->resolveURL('silverstripe/framework:client/styles/debug.css');
$output = '<!DOCTYPE html><html><head><title>' . $url . '</title>';
$output .= '<link rel="stylesheet" type="text/css" href="' . $debugCSS . '" />';
$output .= '<meta name="robots" content="noindex">';
$output .= '</head>';
$output .= '<body>';

Expand Down
94 changes: 0 additions & 94 deletions src/Dev/Upgrade/UpgradeBootstrap.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Forms/GridField/GridFieldDataColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function getColumnContent($gridField, $record, $columnName)
// Allow callbacks
if (is_array($columnInfo) && isset($columnInfo['callback'])) {
$method = $columnInfo['callback'];
$value = $method($record);
$value = $method($record, $columnName, $gridField);

// This supports simple FieldName syntax
} else {
Expand Down
2 changes: 2 additions & 0 deletions src/ORM/Connect/TempDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ public function resetDBSchema(array $extraDataObjects = [])
$this->kill();
$this->build();
$this->rebuildTables($extraDataObjects);

$this->skippedException = null;
}
}
}

0 comments on commit 8d6a248

Please sign in to comment.