- Field Type dropdowns no longer completely hide incompatible field types; now they are visible but disabled.
- Fixed a bug where the “New entry” and “New category” buttons on entry/category index pages weren’t getting translated. (#2164)
- Fixed a bug where the main content area could expand wider than it was supposed to. (#2169)
- Fixed the width of sidebar nav items when the sidebar had fixed positioning.
- Fixed a bug where Color fields were getting saved as
{}
. (#2170) - Fixed a bug where the
searchScore
property wasn’t being set on elements queried with thesearch
param. (#2174)
- Fixed an XSS vulnerability in the Control Panel.
- Fixed a bug where an admin could be coerced into installing or removing a plugin.
- Added the Plugin Store section to the Control Panel (currently in beta; non-commercial plugins only). (#808)
- Installed plugins now have a “Disable” option that temporarily disables them without uninstalling them.
- Uninstalled plugins now have a “Remove” option that completely removes their files from the project.
- Added the concept of “Site Groups”. (#1668)
- Added the Craft License to the web-based setup wizard.
- Added a “Connect the database” screen to the web-based setup wizard, which will show up if a database connection can’t already be established, and Craft determines that it can control the DB connection settings via the
.env
file. - Added the OAuth 2.0 Client library.
.formsubmit
elements can now specify adata-form
attribute, so they no longer need to be nested within the<form>
they’re associated with.- Added the “Default Color” setting to Color fields. (#949)
- Color fields now return a
craft\fields\data\ColorData
object, withhex
,rgb
,red
,green
,blue
,r
,g
,b
, andluma
properties. - Added support for the
text/markdown
MIME type. - Element sources can now specify which sites they are available in, by adding a
sites
key to the source definition. - Added the
beforeSaveSiteGroup
,afterSaveSiteGroup
,beforeDeleteSiteGroup
, andafterDeleteSiteGroup
events tocraft\services\Sites
. - Added the “Interlacing” image transform setting. (#1487)
- Added the
svg()
Twig function, which will sanitize and return SVG XML code. You can pass in the path to an SVG file or raw SVG XML code. - Added an
attr
block to each of the templates in_includes/forms/
, which can be overridden when the templates are embedded, to add custom HTML attributes to the input elements. (#1430) - Added a
tabs
block to the_layouts/cp.html
template that surrounds<nav id="tabs">
, allowing the tab HTML to be overridden by sub-templates. (#2128) - Added
craft\controllers\SitesController::actionSaveGroup()
. - Added
craft\controllers\SitesController::actionDeleteGroup()
. - Added
craft\db\Connection::createFromConfig()
. - Added
craft\errors\ApiException
. - Added
craft\errors\SiteGroupNotFoundException
. - Added
craft\events\SiteGroupEvent
. - Added
craft\fields\data\ColorData
. - Added
craft\image\Raster::getImagineImage()
. ((#1488) - Added
craft\image\Raster::setInterlace()
. - Added
craft\models\Section::getSiteIds()
. - Added
craft\models\Site::groupId
. - Added
craft\models\Site::getGroup()
. - Added
craft\models\SiteGroup
. - Added
craft\models\Update::getHasCritical()
. - Added
craft\models\Update::getHasReleases()
. - Added
craft\models\Update::getLatest()
. - Added
craft\models\Updates
. - Added
craft\records\Site::getGroup()
. - Added
craft\records\SiteGroup
. - Added
craft\services\Api
, available fromCraft::$app->api
. - Added
craft\services\Assets::getThumbPath()
. - Added
craft\services\Config::getDotEnvPath()
. - Added
craft\services\Config::setEnvVar()
. - Added
craft\services\Plugins::disablePlugin()
. - Added
craft\services\Plugins::enablePlugin()
. - Added
craft\services\Plugins::isPluginDisabled()
. - Added
craft\services\Plugins::isPluginEnabled()
. - Added
craft\services\Plugins::isPluginInstalled()
. - Added
craft\services\Sites::getAllGroups()
. - Added
craft\services\Sites::getGroupById()
. - Added
craft\services\Sites::saveGroup()
. - Added
craft\services\Sites::deleteGroupById()
. - Added
craft\services\Sites::deleteGroup()
. - Added
craft\services\Sites::getSitesByGroupId()
. - Added
craft\validators\ColorValidator
. - Added
Craft.ColorInput
(JS class). - Added the
beforeDisablePlugin
,afterDisablePlugin
,beforeEnablePlugin
, andafterEnablePlugin
events tocraft\services\Plugins
.
- The Control Panel has been redesigned for better usability, readability and responsiveness.
- Control Panel templates can now easily add UI elements to the page header, via new
contextMenu
andactionButton
blocks. - Control Panel templates can now have a details pane, via the new
details
block. - The “Delete” button on entry and category edit pages has been moved to the Save button menu.
- The site selection on entry and category edit pages has been moved to the context menu in the page header.
- The icons on date/time inputs now behave like placeholder text; they can be clicked on to focus the input, and they become hidden when the input has a value. (#1730)
- Users’ field layouts can now have multiple tabs. (#892)
- Global sets’ field layouts can now have multiple tabs. (#1196)
- Edit User pages’ Save buttons are now positioned in the page header, like similar pages.
- The Language, Week Start Day, and Debug Toolbar settings have been moved to a new “Preferences” tab on the My Account page.
- Users’ Langauge preference is now visible for single-site installs, and now shows all supported application languages; not just the site language(s). (#847)
- Element indexes now hide any sources that aren’t available for the currently-selected site. (#2021)
- Fields on multi-site installs can now be translated per site group.
- Resource file URLs now have a timestamp appended to them, preventing browsers from loading cached versions when the files change.
craft\services\Elements::parseRefs()
now has a$siteId
argument, which can be set to the site ID that referenced elements should be queried in.craft\web\AssetManager::getPublishedUrl()
now has a$filePath
argument, which can be set to a file path relative to$sourcePath
, which should be appended to the returned URL.- Color inputs have been redesigned so they look the same regardless of whether the browser supports
<input type="color">
, and no longer use a JavaScript color-picker polyfill. (#2059, #2061) - Color inputs can now be left blank.
- CP nav item definitions registered with
craft\web\twig\variables\Cp::EVENT_REGISTER_CP_NAV_ITEMS
can now specify their icon with anicon
key, whether it’s the path to an SVG file, SVG XML code, or a Craft font icon ligature. (Support for theiconSvg
key has been removed.) - Element source definitions can now include
icon
oriconMask
keys, set to either the path to an SVG file, SVG XML code, or a Craft font icon ligature. (Useicon
for colored icons; useiconMask
for masked icons that should change color depending on whether the source is selected.) - Assets fields and the Assets index page now create a queue runner automatically after new assets are uploaded, in case there are any new jobs that were registered as part of the asset save process.
- Craft now uses Sendmail as the default mailer, as Swift Mailer removed support for the PHP mailer in 6.0. (#2149)
- Structure info and relationships are now available on elements during Structure operations. (#2153)
- Craft will now always respond with JSON when an exception occurs for requests that include the
Accept: application/json
header. craft\config\DbConfig
will not parse thedsn
string if it was provided, populating the other config values.craft\services\Plugins::getComposerPluginInfo()
will now return all Composer plugin info, if no handle is specified.craft\services\Updates::getIsCriticalUpdateAvailable()
now has a$check
argument.craft\services\Updates::getTotalAvailableUpdates()
now has a$check
argument.craft\events\LoginFailureEvent
now has a customizablemessage
property that defines the user-facing error message. (#2147)- Updated all Control Panel language translations.
- The
_includes/forms/field.html
template no longer supports adataAttributes
variable. (Use the newattr
block instead.) - Removed
craft\events\RegisterRedactorPluginEvent
. - Removed
craft\events\RegisterRichTextLinkOptionsEvent
. - Removed
craft\fields\data\RichTextData
. - Removed
craft\fields\PositionSelect
. - Removed
craft\fields\RichText
. - Removed
craft\mail\transportadapters\Php
. - Removed
craft\models\AppUpdate
. - Removed
craft\models\AppUpdateRelease
. - Removed
craft\services\Et::checkForUpdates()
. - Removed
craft\services\Et::downloadUpdate()
. - Removed
craft\services\Et::getUpdateFileInfo()
. - Removed
craft\services\Updates::checkForUpdates()
. - Removed
craft\services\Updates::checkPluginChangelogs()
. - Removed
craft\services\Updates::fetchPluginChangelog()
. - Removed
craft\services\Updates::parsePluginChangelog()
. - Removed
craft\services\Updates::addNotesToPluginRelease()
.s - Removed
craft\web\assets\redactor\RedactorAsset
. - Removed
craft\web\assets\richtext\RichTextAsset
. - Removed
lib/colorpicker/
. - Removed
lib/redactor/
. - Removed
Craft.ColorPicker
(JS class). - Removed
Craft.RichTextInput
(JS class). - Removed the
oauthtokens
table.
- Fixed a bug where removing the parent element from an entry or category had no effect. (#2152)
- Fixed a bug where
{id}
tags in element URI formats weren’t getting replaced with the element ID when saving a brand new element. (#2157) - Fixed a bug where it was not possible to reassign a field within a Matrix field to a different field type if its current field type class was missing.
- Added a
cp.layouts.base
template hook to the_layouts/base.html
template.
- Fixed a SQL error that occurred when installing Craft. (#2142)
- Added
craft\elements\Asset::getFilename()
. - Added
craft\helpers\FileHelper::isSvg()
. - Added the
$generateNow
argument tocraft\services\Assets::getAssetUrl()
, which can be set totrue
to generate a transform immediately if it doesn’t exist. (#2103)
- The default
trustedHosts
config setting value is now['any']
, meaning all hosts are trusted. craft\db\Query::one()
andnth()
now returnnull
instead offalse
if there was no result. (#2105)craft\services\Content::getContentRow()
now returnsnull
instead offalse
if there was no result.- Updated Composer to ~1.5.2.
- Updated Stringy to ~3.1.0.
- Updated svg-sanitizer to ~0.7.2.
- Updated Guzzle to ~6.3.0.
- Updated CLI-Prompt to ~1.0.3.
- Updated Twig to ~2.4.4.
- Updated SwiftMailer Extension for Yii 2 to ~2.1.0.
- Fixed a PHP error that occurred when running the
cache/flush-all
command. (#2099) - Fixed a PHP permissions error that might happen on some Craft 2 to Craft 3 upgrades.
- Fixed a bug where ET and changelog requests weren’t factoring in custom Guzzle configs in
config/guzzle.php
. - Fixed a SQL error that could occur when upgrading a Craft 2 site to Craft 3 if there were any deprecation errors originated by a template, but the line number wasn’t known.
- Fixed a PHP error that could occur if there was a logged-in user ID in the PHP session, but the corresponding user didn’t exist in the database. (#2117)
- Fixed a bug where
QueryAbortedException
s weren’t getting caught byResaveElement
jobs. - Fixed a PHP error that occurred when executing an element query with a custom
SELECT
clause. - Fixed the Debug Toolbar’s “C” icon in Firefox.
- Fixed a bug where the selected site was not maintained when switching between global sets. (#2123)
- Fixed a deprecation error when a relation field’s column was included in an element index page.
- Fixed an error that could occur in the Control Panel if the
queue
component was not an instance ofcraft\queue\QueueInterface
.
- Added the
trustedHosts
,secureHeaders
,ipHeaders
, andsecureProtocolHeaders
config settings, which map to theyii\web\Request
properties of the same names. They should be used to fix SSL detection for environments where anX-Forwarded-Proto
HTTP header is used to forward SSL status to the web server. See Trusted Proxies and Headers in Yii’s documentation for an explanation of these properties. - Created an
oauthtokens
database table. - Added the League's OAuth 2 Client as a dependency. (#1481)
- Fixed a bug where updating to beta 31 could cause a fatal database error on PostgreSQL.
- Fixed a bug where Craft was saving entries when attempting to switch the entry type.
- Fixed a segmentation fault that occurred on fresh installs.
- Added the
getAssetThumbUrl
event tocraft\services\Assets
. (#2073) - Added
craft\events\GetAssetThumbUrlEvent
. - Added
craft\services\Plugins::getPluginHandleByClass()
.
- Control Panel JavaScript translations registered with
craft\web\View::registerTranslations()
now get registered viaregisterJs()
, so Ajax-loaded Control Panel content can register new translations to the main page on the fly. craft\helpers\Component::createComponent()
will now throw aMissingComponentException
if the component belongs to a plugin that’s not installed.craft\helpers\FileHelper::removeDirectory()
now usesSymfony\Component\Filesystem::remove()
as a fallback if an error occurred.craft\db\Query::one()
andscalar()
now explicitly addLIMIT 1
to the SQL statement.- It’s now possible to create element indexes with batch actions on non-index pages. (#1479)
- Updated Yii to 2.0.13.
- Updated D3 to 4.11.0.
- Updated Fabric to 1.7.19.
- Updated Inputmask to 3.3.10.
- Updated jQuery to 3.2.1.
- Updated Timepicker to 1.11.12.
- Updated yii2-pjax to 2.0.7.
- Removed the “RSS caches” option from the Clear Caches utility. (RSS feeds are cached using Craft’s data caching now.)
- Removed the
cacheMethod
config setting. To use a different cache method, override thecache
application component fromconfig/app.php
. (#2053) - Removed
craft\config\DbCacheConfig
. - Removed
craft\config\FileCacheConfig
. - Removed
craft\config\MemCacheConfig
. - Removed
craft\services\Cache::getDbCache()
. - Removed
craft\services\Cache::getFileCache()
. - Removed
craft\services\Cache::getMemCache()
. - Removed
craft\services\Plugins::getPluginByClass()
. - Removed
craft\web\View::getTranslations()
. - Removed the
getTranslations()
template function.
- Fixed an issue where
photoSubpath
user setting was missing a default value. (#2095) - Fixed a Composer error that could occur when updating Craft or a plugin from the Control Panel.
- Fixed a PHP error that occurred when loading the French app translation messages.
- Fixed a PHP error that occurred if a reference tag didn’t specify a property name and the element didn’t have a URL. (#2082)
- Fixed a bug where the
install
console command wasn’t validating the password length. - Fixed a bug where the Debug Toolbar was labeling the current user as a guest.
- Fixed a bug where image editor strings were not getting translated.
- Fixed various PHP errors that could occur after uninstalling (but not Composer-removing) a plugin, if any plugin-supplied components (fields, widgets, etc.) were still around. (#1877)
- Fixed a bug where the image editor was re-saving images even if the only thing that changed was the focal point. (#2089)
- Fixed a PHP error that occurred when duplicating an entry in a section that has URLs.
- Added
craft\base\Element::SCENARIO_LIVE
, which should be used when required custom field validation is desired. - Added
craft\base\PluginTrait::$isInstalled
, which will be set totrue
orfalse
depending on whether the plugin is currently installed. - Added
craft\console\Request::getIsLivePreview()
(alwaysfalse
). (#2020) - Added
craft\services\AssetTransforms::getTransformUri()
. - Added
craft\web\Application::ensureResourcePathExists()
. - Added
craft\web\Application::debugBootstrap()
. - The installer now creates a “Common” field group.
- It's now possible to specify subpath for uploaded user photos. (#1575)
- Added the
preserveExifData
config setting,false
by default and requires Imagick. (#2034)
- Explicitly added
craft\base\PluginInterface::getVersion()
. (#2012) - Improved the contrast of focal point icons. (#1452)
- Craft no longer requires you to manually create a pgpass file when using the default database backup and restore commands.
- Renamed
craft\services\Assets::ensureFolderByFullPathAndVolumeId()
tocraft\services\Assets::ensureFolderByFullPathAndVolume()
. - It is now possible for application configs returned by
config/app.php
to override the application class, via a'class'
key.
- Removed
craft\base\Element::validateCustomFields
. - Removed
craft\base\Element::validateCustomFields()
.
- Fixed a bug where Craft was not enforcing current password validation when a user changed their password from a front-end form.
- Fixed a bug where Craft was not performing normal user validation when an invalid profile photo was uploaded from a front-end form.
- Fixed a bug where image transform URLs were getting a backslash on Windows servers. (#2026)
- Fixed a 404 error that occurred when loading the jQuery.payment library in the Control Panel.
- Fixed a bug where Craft’s bootstrap file was not taking into account the
CRAFT_LICENSE_KEY_PATH
PHP constant when doing folder sanity checks. - Fixed a bug where the Password field in the installer wizard wasn’t displaying validation errors.
- Fixed a JavaScript error that occurred after running the Find and Replace utility, preventing the Control Panel from immediately tracking the job’s progress. (#2030)
- Fixed a bug where Craft would consider PDF to be a manipulatable image which is not desired behavior. (#1938)
- Fixed a bug where the self-updater wouldn’t work on environments without a
HOME
orCOMPOSER_HOME
environment variable set. (#2019) - Fixed a PHP error if any of the URL rules weren’t an instance of
craft\web\UrlRule
. (#2042) - Fixed a bug where
craft\helpers\FileHelper::getMimeType()
was returning'text/plain'
for.svg
files that didn’t have an XML declaration. - Fixed an error that occurred if the database credentials were set correctly but no database had been selected yet.
- Fixed a bug where calls to undefined methods within Twig templates were A) not suppressing the UnknownMethodException when Dev Mode was disabled; and B) not showing the appropriate template line when Dev Mode was disabled. (#2066)
- Fixed a bug where custom element query conditions were getting ignored when
{% paginate %}
tags fetched the current page’s elements. (#2051)
- Added the
checkboxGroupField()
macro to_includes/forms.html
. (#1991) - Added the
Craft.DynamicGenerator
JavaScript class, for creating dynamic input generators. - Added
craft\config\DbConfig::updateDsn()
. - Added
craft\console\Request::getIsActionRequest()
(alwaysfalse
). - Added
craft\console\Request::getIsCpRequest()
(alwaysfalse
). - Added
craft\console\Request::getIsSiteRequest()
(alwaysfalse
). - Added a
setup/db-creds
command that collects all the database credentials, tests them, and saves them to the.env
file. - Added a
setup
command that runs through thesetup/security-key
,setup/db-creds
, andinstall
commands. - Brought back the
siteName
config setting. (#2003)
- It is now possible to force an update to be installed, even if Craft thinks that someone else may already be performing an update. (#1990)
options
arrays passed to_includes/forms/checkboxGroup.html
andcheckboxSelect.html
can now contain any of the properties supported bycheckbox.html
(e.g.disabled
). (#1994)options
arrays passed to_includes/forms/radioGroup.html
can now contain any of the properties supported byradio.html
(e.g.disabled
). (#1994)- The
limit
property is no longer required by_includes/forms/elementSelect.html
. - Craft’s required PHP version and extensions are now specified in
composer.json
. - Craft no longer re-saves all localizable elements after a new site is created; entries and Matrix blocks are skipped, and plugins that supply custom element types must now re-save their elements manually as well.
- Fixed a PHP error that could occur if a DeleteStaleTemplateCaches job was improperly configured.
- Fixed a PHP error that occurred after canceling a DB-only update.
- Fixed a bug where all fields were getting marked as translatable on edit pages. (#1996)
- Fixed a PHP error that would occur when calling
craft\services\UserGroups::getGroupByHandle()
. - Fixed a JavaScript error that occurred if an asset select input was initialized without a
criteria
setting. - Fixed a bug where field types, volume types, mail transport types, and widget types weren’t getting listed in alphabetical order.
- Fixed a bug where the queue info in the Control Panel wasn’t refreshing instantly after retrying or canceling a failed job.
- Fixed a bug where a queue job to resave all Matrix blocks after creating a new site would fail. (#2001)
- Fixed a PHP error that occurred when submitting a front-end user profile form with a new user photo. (#2005)
- Console requests no longer validate the DB connection settings up front, so the
setup/security-key
console command can be run even with invalid settings.
- Fixed a PHP error that occurred when saving a new relational field within a Matrix field, if the “Manage relations on a per-site basis” setting was enabled. (#1987)
- Fixed a bug where the
setup/security-key
console command wouldn’t recognize that the.env
file already specified a security key, if it wasn’t defined on the first line of the file.
- Added the
install/plugin
console command, which makes it possible to install plugins from the command line. (#1973) - Added the
setup/security-key
console command, which generates a new security key and stores it in aCRAFT_SECURITY_KEY
variable in the project’s.env
file. - Added support for a
CRAFT_LICENSE_KEY_PATH
PHP constant, which can be used to customize the location of the license key file. (#1015) - Added the “Email” and “URL” field types. (#1981)
- Added
craft\helpers\StringHelper::split()
. - Added
craft\services\Assets::getThumbUrl()
. - Added
craft\services\Path::getAssetThumbsPath()
. - Added
craft\web\View::createTwig()
. - Added
craft\web\View::registerTwigExtension()
, which should be used instead ofcraft\web\View::getTwig()->addExtension()
. - Added a
@root
path alias, which is set to the project root directory (what$craftPath
/CRAFT_BASE_PATH
is set to inindex.php
). - Added the
assets/download-temp-asset
action, for viewing temporary assets that haven’t been placed in their permanent volume yet. - Added the
assets/generate-thumb
action, which generates an asset thumb and redirects to its URL. - The
_includes/forms/field
include template now supports passing adata
variable, set to an object ofdata-x
attribute name/value pairs.
- Renamed the
validationKey
config setting tosecurityKey
. - If the
securityKey
config setting isn’t set, an auto-generated key will now be stored atstorage/security.key
rather thanstorage/runtime/validation.key
. - Plugin translation sources are now configured with
forceTranslations
enabled. - Checkbox and radio groups now have
div.checkbox-group
anddiv.radio-group
container elements. (#1965) - Improved the performance of
craft\services\Images::getSupportImageFormats()
. (#1969) - Improved the performance of
craft\helpers\Image::canManipulateAsImage()
. (#1969) - Queue info requests in the Control Panel no longer extend the user session.
craft\web\View
now manages two separate Twig environments – one for CP templates and another for site templates.- Custom field inputs’
<div class="field">
container elements now have adata-type
attribute set to the field’s class name. (#1965) - Asset thumbnails are now published to the web-accessible
cpresources/
folder, so they can be served by web servers directly rather than going through PHP. (#1982) - Moved the location of cached asset sources, thumbnails, and icons up to
storage/runtime/assets/
. - Renamed
craft\services\Assets::getUrlForAsset()
togetAssetUrl()
, and now it is possible thatnull
will be returned. - Renamed
craft\services\Path::getAssetsTempVolumePath()
togetTempAssetUploadsPath()
. - Renamed
craft\services\Path::getAssetsImageSourcePath()
togetAssetSourcesPath()
.
- Splitting a string on commas via
craft\helpers\ArrayHelper::toArray()
is now deprecated. Usecraft\helpers\StringHelper::split()
instead. - Deprecated the
defaultFilePermissions
,defaultFolderPermissions
,useWriteFileLock
,backupDbOnUpdate
,restoreDbOnUpdateFailure
,activateAccountFailurePath
, andvalidationKey
. (These were removed outright in earlier Craft 3 Beta releases.) - Running Craft without the
securityKey
config setting explicitly set is now deprecated. - Deprecated
craft\services\Security::getValidationKey()
. UseCraft::$app->config->general->securityKey
instead.
- Removed support for “resource URLs”, including the
resources
service (craft\services\Resources
),craft\helpers\UrlHelper::resourceTrigger()
,craft\helpers\UrlHelper::resourceUrl()
, theresourceUrl()
Twig function, theCraft.getResourceUrl()
JS function, theresourceTrigger
config setting. - Removed
craft\base\ApplicationTrait::getResources()
. - Removed
craft\elements\Asset::getHasThumb()
. - Removed
craft\services\AssetTransforms::getResizedAssetServerPath()
. - Removed
craft\services\Path::getAssetsCachePath()
. - Removed
craft\services\Path::getResizedAssetsPath()
. - Removed
craft\services\Path::getTempUploadsPath()
.
- Fixed a SQL error that could occur when using the
relatedTo
element query param. (#1939) - Fixed a bug where the “Parent” field was showing up on Edit Entry pages in Structure sections that were limited to a single level. (#1940)
- Fixed a bug where the “Delete Stale Template Cache” task would fail when saving an existing Single section.
- Fixed a bug where it was not possible to use
:notempty:
with PostgreSQL. - Fixed a bug where the
job
column in thequeue
table wasn’t large enough to store some job data. (#1948) - Fixed a JS error that occurred on CP templates that extended
_layouts/cp
but overrode thebody
block to remove the sidebar, if there were any running/waiting jobs in the queue. (#1950) - Fixed some JS errors due to outdated references to
Craft.runPendingTasks()
. (#1951) - Fixed a bug where the “Translation Method” setting was visible for existing Matrix sub-fields even when there was only one available translation method (e.g. Entries fields). (#1967)
- Fixed a bug where Craft would get confused whether or not it could manipulate SVG files. (#1874)
- Fixed a CSRF validation error that would occur when attempting to re-login via the login modal in the Control Panel. (#1957)
- Fixed a “divide by zero” error when paginating an empty set of elements. (#1970)
- Fixed a bug where the “Host Name”, “Port”, and “Timeout” SMTP mailer type settings weren’t marked as required. (#1976)
- Fixed some weird behavior when saving a Matrix field with validation errors. (#1971)
- Fixed a bug where temporary assets didn’t get URLs.
- Fixed some deprecation errors in the Control Panel. (#1983)
- Fixed a PHP error that occurred when saving an entry or category with a parent entry/category, if there were any validation errors. (#1984)
- Fixed a SQL error that could occur when logging deprecation errors if the line number is unknown. (#1927)
- Fixed a deprecation error that occurred when using a Tags field. (#1932)
- Fixed a PHP error that occurred if a volume type class was missing. (#1934)
- Fixed a PHP error that occurred when saving a new entry in a section with versioning enabled. (#1935)
- Added
craft\elements\Entry::$revisionCreatorId
. - Added
craft\services\EntryRevisions::doesEntryHaveVersions()
.
- Craft now retroactively creates entry versions when saving entries, for entries that didn’t have any version history yet. (#1926)
- Fixed an error that occurred when chaining a custom field method and a normal query method (e.g.
all()
) together on an element query. (#1887) - Fixed a PHP error that occurred when processing a user verification request.
- Fixed a bug where newly-created
div.matrixblock
elements weren’t getting adata-type
attribute like existing blocks had. (#1925) - Fixed a bug where you would get a SQL error if you tried to push a job to the queue using PostgreSQL.
- Fixed a bug that would trigger the browser’s JavaScript debugger if you saved a Matrix field that had collapsed blocks.
- Fixed a bug where
craft\helpers\ChartHelper::getRunChartDataFromQuery()
an SQL query instead of the actual results. - Fixed a bug where
craft\controllers\BaseElementsController::context()
was expecting astring
return, while return could also benull
.
- Craft’s tasks implementation has been replaced with a queue, based on the Yii 2 Queue Extension. (#1910)
- The “Failed” message in the queue HUD in the Control Panel now shows the full error message as alt text. (#855)
- It’s now possible to install Craft from the command line, using the new
install
command. (#1917) - Added the
instance of()
Twig test. - Added
craft\base\FlysystemVolume
, which replacescraft\base\Volume
as the new base class for Flysystem-based volumes. - Added
craft\behaviors\SessionBehavior
, making it possible forconfig/app.php
to customize the basesession
component while retaining Craft’s custom session methods. - Added
craft\controllers\QueueController
. - Added
craft\events\UserEvent
. - Added
craft\queue\BaseJob
, a base class for queue jobs that adds support for descriptions and progress. - Added
craft\queue\Command
, which providesqueue/run
,queue/listen
, andqueue/info
console commands. - Added
craft\queue\InfoAction
. - Added
craft\queue\JobInterface
, an interface for queue jobs that want to support descriptions and progress. - Added
craft\queue\jobs\DeleteStaleTemplateCaches
, replacingcraft\tasks\DeleteStaleTemplateCaches
. - Added
craft\queue\FindAndReplace
, replacingcraft\tasks\FindAndReplace
. - Added
craft\queue\GeneratePendingTransforms
, replacingcraft\tasks\GeneratePendingTransforms
. - Added
craft\queue\LocalizeRelations
, replacingcraft\tasks\LocalizeRelations
. - Added
craft\queue\UpdateElementSlugsAndUris
, replacingcraft\tasks\UpdateElementSlugsAndUris
. - Added
craft\queue\Queue
, a built-in queue driver. - Added
craft\queue\QueueInterface
, an interface for queue drivers that want to support the queue UI in the Control Panel. - Added
craft\services\Composer::getJsonPath()
. - Added
craft\services\Volumes::getVolumeByHandle()
.
- Renamed the
runTasksAutomatically
config setting torunQueueAutomatically
. - Logs that occur during
queue
requests now get saved instorage/logs/queue.log
. - The updater now ensures it can find
composer.json
before putting the system in Maintenance Mode, reducing the likelihood that Craft will mistakingly think that it’s already mid-update later on. (#1883) - The updater now ensures that the
COMPOSER_HOME
,HOME
(*nix), orAPPDATA
(Windows) environment variable is set before putting the system in Maintenance Mode, reducing the likelihood that Craft will mistakingly think that it’s already mid-update later on. (#1890) craft\mail\Mailer::send()
now processes Twig code in the email message before parsing it as Markdown, if the message was composed viacraft\mail\Mailer::composeFromKey()
. (#1895)craft\mail\Mailer::send()
no longer catches exceptions thrown by its parent method, or fires asendMailFailure
event in the event of a send failure. (#1896)- Renamed
craft\helpers\Component::applySettings()
tomergeSettings()
, and it no longer takes the$config
argument by reference, instead returning a new array. - Renamed
craft\web\twig\nodes\GetAttr
toGetAttrNode
. craft\base\Volume
is now only focused on things that every volume would need, regardless of whether it will use Flysystem under the hood.craft\base\VolumeInterface::createFileByStream()
,updateFileByStream()
,deleteFile()
,renameFile()
,copyFile()
,createDir()
,deleteDir()
, andrenameDir()
no longer require their implementation methods to return a boolean value.div.matrixblock
elements in the Control Panel now have adata-type
attribute set to the Matrix block type’s handle. (#1915)
- Looping through element queries directly is now deprecated. Use the
all()
function to fetch the query results before looping over them. (#1902)
- Removed
craft\base\Task
. - Removed
craft\base\TaskInterface
. - Removed
craft\base\TaskTrait
. - Removed
craft\controllers\TasksController
. - Removed
craft\controllers\VolumesController::actionLoadVolumeTypeData()
. - Removed
craft\db\TaskQuery
. - Removed
craft\events\MailFailureEvent
. - Removed
craft\events\TaskEvent
. - Removed
craft\events\UserActivateEvent
. Usecraft\events\UserEvent
instead. - Removed
craft\events\UserSuspendEvent
. Usecraft\events\UserEvent
instead. - Removed
craft\events\UserTokenEvent
. Usecraft\events\UserEvent
instead. - Removed
craft\events\UserUnlockEvent
. Usecraft\events\UserEvent
instead. - Removed
craft\events\UserUnsuspendEvent
. Usecraft\events\UserEvent
instead. - Removed
craft\mail\Mailer::EVENT_SEND_MAIL_FAILURE
. - Removed
craft\records\Task
. - Removed
craft\services\Tasks
. - Removed
craft\tasks\ResaveAllElements
. - Removed
craft\web\Request::getQueryParamsWithoutPath()
. - Removed
craft\web\twig\variables\Tasks
, which provided the deprecatedcraft.tasks
template variable.
- Fixed a migration error that could occur if
composer.json
didn’t have any customrepositories
defined. - Fixed a bug where clicking “Go to Updates” from the Updates widget would take you to a 404, if the available update info wasn’t already cached before loading the Dashboard. (#1882)
- Fixed a SQL error that could occur when querying for users using the
lastLoginDate
param. (#1886) - Fixed a bug where custom field methods on element queries weren’t returning a reference to the element query object. (#1887)
- Fixed a PHP error that could occur if a TypeError or other non-Exception error occurred when running the updater, masking the original error.
- Fixed a bug where
craft\web\Request::getQueryStringWithoutPath()
was including route params in addition to query string params. (#1891) - Fixed a PHP error that occurred if a volume with overridden config settings in
config/volumes.php
was missing its type. (#1899) - Fixed a bug where
craft\helpers\StringHelper::removeRight()
was actually removing the substring if it existed as a prefix, rather than a suffix. (#1900) - Fixed a PHP error that occurred if
config/routes.php
specified any site-specific routes that didn’t target the currently-requested site. - Fixed lots of bugs with the Deprecated panel in the Debug Toolbar.
- Fixed a 404 error for
bootstrap.js
that occurred when the Debug Toolbar was opened. - Fixed some deprecation errors caused by relational and Matrix field inputs.
- Fixed a bug where a plugin would get a PHP error if it tried to get the current site in the middle of a Craft update.
- Fixed a bug where the Migrations utility would display an error message even if the migrations were applied successfully. (#1911)
- Fixed a PHP error that occurred if calling
getMimeType()
on an asset with an extension with an unknown MIME type. (#1919)
- Added the
init
event tocraft\base\Component
, giving plugins a chance to attach custom Behaviors to various Craft components. (#1856) - Added the
init
event tocraft\web\twig\variables\CraftVariable
, giving plugins a chance to attach custom Behaviors and Components to the globalcraft
template variable (replacing the now-deprecateddefineBehaviors
anddefineComponents
events). (#1856)
- Renamed the
afterInit
event oncraft\base\ApplicationTrait
toinit
. (#1856) - During a database backup, Craft will now default to excluding data from
assetindexdata
,assettransformindex
,cache
,sessions
,templatecaches
,templatecachecriteria
, andtemplatecacheelements
tables. - Craft no longer saves new entry versions every time an entry is saved, regardless of how/why it’s being saved. Now they are only created when saving via the
entries/save-entry
action. - Craft is no longer reliant on asset-packagist.org or
fxp/composer-asset-plugin
for installing front-end dependencies. - Updated D3 to 4.10.0.
- Updated selectize.js to 0.12.4.
- Updated XRegExp to 3.2.0.
- The APC cache class will now only use the APCu library. (#1867)
- The
users/save-user
action’s JSON response now has anerrors
key with all the validation errors, if any. (#1860) - Fixed a bug where parse errors in files that got loaded when Craft was determining the current user would not get reported, and redirect the browser to the login page. (#1858)
- Fixed a bug where an
InvalidParamException
was thrown if a front-end login form was submitted without a password. (#1857) - Background tasks’ labels in the Control Panel sidebar now get truncated rather than taking up multiple lines.
- Deprecated the
defineBehaviors
anddefineComponents
variables oncraft\web\twig\variables\CraftVariable
. Use the newinit
event instead. (#1856)
- Removed
craft\config\ApcConfig
.
- Fixed a JavaScript error that would occur when choosing a user whom another (soon-to-be-deleted) user’s content should be transfered to. (#1837)
- Fixed a Twig error that would occur when saving a Matrix field if there were any validation errors.
- Fixed a PHP error that could occur if two Matrix blocks (either in the same Matrix field or across multiple Matrix fields) had sub-fields with identical handles, but different casings.
- Fixed a bug where listeners to the
selectElements
JavaScript event for Categories fields weren’t getting passed the list of new categories. - Fixed a bug where previously-selected categories could become unselectable within a Categories field after they had been replaced. (#1846)
- Fixed a bug where Craft would send an activation email when an admin registered a new user even if the “Send an activation email now?” checkbox was unchecked.
- Fixed a SQL error that would occur when saving a user if no user groups were checked. (#1849)
- Fixed a bug where the background tasks HUD would show duplicate tasks when closed and reopened repeatedly without reloading the page. (#1850)
- Fixed a bug where required relational fields weren’t getting validation errors if they were left blank. (#1851)
- Fixed a SQL error that could occur when using the
{% cache %}
tag on sites with a large number of custom fields. (#1862) - Fixed a bug where variables set with
craft\web\UrlManager::setRouteParams()
weren’t available to the resulting template, unless nestled inside avariables
key. (#1857) - Fixed a Twig error that could occur if a
null
value was passed to the|t
filter. (#1864) - Fixed a PHP error that would occur if a content migration created a new field or renamed an existing field’s handle, and then attempted to reference that field in the same request. (#1865)
- Fixed a bug where the Customize Sources Modal would always select the first asset volume’s source by default if a subfolder had been selected when opening the modal. (#1871)
- Fixed a bug where uploaded Assets would have their width and height set to
null
on upload on multi-site installs. (#1872) - Fixed a bug where cached versions of cloud images would not be saved when indexing for files that weren't already indexed.
- Fixed a JavaScript error that prevented dialog prompts in Assets manager from being displayed correctly.
- Fixed a bug on multi-site installs where relational fields wouldn’t save related elements that were disabled (either globally for a specific site site). (#1854)
- Added support for asset reference tags that explicitly target an image transform (e.g.
{asset:123:transform:thumbnail}
). - Added
craft\elements\Asset::copyWithTransform()
. - Added the
beforeUpdateSlugAndUri
andafterUpdateSlugAndUri
events tocraft\services\Elements::updateElementSlugAndUri()
. (#1828)
- HTMLPurifier no longer removes the following HTML5 elements by default:
<address>
,<hgroup>
,<figure>
,<figcaption>
,<s>
,<var>
,<sub>
,<sup>
,<mark>
,<wbr>
,<ins>
,<del>
. - HTMLPurifier no longer sets missing
alt
attributes to the image filename by default. craft\db\elements\ElementQuery::one()
andnth()
now consistently returnfalse
rather thannull
when no matching element is found.- Editable table fields in the Control Panel can now specify unique
select
column options on a per-cell basis, by setting the cell’s value to an object withoptions
andvalue
keys. - Header cells within editable table fields in the Control Panel can now specify their
<th>
class names. craft\helpers\Localization::normalizeNumber()
now has an optional$localeId
argument.craft\services\Dashboard::deleteWidget()
now triggers thebeforeDeleteWidget
event and callsbeforeDelete()
on the widget at the top of the function.craft\services\Dashboard::saveWidget()
now triggers thebeforeSaveWidget
event and callsbeforeSave()
on the widget at the top of the function.craft\services\Elements::deleteElement()
now triggers thebeforeDeleteElement
event and callsbeforeDelete()
on the element at the top of the function.craft\services\Elements::saveElement()
now triggers thebeforeSaveElement
event and callsbeforeSave()
on the element at the top of the function.craft\services\Elements::deleteFields()
now triggers thebeforeDeleteField
event and callsbeforeDelete()
on the field at the top of the function.craft\services\Elements::saveFields()
now triggers thebeforeSaveField
event and callsbeforeSave()
on the field at the top of the function.craft\services\Elements::deleteTasks()
now triggers thebeforeDeleteTask
event and callsbeforeDelete()
on the task at the top of the function.craft\services\Elements::saveTasks()
now triggers thebeforeSaveTask
event and callsbeforeSave()
on the task at the top of the function.craft\services\Elements::deleteVolumes()
now triggers thebeforeDeleteVolume
event and callsbeforeDelete()
on the volume at the top of the function.craft\services\Elements::saveVolumes()
now triggers thebeforeSaveVolume
event and callsbeforeSave()
on the volume at the top of the function.- Craft no longer logs caught
craft\db\QueryAbortedException
exceptions. (#1827) - Renamed
craft\services\User::updateUserLoginInfo()
tohandleValidLogin()
.
- Fixed an issue where non-admins were not able to download assets using the element action. (#1829)
- Fixed a bug where Assets fields were only enforcing their “Restrict allowed file types?” settings when uploading brand new files.
- Fixed a bug where elements’ custom fields were not getting validated on save if the
fieldLayoutId
had not been set beforehand. - Fixed a bug where transformed images within Rich Text fields would break if the transform handle was identical to a custom field handle. (#1804)
- Fixed a bug where some SVG file dimensions could not be detected.
- Fixed a bug where some field type data could become corrupted in various ways when propagating field values to different sites. (#1833)
- Fixed a bug where the settings for new fields being created within an existing Matrix field would not show the Translation Method setting when they should. (#1834)
- Fixed a PHP error that would occur if a migration failed to be reverted.
- Fixed a PHP error that would occur if the Yii Debug extension was installed at v2.0.9. (#1823)
{note} There are a few breaking changes in this release. See the Beta 20 Update Guide for update instructions.
- Added some “Update” buttons to the Updates utility (for Craft and plugins). If multiple updates are available, an “Update all” button even shows up.
- The Updater has been rewritten to use Composer under the hood, and now requires significantly less (if any) site downtime. (#1790)
- It’s now possible to apply both Craft and plugin migrations at the same time after a manual update. (#1506)
- Migration exceptions are now displayed in the Updater. (#1197)
- Added the
app/migrate
action (replacingupdate/run-pending-migrations
), which runs any new Craft, plugin, and content migrations. - Added the
|duration
Twig filter, which converts aDateInterval
object into a human-readable duration. - Added
craft\controllers\UpdaterController
. - Added
craft\errors\MigrateException
. - Added
craft\errors\MigrationException
. - Added
craft\events\DefineBehaviorsEvent
. - Added
craft\events\DefineComponentsEvent
. - Added
craft\services\Composer
, available viaCraft::$app->composer
orCraft::$app->getComposer()
. - Added
craft\config\GeneralConfig::getBackupOnUpdates()
. - Added
craft\base\Plugin::getHandle()
, as an alias forPlugin::$id
. - Added
craft\base\PluginInterface::getMigrator()
(previously already included incraft\base\Plugin
). - Added
craft\base\PluginTrait::$developerEmail
. When a plugin’s migration fails, the “Send for help” button will link to this email, if set. - Added
craft\helpers\ArrayHelper::firstValue()
. - Added
craft\helpers\ConfigHelper::sizeInBytes()
. - Added
craft\services\Fields::getCompatibleFieldTypes()
. - Added
craft\services\Path::getCompiledClassesPath()
. - Added
craft\services\Updates::getPendingMigrationHandles()
. - Added
craft\services\Updates::runMigrations()
. - Added the
defineBehaviors
event tocraft\web\twig\variables\CraftVariable
, which can be used to register new behaviors on thecraft
template variable. - Added the
defineComponents
event tocraft\web\twig\variables\CraftVariable
, which can be used to register new services on thecraft
template variable. - Added the
beforeRenderTemplate
,afterRenderTemplate
,beforeRenderPageTemplate
, andafterRenderPageTemplate
events tocraft\web\View
. - Added Composer as a dependency.
- Plugin handles must be
kebab-cased
now, rather thancamelCased
. (#1733) - Plugin module IDs are now set to the exact same value as their handles, as handles are already in the correct format now.
- The
maxUploadFileSize
config setting can now be set to a shorthand byte value ending inK
(Kilobytes),M
(Megabytes), orG
(Gigabytes). - The
allowAutoUpdates
config setting applies to plugins too now. - Matrix fields’ nested Field Type settings now take field compatibility into account, like the main Field Type setting. (#1773)
- The DOM PHP extension is now a mandatory requirement.
- The
url
database config setting now supportspostgres://
andpostgresql://
schemes, in addition topgsql://
. (#1774) - Plugin changelogs can now use dots in release date formats (e.g.
2017.05.28
). - Plugin changelogs can now have additional text before the version number in release headings (e.g. the plugin name).
- Plugin changelogs can now contain warnings (e.g.
> {warning} Some warning!
). - Renamed
craft\services\Updates::getIsBreakpointUpdateNeeded()
togetWasCraftBreakpointSkipped()
. - Renamed
craft\services\Updates::getIsSchemaVersionCompatible()
togetIsCraftSchemaVersionCompatible()
. - Added a
$withContent
argument tocraft\services\EntryRevisions::getDraftsByEntryId()
andgetVersionsByEntryId()
(defaults tofalse
). (#1755) - Craft now lists
craftcms/plugin-installer
as a dependency, so projects don’t need to explicitly require it. craft\db\Migration::up()
anddown()
now have a$throwExceptions
argument (defaults tofalse
).craft\db\MigrationManager::up()
,down()
,migrateUp()
, andmigrateDown()
now throw acraft\errors\MigrationException
if a migration fails rather than returningtrue
/false
.- The
app/check-for-updates
action now checks for aincludeDetails
param, which tells it to include the full update details in its response. - It’s no longer possible to run new migrations while Craft is in Maintenance Mode, preventing the possibility of two people running migrations at the same time.
- It’s no longer needed to set the
$fieldLayoutId
property on users, tags, Matrix blocks, entries, or categories when creating them programmatically. (#1756) - Improved the accuracy of deprecation errors.
- Panes within panes in the Control Panel now have special styling.
- Craft now prioritizes Composer’s autoloader over Yii’s for faster class loading.
- Renamed the
categorygroups_i18n
,elements_i18n
, andsections_i18n
tables to*_sites
. (#1791) - Updated php-shellcommand to 1.2.5. (#1788).
- Removed support for manually-installed plugins in a
plugins/
folder. (#1734) - Removed the
restoreOnUpdateFailure
config setting. - Removed the
@plugins
Yii alias. - Removed the
plugins/disable-plugin
action. - Removed the
plugins/enable-plugin
action. - Removed the
blx
global template variable. - Removed the dynamically-compiled
craft\behaviors\ContentTrait
andcraft\behaviors\ElementQueryTrait
traits. - Removed
craft\base\ApplicationTrait::getIsUpdating()
. - Removed
craft\base\Plugin::afterUpdate()
. - Removed
craft\base\Plugin::beforeUpdate()
. - Removed
craft\base\Plugin::defineTemplateComponent()
. Plugins should use the newdefineComponents
ordefineBehaviors
events oncraft\web\twig\variables\CraftVariable
instead. (#1733) - Removed
craft\base\Plugin::update()
. - Removed
craft\behaviors\FieldLayoutTrait
. - Removed
craft\controllers\UpdateController
. - Removed
craft\db\NestedSetsQueryTrait
. - Removed
craft\db\NestedSetsTrait
. - Removed
craft\errors\UnpackPackageException
. - Removed
craft\errors\UpdateValidationException
. - Removed
craft\events\UpdateEvent
. - Removed
craft\helpers\App::isComposerInstall()
. - Removed
craft\helpers\App::phpConfigValueInBytes()
. Usecraft\helpers\ConfigHelper::sizeInBytes()
instead. - Removed
craft\helpers\Update
. - Removed
craft\updates\Updater
. - Removed
craft\services\Path::getAppPath()
. - Removed
craft\services\Path::getPluginsPath()
. - Removed
craft\services\Plugins::disablePlugin()
. - Removed
craft\services\Plugins::enablePlugin()
. - Removed
craft\services\Plugins::getConfig()
. - Removed
craft\services\Plugins::getPluginByModuleId()
. - Removed
craft\services\Plugins::isComposerInstall()
. - Removed
craft\services\Plugins::validateConfig()
. - Removed
craft\services\Updates::backupDatabase()
- Removed
craft\services\Updates::backupFiles()
. - Removed
craft\services\Updates::criticalCraftUpdateAvailable()
. - Removed
craft\services\Updates::criticalPluginUpdateAvailable()
. - Removed
craft\services\Updates::getIsManualUpdateRequired()
. - Removed
craft\services\Updates::getPluginsThatNeedDbUpdate()
. - Removed
craft\services\Updates::getUnwritableFolders()
. - Removed
craft\services\Updates::prepareUpdate()
. - Removed
craft\services\Updates::processUpdateDownload()
. - Removed
craft\services\Updates::rollbackUpdate()
. - Removed
craft\services\Updates::updateCleanUp()
. - Removed
craft\services\Updates::updateDatabase()
. - Removed
craft\services\Updates::updateFiles()
. - Removed
craft\services\View::getRenderingTemplate()
. - Removed the
beforeDisablePlugin
,afterDisablePlugin
,beforeEnablePlugin
, andafterEnablePlugin
events fromcraft\services\Plugins
. - Removed the
beforeUpdate
,afterUpdate
, andupdateFailure
events fromcraft\services\Updates
.
- Fixed an exception that occurred when attempting to change an entry’s type from the Edit Entry page. (#1748)
- Fixed a deprecation error on the Edit Entry page. (#1749)
- Fixed a PHP error caused by the default Memcached config. (#1751)
- Fixed a SQL error caused by the default
DbCacheConfig->cacheTableName
setting. - Fixed a bug where a PHP session would be started on every template rendering request whether it was needed or not. (#1765)
- Fixed a bug where you would get a PostgreSQL error when saving large amounts of data in a textual field. (#1768)
- Fixed a bug where you would get a PHP error in
services/Feeds->getFeedItems()
when trying to parse an RSS feed that had no publish date. (#1770) - Fixed a PHP error that occurred when PHP’s
memory_limit
setting was set to something greater thanPHP_INT_MAX
when represented in bytes. (#1771) - Fixed a bug where adding a new site did not update any existing category groups with the new site’s category URI format and template settings.
- Fixed a PHP error that occurred when calling
craft\elements\Asset::getWidth()
if the$transform
argument was anything other than a string. (#1796) - Fixed a bug where the Updates utility would spin indefinitely for users that didn’t have permission to perform updates. (#1719)
- Fixed a SQL error that occurred when editing a non-admin user.
- Fixed a bug where attempting to log in with a user account that doesn’t have a password yet would fail silently.
- Fixed a Twig error that occurred when editing a suspended user.
- Fixed a bug where Matrix blocks were being saved an excessive amount of times when saving the owner element, and potentially resulting in errors when enabling a section for a new site.
- Fixed a bug where
craft\services\Updates::getIsCriticalUpdateAvailable()
wasn’t returningtrue
if a plugin had a critical update available, according to its changelog. - Fixed a bug where the PostgreSQL
upsert
method would only take into account a table’s primary keys instead of the passed in keys when deciding whether to insert or update. (#1814) - Fixed a SQL error that could occur when calling
count()
on an element query. - Fixed a SQL error that could occur when saving an element with a Matrix field on a site using PostgreSQL, if the Matrix field’s handle had been renamed. (#1810)
- Fixed a bug where assets with a transform applied via
setTransform()
were still returning their original dimensions via theirwidth
andheight
properties. (#1817) - Fixed a SQL error that occurred when updating to Craft 3 if there was a
CRAFT_LOCALE
constant defined inindex.php
. (#1798) - Fixed a bug where querying for Matrix blocks by block type handles that didn’t exist would still return results. (#1819)
- Fixed a bug where Matrix fields were showing disabled blocks on the front end. (#1786)
- Fixed a PHP error that occurred when using an earlier version of PHP than 7.0.10. (#1750)
- Fixed a bug where routes created in the Control Panel which included tokens weren’t working. (#1741)
- Fixed a bug where only admin users were allowed to perform some asset actions. (#1821)
- Added the
beforeHandleException
event tocraft\web\ErrorHandler
. (#1738)
- The image editor now loads a higher-resolution image when the image viewport size has increased significantly.
craft\db\Migration::addPrimaryKey()
,addForeignKey()
, andcreateIndex
now automatically generate the key/index name if$name
isnull
.- Removed the deprecated global
user
template variable. (#1744) - Updated Yii to 2.0.12.
- Fixed a bug where entries and categories created from element selection modals weren’t getting a field layout ID assigned to them. (#1725)
- Fixed a 403 error that occurred when a non-Admin attempted to edit a Category on a single-site install. (#1729)
- Fixed a bug where plugin index templates weren’t getting resolved without appending an
/index
to the end of the template path. - Fixed a PHP error that occurred when saving an element with a Number field, if using a locale with a non-US number format. (#1739)
- Fixed a bug where a plugin’s control panel nav item was not having it’s
subnav
rendered within the control panel navigation. - Fixed a bug where
craft\web\View::head()
,beginBody()
, andendBody()
were getting called for non-“page” templates that contained<head>
and/or<body>
tags. (#1742) - Fixed a bug where singles were forgetting their field layouts when their section settings were re-saved. (#1743)
- It’s now possible to assign custom fields to users on Craft Personal and Client editions.
- Added
craft\elements\db\ElementQuery::getCriteria()
. - Added
craft\elements\db\ElementQuery::criteriaAttributes()
.
- The image editor now matches the screen resolution when displaying images.
- The image editor now shows a loading spinner when loading images.
- Improved focal point positioning reliability in the image editor.
- It’s now possible to specify recipient names in the
testToEmailAddress
setting value. (#1711
- Removed
craft\helpers\App::isPhpDevServer()
.
- Fixed a bug where Craft was not removing leading/trailing/double slashes when parsing element URI formats. (#1707)
- Fixed a bug where emails sent from the “Test” button on Settings → Email were not including the settings values being tested.
- Fixed a PHP error that occurred when saving plugin settings without any post data.
- Fixed a regression where the
testToEmailAddress
config setting did not work with an array of email addresses. (#1711 - Fixed PHP errors that occurred if
craft\fields\Matrix::normalizeValue()
orcraft\fields\BaseRelationField::normalizeValue()
were ever called without passing an element. - Fixed a bug where the Quick Post widget was not calling fields’
normalizeValue()
methods. - Fixed a bug where Matrix blocks were not returning the posted field values in Live Preview if they were accessed as an array. (#1710)
- Fixed a bug where it was not possible to set the User Photo Volume on Craft Personal and Client editions. (#1717)
- Fixed a bug where changing a named image transform’s dimensions was not invalidating existing transformed images.
- Fixed an error that occurred when applying an image transform without a weight. (#1713)
- Really fixed a bug where Panes’ sidebar could get a wrong height when scrolling down. (#1364)
- Fixed a bug that broke template loading for template paths with uppercase letters on case-sensitive file systems. (#1706)
- Fixed a deprecation error caused by the Craft Support widget. (#1708)
- Fixed a PHP error that occurred when editing elements if a Checkboxes/Multi-select field was converted to a Dropdown/Radio Buttons field. (#1701)
- Fixed a bug where entry URIs weren’t getting updated after re-saving a section with a new Entry URI Format. (#1705)
- Added
craft\events\getAssetUrlEvent
which plugins can use to modify the URL of an Asset being fetched. - Added the
registerCpTemplateRoots
event tocraft\web\View
, making it possible for non-plugins to register CP template root paths/directories. - Added
craft\events\RegisterTemplateRootsEvent
. - Added
craft\web\View::getCpTemplateRoots()
.
- The Field Layout Designer is now using the default font instead of the Coming Soon font. (#1537)
- Updated Stringy to 3.0.
- Improved focal point tracking in Image editor when dealing with scaled images.
- Fixed a PHP error that occurred when creating a new user.
- Fixed a 403 error that occurred when a non-Admin attempted to edit a Global Set on a single-site install. (#1687)
- Fixed a bug where JS scripts registered from plugin settings pages weren’t getting properly namespaced, so generally didn’t work. (#1691)
- Fixed a bug where some locales were always showing two-digit day/month numbers in formatted dates (e.g.
01/05
). - Fixed a bug where form-submitted date/time values were always being treated as US-formatted dates/times, if the Intl extension wasn’t enabled. (#1495)
- Fixed a bug where it was possible to break UI in Image editor with triggering crop mode twice.
- Added an aspect ratio constraint menu to the Crop tool in the Image Editor.
- Added the
postLogoutRedirect
config setting, making it possible to customize where users should be redirected to after logging out from the front-end. (#1003) - Added the
currentSite
global template variable. - Added the
registerRedactorPlugin
event tocraft\fields\RichText
, which plugins can listen to if they supply any Redactor plugins that may need be registered on the page. - Added
craft\base\FieldInterface::isEmpty()
, which gives field types a chance to determine whether their value should be considered empty for validators. - Added
craft\base\VolumeInterface::createDir()
. - Added
craft\base\VolumeInterface::deleteDir()
. - Added
craft\base\VolumeInterface::renameDir()
. - Added
craft\base\Volume::folderExists()
. - Added
craft\base\Volume::createDir()
. - Added
craft\base\Volume::deleteDir()
. - Added
craft\base\Volume::renameDir()
. - Added
craft\config\GeneralConfig::getPostCpLoginRedirect()
. - Added
craft\config\GeneralConfig::getPostLoginRedirect()
. - Added
craft\config\GeneralConfig::getPostLogoutRedirect()
. - Added
craft\db\Query::getRawSql()
, as a shortcut forcreateCommand()->getRawSql()
. - Added
craft\helpers\DateTimeHelper::timeZoneAbbreviation()
. - Added
craft\helpers\DateTimeHelper::timeZoneOffset()
. - Added
craft\services\Images::getSupportedImageFormats()
. - Added
craft\web\View::getIsRenderingPageTemplate()
. (#1652) - Added
webp
as a web-safe image format. - Added SVG file support for image editor.
- Craft’s
composer.json
no longer specifies server requirements (so the--ignore-platform-reqs
flag is no longer necessary). - Loosened Craft’s dependency requirements to allow build updates without explicitly changing
composer.json
. - Updated Stringy to 2.4.
- Updated Twig to 2.3.
- Updated zend-feed to 2.8.
- Updated D3 to 4.8.
- Updated d3-format to 1.2.
- Updated Velocity to 1.5.
- Updated Fabric to 1.13.
- Plugin classes’ global instances are now registered from
craft\base\Plugin::init()
, soPlugin::getInstance()
can be called as early as plugins’init()
methods, once they’ve calledparent::init()
. (#1641) - Craft now supports reference tags that begin with the fully qualified element class name.
- Rich Text fields no longer parse reference tags that aren’t within a
href
orsrc
attribute when displaying their form input, so the tags don’t get lost when the element is re-saved. (#1643) craft\helpers\ConfigHelper::localizedValue()
now accepts a PHP callable value for$value
.- The following config settings can now be set to a PHP callable, which returns the desired value at runtime:
activateAccountSuccessPath
,invalidUserTokenPath
,loginPath
,logoutPath
,postCpLoginRedirect
,postLoginRedirect
,postLogoutRedirect
,setPasswordPath
, andsetPasswordSuccessPath
. - There’s no more special treatment for volume types that have better support for subfolders.
- Renamed
craft\helpers\Image::isImageManipulatable()
tocanManipulateAsImage()
. - Craft now checks if the current installation can manipulate an image instead of checking against a predefined list. (#1648, #1545)
- The old
Craft\DateTime
methods from Craft 2 no longer cause PHP errors when called from a template. A deprecation error will be logged instead. craft\helpers\FileHelper::clearDirectory()
now supportsfilter
,except
, andonly
options.- Craft now deletes outdated resource files when newer ones are published. (#1670)
- Removed
craft\base\Field::isValueEmpty()
. - Removed
craft\base\FolderVolumeInterface
. - Removed
craft\base\FolderVolume
.
- Fixed some JavaScript errors that could occur when expanding the Debug toolbar from the Control Panel, due to CP JavaScript files getting loaded inside the Debug panel. (#1639)
- Fixed a bug where Craft would sometimes upload an Asset file but fail to create an Asset.
- Fixed a bug where reference tags created automatically by Rich Text fields included the full element class name, rather than the element type’s reference handle. (#1645)
- Fixed an error that displayed in the Control Panel after submitting the Database Backup utility, if “Download backup?” was unchecked, even though the backup may have been created successfully. (#1644)
- Fixed a bug where the Image Editor could have a white background.
- Fixed a bug where non-required Dropdown and Radio Buttons fields were getting validation errors when omitted from a front-end entry form.
- Fixed a bug where required Checkboxes, Dropdown, Multi-select, Radio Buttons, and Rich Text fields were not getting validation errors when submitted without a value.
- Fixed a bug where Assets fields weren’t enforcing their Limit settings during server-side validation.
- Fixed a bug where deleting folders on remote sources would not work in some cases.
- Fixed a bug where renaming a folder would sometimes leave a folder behind.
- Fixed a bug where creating a new Asset would not trigger the
beforeSave()
method for it's fields. (#1623) - Fixed a bug where it was impossible to set validation errors on elements that had no field layouts set. (#1598)
- Fixed a bug where no error message was being displayed on failed uploads. (#1598)
- Fixed a bug where the site image was getting resized to 500px instead of 300px. (#1428)
- Fixed a bug where it was not possible to use the Assets Replace File element action.
- Fixed a bug where Asset resized versions would not be deleted if the extension had been changed during the resize.
- Fixed an error that occurred if a plugin’s Settings model tried calling
Plugin::getInstance()
orCraft::t()
from itsinit()
method. - Fixed an error that occurred if the “Date Created” or “Date Updated” columns were selected to be shown on the Users index.
- Fixed a bug where element indexes weren’t remembering the selected site across page loads. (#1653)
- Fixed a bug where Panes’ sidebar could get a wrong height when scrolling down. (#1364)
- Fixed a PHP error that occurred when attempting to create a new field. (#1683)
- Added support for adding new
join
s to element queries, viacraft\elements\db\ElementQuery::join()
,innerJoin()
,leftJoin()
, andrightJoin()
. - Added
craft\web\Request::getQueryParamsWithoutPath()
.
- SQL fragments generated by the
QueryBuilder
classes are now separated by newlines, making the combined SQL easier to read. - Renamed
craft\elements\db\ElementRelationParamParser::parseRelationParam()
toparse()
, and it no longer accepts a$query
argument.
- Removed
craft\elements\db\ElementRelationParamParser::getIsRelationFieldQuery()
. - Removed
craft\services\Users::getClient()
.
- Fixed a bug where Craft was not enforcing the “Require a password reset on next login” user setting. (#1632)
- Fixed a bug where element queries could return duplicate results when using the
relatedTo
param. (#1635)
- Fixed a bug where Checkboxes and Multi-select fields weren’t saving their values properly, or normalizing their values properly. (#1619)
- Added
craft\web\View::registerScript()
, as a more generic way to register new<script>
tags on the page thanregisterJs()
. (#1617) - Added the
uploadParamName
setting toCraft.ImageUpload
, which specifies the param name that should be used for file uploads. (Default isfiles
.)
- If
craft\web\View::$title
is set, a<title>
tag will now automatically get injected into the page’s<head>
. (#1625) - Craft no longer encodes 4-byte characters (like emojis) present in Rich Text fields and template caches, if using PostgreSQL.
- It’s no longer possible to disable plugins that were installed via Composer, since their classes are auto-loadable via Composer regardless, so the concept of “disabling” them is misleading. (#1626)
- Renamed Rich Text fields’
configFile
setting toredactorConfig
, to avoid ambiguity with the newpurifierConfig
setting.
- Removed support for referring to Redactor’s
source
plugin by its old name,html
, within Redactor JSON configs.
- Fixed a PHP error that occurred when creating new elements with Matrix fields. (#1610)
- Fixed a bug where it was impossible to upload user photos, site icon and site logo.
- Fixed an issue where Rich Text Field Asset modals would ignore the defined Volume order.
- Fixed a SQL error that occurred when saving an entry with a Rich Text field that contained a 4-byte character (like an emoji), if using MySQL. (#1627)
- Fixed an
UnknownPropertyException
that could occur on Rich Text fields after upgrading from Craft 2.
- Added
craft\console\User::getId()
. - Added
craft\controllers\ElementsController::actionGetElementHtml()
- Added
craft\helpers\ArrayHelper::filterByValue()
. - Added
craft\helpers\Console
. - Added
craft\services\Elements::duplicateElement()
. - Added the
|filterByValue
Twig filter. - Added
Craft.selectFullValue()
.
craft\image\Raster::rotate()
now requires a float parameter, instead of an integer.- Rotating images by degree fractions in image editor is now possible only when using Imagick as the image driver.
- Improved the behavior of auto-generated text inputs (like Handle fields).
- The “Target Site” relational field setting has been redesigned as two-step process, for added clarity. (#1499)
- The
beforeSaveGlobalSet
event oncraft\services\Globals
is no longer cancellable. migrate
console actions now support-t
and-p
aliases for--type
and--plugin
options.- Console requests now report if there are any database connection issues. (#1580)
craft\elements\db\ElementQuery::one()
now returns the first cached element if the element query has any results cached on it.craft\base\SavableComponent::settingsAttributes()
now returns all public, non-static properties on any parent classes in addition to the called class, so long as they weren’t defined in an abstract class.craft\controllers\AssetsController::uploadFile()
now also returnsassetId
on a successful upload.- Renamed
craft\base\Element::SCENARIO_SITE_PROPAGATION
toSCENARIO_ESSENTIALS
.
- Removed
craft\base\TaskInterface::getDescription()
. - Removed
craft\db\Connection::DRIVER_MYSQL
. Usecraft\config\DbConfig::DRIVER_MYSQL
instead. - Removed
craft\db\Connection::DRIVER_PGSQL
. Usecraft\config\DbConfig::DRIVER_PGSQL
instead. - Removed
craft\helpers\StringHelper::ensureEndsWith()
. UseensureRight()
instead. - Removed
craft\helpers\StringHelper::ensureStartsWith()
. UseensureLeft()
instead.
- Fixed an issue where renaming the current folder in Assets manager would break the URLs for currently loaded elements. (#1474)
- Fixed an issue where focal point would not be tracked correctly under certain circumstances. (#1305)
- Fixed an issue where image operations were being performed when saving an edited image without anything warranting them. (#1329, #1588)
- Fixed a bug where it was not possible to install plugins manually. (#1572)
- Fixed a bug where tasks’ default descriptions were not showing up in the Control Panel, for tasks that weren’t created with a custom description.
- Fixed a PostgreSQL error that could occur if you were saving a large amount of data into a field that needed to be search indexed. (#1589)
- Fixed a bug where focal point would not be updated when replacing an image with the image editor.
- Fixed a bug that broke the “Resaving all localizable elements” task after creating a new site, if there were any Matrix fields set to manage blocks on a per-site basis.
- Fixed a bug where only the initially-selected field type’s supported translation methods were being taken into account when populating the Translation Method setting options.
- Fixed an error that occurred on the Dashboard if there was a Feed widget without a Limit set. (#1565)
- Fixed a PHP error that could occur after a task failure. (#1567)
- Fixed a bug where the tip of the task info HUD would remain visible after the last task had been manually canceled. (#1566)
- Fixed a PHP error that occurred when saving a new Structure section. (#1573)
- Fixed a PHP error that would occur when creating a new entry without an author from a console controller. (#1581)
- Fixed a SQL error that occurred when attempting to update to 3.0.0-beta.8 or later, on installs using PostgreSQL. (#1586)
- Fixed a bug where newly-created global sets weren’t remembering their field layouts. (#1582)
- Fixed a bug where Craft wasn’t invalidating OPcache after writing new auto-generated classes in
storage/runtime/compiled_classes/
. (#1595) - Fixed incorrectly named Asset permissions. (#1602)
- Fixed a bug where calling
.one()
on a Matrix/relation field within a custom entry title format would not return the first posted matrix block/relation. (#1597) - Fixed a bug where the Recent Entries widget wasn’t displaying any entries for non-admin users on single-site Craft installs. (#1601)
- Fixed a PHP error that would occur if Craft was not installed and you had the
CRAFT_SITE
constant defined in your public index.php file. (#1494) - Fixed a bug where drag-and-drop uploading was not possible for Asset fields. (#1604)
- Fixed a bug where it was not possible to trigger a prompt when uploading an Asset with a conflicting name.
- Fixed a bug where clicking “Save as a new entry” on an Edit Entry page, or “Save as a new category” on an Edit Category page, would only use the current site’s content, discarding the title and any translatable custom field values from other sites. (#1523)
- Added
craft\services\Plugins::getPluginByClass()
.
- Fixed a PHP error that occurred on the Dashboard if there were any Quick Post widgets.
- Fixed a bug where there was no visible “Content” tab in the Field Layout Designer when creating a new global set.
- Fixed a PHP error that occurred when saving a new global set. (#1570)
- Fixed a bug where clicking “Sign out” in the Control Panel would generally result in a 404 error. (#1568)
- Fixed a bug where saving an Assets field without Volumes defined and then trying to use it would result in an exception. (#1423)
- Fixed an issue where deleting an Asset volume would delete all of the physical files of Assets indexed.
- Fixed a bug where Craft could not connect to MySQL databases using the
unixSocket
setting.
- Added support for a
url
DB config setting, which can be set to a DB connection URL as provided by some PaaS solutions. (#1317) - Added
craft\base\FieldInterface::getIsTranslatable()
. - Added
craft\base\FieldInterface::supportedTranslationMethods()
. - Added
craft\base\FolderVolumeInterface::folderExists()
. - Added
craft\base\Plugin::cpNavIconPath()
. - Added
craft\base\PluginInterface::getCpNavItem()
. - Added
craft\config\ApcConfig
. - Added
craft\config\DbCacheConfig
. - Added
craft\config\DbConfig
. - Added
craft\config\FileCacheConfig
. - Added
craft\config\GeneralConfig
. - Added
craft\config\MemCacheConfig
. - Added
craft\controllers\AssetsController::actionDeleteAsset()
. - Added
craft\elements\Asset::$avoidFilenameConflicts
, which determines whether new files’ names should be automatically renamed to avoid conflicts with exiting files. - Added
craft\elements\Asset::$conflictingFilename
, which stores a record of the attempted filename that ended up conflicting with an existing file. - Added
craft\elements\Asset::$newFolderId
, which indicates an asset's new intended folder ID. - Added
craft\elements\Asset::$newLocation
, which indicates an asset's new intended location. If null, it will be constructed from the$newFolderId
and$newFilename
properties. - Added
craft\helpers\App::maxPowerCaptain()
. - Added
craft\helpers\Assets::parseFileLocation()
. - Added
craft\helpers\ConfigHelper
. - Added
craft\helpers\DateTimeHelper::intervalToSeconds()
. - Added
craft\helpers\DateTimeHelper::secondsToInterval()
. - Added
craft\helpers\FileHelper::useFileLocks()
. - Added
craft\helpers\UrlHelper::resourceTrigger()
. - Added
craft\services\Config::getApc()
. - Added
craft\services\Config::getConfigFromFile()
. - Added
craft\services\Config::getDb()
. - Added
craft\services\Config::getDbCache()
. - Added
craft\services\Config::getFileCache()
. - Added
craft\services\Config::getGeneral()
. - Added
craft\services\Config::getMemCache()
. - Added
craft\validators\AssetLocationValidator
. - Added the
beforeHandleFile
event tocraft\elements\Asset
, which fires whenever a new file is getting uploaded, or an existing file is being moved/renamed. - Added
Craft.registerElementEditorClass()
and theCraft.createElementEditor()
factory function, making it possible to set element editor classes specific to an element type. - Added
Craft.BaseElementSelectInput::createElementEditor()
, making it possible for subclasses to customize the settings passed to the element editor. - Element indexes now have a
toolbarFixed
setting, which dictates whether the toolbar should be fixed when scrolling. (#1504) - Element indexes now have
refreshSourcesAction
,updateElementsAction
, andsubmitActionsAction
settings, which define the controller actions that various Ajax requests should be posted to. (#1480) - Added an
onAfterAction()
method toCraft.BaseElementIndex
. (#1534) - Plugins can now define sub-modules via
extra.modules
in theircomposer.json
file. (#1559) - Elements are now “hard-coded” with their field layout IDs, via a new
fieldLayoutId
column in theelements
table and a$fieldLayoutId
property oncraft\base\ElementTrait
. Plugins that provide custom element types should start making sure$fieldLayoutId
is set on their elements before passing them toCraft::$app->elements->saveElement()
.
- Asset file operations have been refactored to work alongside asset element saving.
craft\controllers\AssetsController::actionMoveAsset()
now accepts aforce
param, rather thanuserResponse
.craft\controllers\AssetsController::actionMoveAsset()
now returnsconflict
andsuggestedFilename
keys in the event of a filename conflict, rather thanprompt
craft\controllers\AssetsController::actionMoveFolder()
now acceptsforce
andmerge
params, rather thanuserResponse
.craft\controllers\AssetsController::actionMoveFolder()
now returns aconflict
key in the event of a filename conflict, rather thanprompt
andfoldername
.craft\controllers\AssetsController::actionReplaceFile()
now acceptssourceAssetId
andtargetFilename
params.craft\controllers\AssetsController::actionSaveAsset()
no longer acceptsassetId
anduserResponse
params.craft\controllers\AssetsController::actionSaveAsset()
now returnsconflict
andconflictingAssetId
keys in the event of a filename conflict, rather thanprompt
.craft\elements\Asset
now supports acreate
scenario that should be used when creating a new asset.craft\elements\Asset
now supports afileOperations
scenario that should be used when an existing asset’s file is being moved around.craft\elements\Asset
now supports aindex
scenario scenario that should be used when indexing an asset’s file.craft\elements\Asset
now supports areplace
scenario that should be used when replacing an asset’s file.craft\helpers\Assets::editorImagePath()
was renamed togetImageEditorSource()
.craft\helpers\Assets::fileTransferList()
no longer accepts a$merge
argument.craft\services\Assets::createFolder()
now accepts an$indexExisting
argument that determines whether unindexed folders on the volume should be silently indexed.craft\services\Assets::getNameReplacementInFolder()
now combines the file lists on the volume and the asset index when figuring out a safe replacement filename to use.craft\services\Assets::getNameReplacementInFolder()
now throws anInvalidParamException
if$folderId
is set to an invalid folder ID.craft\services\Assets::moveAsset()
now accepts an instance ofcraft\models\VolumeFolder
instead of a folder ID.craft\services\Assets::moveAsset()
now returns a boolean value.- The
cacheDuration
,cooldownDuration
,defaultTokenDuration
,elevatedSessionDuration
,invalidLoginWindowDuration
,purgePendingUsersDuration
,rememberUsernameDuration
,rememberedUserSessionDuration
,userSessionDuration
, andverificationCodeDuration
config settings can now be set to an integer (number of seconds), string (duration interval), orDateInterval
object. - Plugin config file values in
config/pluginhandle.php
are now merged with database-stored plugin settings, and applied to the plugin’s settings model. (Also removed support for pluginconfig.php
files.) (#1096) craft\services\Config::getConfigSettings()
now only accepts a$category
value ofapc
,db
,dbcache
,filecache
,general
, ormemcache
. (It no longer accepts plugin handles.)- Renamed
craft\base\PluginTrait::$hasSettings
to$hasCpSettings
. - Removed support for automatically determining the values for the
omitScriptNameInUrls
andusePathInfo
config settings. - Removed support for
@web
,@webroot
, and other aliases in volume settings, as they cause more problems than they solve in multi-site Craft installs. - Local volumes’ “File System Path” settings can now begin with
@webroot
, which is an alias for the path to the directory thatindex.php
lives in. craft\base\Element::getFieldLayout()
now returns a field layout based on the$fieldLayoutId
property (if set). It no longer returns the first field layout associated with the static element class.craft\services\Fields::assembleLayoutFromPost()
now sets the ID on the returned field layout if the post data came from a Field Layout Designer for an existing field layout.craft\services\Fields::saveLayout()
is now capable of updating existing field layouts, not just creating new ones. So there’s no longer a need to delete the old field layout and save a brand new one each time something changes.- Field types that don’t support a column in the
content
table are no longer assumed to be untranslatable. If a field type wants to opt out of having a Translation Method setting, it should override its staticsupportedTranslationMethods()
method and return either['none']
or['site']
, depending on whether its values should be propagated across other sites or not.
- Removed the
beforeUploadAsset
event fromcraft\services\Asset
. - Removed
craft\base\ApplicationTrait::validateDbConfigFile()
. - Removed
craft\elements\Asset::$indexInProgress
. - Removed
craft\helpers\DateTimeHelper::timeFormatToSeconds()
. - Removed
craft\services\Assets::renameFile()
. - Removed
craft\services\Assets::saveAsset()
. - Removed
craft\services\Config::allowAutoUpdates()
. - Removed
craft\services\Config::exists()
. Useisset(Craft::$app->config->general->configSetting)
. - Removed
craft\services\Config::get()
. UseCraft::$app->config->general
, et al. - Removed
craft\services\Config::getAllowedFileExtensions()
. UseCraft::$app->config->general->allowedFileExtensions
. - Removed
craft\services\Config::getCacheDuration()
. UseCraft::$app->config->general->cacheDuration
. - Removed
craft\services\Config::getCpLoginPath()
. It’slogin
. - Removed
craft\services\Config::getCpLogoutPath()
. It’slogout
. - Removed
craft\services\Config::getCpSetPasswordPath()
. It’ssetpassword
. - Removed
craft\services\Config::getDbPort()
. UseCraft::$app->config->db->port
. - Removed
craft\services\Config::getDbTablePrefix()
. UseCraft::$app->config->db->tablePrefix
. - Removed
craft\services\Config::getElevatedSessionDuration()
. UseCraft::$app->config->general->elevatedSessionDuration
. - Removed
craft\services\Config::getLocalized()
. UseCraft::$app->config->general->getLoginPath()
, et al. - Removed
craft\services\Config::getLoginPath()
. UseCraft::$app->config->general->getLoginPath()
. - Removed
craft\services\Config::getLogoutPath()
. UseCraft::$app->config->general->getLogoutPath()
. - Removed
craft\services\Config::getOmitScriptNameInUrls()
. UseCraft::$app->config->general->omitScriptNameInUrls
. - Removed
craft\services\Config::getResourceTrigger()
. Usecraft\helpers\UrlHelper::resourceTrigger()
. - Removed
craft\services\Config::getSetPasswordPath()
. UseCraft::$app->config->general->getSetPasswordPath()
. - Removed
craft\services\Config::getUseFileLocks()
. Usecraft\helpers\FileHelper::useFileLocks()
. - Removed
craft\services\Config::getUsePathInfo()
. UseCraft::$app->config->general->usePathInfo
. - Removed
craft\services\Config::getUserSessionDuration()
. UseCraft::$app->config->general->userSessionDuration
. - Removed
craft\services\Config::isExtensionAllowed()
. - Removed
craft\services\Config::maxPowerCaptain()
. Usecraft\helpers\App::maxPowerCaptain()
. - Removed
craft\services\Config::set()
. - Removed
craft\validators\AssetFilenameValidator
. - Removed
Craft.showElementEditor()
.
- Fixed a bug where
Dashboard.js
would not load on case-sensitive file systems. (#1500) - Fixed a bug that would cause a SQL error on some Craft 2.6 to 3 updates.
- Fixed a bug where Craft’s stored field version would not update after saving/deleting a field in a non-global context.
- Fixed a PHP error that occurred when installing Craft, if the user settings had any validation errors.
- Fixed a bug where it was not possible to refresh element sources in element views.
- Fixed an exception that could occur when loading an entry with a stored version that didn’t have a valid entry type ID.
- Fixed a bug where Single entries weren’t getting their URIs or slugs updated when the section settings were re-saved. (#1547)
- Fixed a bug where the
CRAFT_ENVIRONMENT
PHP constant wasn’t working. (#1555) - Fixed a bug where permissions were not checked prior to deleting an Asset via Element Action.
- Fixed a bug where Matrix and relational fields’ values were getting propagated across other sites, even if they were set to manage blocks/relations on a per-site basis. (#1560)
- Fixed a PHP error that occurred on some console requests due to
craft\console\Application::getUser()
not existing. (#1562) - Fixed a bug where newly-created Matrix block type fields’ Instructions settings were limited to 64 characters. (#1543)
- Fixed a bug that could prevent Craft from updating correctly in case of missing files.
- Fixed a PHP error that could occur when saving an element that says it has content, but doesn’t have a field layout.
- Fixed a bug where editing an asset from an Assets field wouldn’t show the correct custom fields, if the element hadn’t been saved yet or was disabled, and the asset hadn’t been placed in its target volume yet due to a dynamic subfolder path setting on the Assets field.
- Fixed a PHP error that could occur when updating Craft if an Assets field didn’t have valid settings.
- Fixed a PHP error that could occur when updating Craft if a Plain Text field didn’t have valid settings.
- Added
craft\services\Assets::getCurrentUserTemporaryUploadFolder()
. - Added
craft\services\Assets::getUserTemporaryUploadFolder()
.
UserException
reports are now styled like other exceptions when Dev Mode is enabled, with the full stack trace shown.- It is no longer possible to create a temporary volume by calling
craft\services\Volumes::getVolumeById()
without passing an ID. - Assets indexes now show a “Temporary uploads” volume that contain any assets uploaded by the current user, which haven’t been moved to a more permanent location yet.
- Craft now stores temporary asset uploads on a per-user basis, rather than per-user/per-Assets field.
- Disabled Matrix blocks are no longer shown in Live Preview. (#13)
- Rich Text fields now remember if their “Available Volumes” or “Available Transforms” settings were saved with no options selected, and disables the corresponding functionalities if so. (#21)
craft\base\Plugin::beforeUpdate()
andafterUpdate()
now get passed a$fromVersion
argument.)craft\console\User::getIdentity()
’s return types are now consistent withcraft\web\User::getIdentity()
.craft\services\Elements::saveElement()
now has a$propagate
argument, which determines whether the element should be saved across all its supported sites (defaults totrue
).- When an element is being saved across multiple sites, each site will now fire the before/after-save events.
- Exceptions that are thrown when running a task are now logged.
- Plugins’ translation categories are now all-lowercase by default, but they can be overridden by setting the
$t9nCategory
plugin property. - The
_includes/forms/checkboxSelect.html
Control Panel template no longer shows an “All” checkbox by default. SetshowAllOption = true
to show it. - The
_includes/forms/checkboxSelect.html
Control Panel template no longer interprets an empty default value to mean the “All” option should be checked. - Updated the craftcms/server-check library to 1.0.11.
- Removed support for chain-setting model properties via magic property setters. Models that wish to support this behavior must supply their own setter methods.
- Removed
craft\base\Model::copy()
. - Removed
craft\fields\Assets::getFolderOptions()
. - Removed
craft\services\Assets::getUserFolder()
.
- Fixed a bug where the
deferPublicRegistrationPassword
config setting was having the opposite effect it was intended for. - Fixed a PHP error that would occur if some, but not all, of the auto-generated classes in
storage/runtime/compiled_classes/
didn’t exist or was out of date. (#1427) - Fixed a bug where exceptions that were thrown during template rendering were being displayed without any styling. (#1454)
- Fixed a bug where the Clear Caches utility was ignoring any cache options registered with the
registerCacheOptions
event. (#1461) - Fixed the styling of Element Editor HUD headers and footers. (#1457)
- Fixed a Slug validation error that would occur when saving an entry with no slug, if the entry type was configured to not show the Title field. (#1456)
- Fixed an exception that occurred when an Assets field’s dynamic upload path could not be resolved. (#1414)
- Fixed a bug where Redactor was losing its custom styling in Live Preview and Element Editor modals. (#1467)
- Fixed a PHP error that occurred when passing anything besides an integer into an element query’s
level()
method. (#1469) - Fixed a bug where the Edit Entry page would always assume an entry had the first available entry type. (#1470)
- Fixed a PHP error that occurred when attempting to rerun a failed task.
- Fixed a bug where Matrix and relational field values weren’t getting propagated to new sites correctly. (#16)
- Fixed a bug where the
CRAFT_SITE
constant wasn’t being respected. (#1472)
- Added a “Cache remote images?” setting to the Asset Indexes utility, which if unchecked will dramatically speed up remote image indexing.
- Added
craft\base\Volume::getFileMetadata()
. - Added
craft\base\Volume::getFileStream()
. - Added
craft\base\VolumeInterface::getFileMetadata()
. - Added
craft\base\VolumeInterface::getFileStream()
. - Added
craft\elements\Asset::getFocalPoint()
. - Added
craft\elements\Asset::getStream()
. - Added
craft\helpers\Image::imageSizeByStream()
. - Added
craft\services\AssetIndexer::extractFolderItemsFromIndexList()
. - Added
craft\services\AssetIndexer::extractSkippedItemsFromIndexList()
. - Added
craft\services\AssetIndexer::getIndexListOnVolume()
. - Added
craft\services\AssetIndexer::getNextIndexEntry()
. - Added
craft\services\AssetIndexer::processIndexForVolume()
. - Added
craft\services\AssetIndexer::storeIndexList()
. - Added
craft\services\AssetIndexer::updateIndexEntry()
. - Added
craft\services\Tasks::rerunTask()
. - Added
craft\web\Response::getContentType()
.
- Asset focal point coordinates are now stored as decimal fractions instead of absolute coordinates.
- Craft now does fuzzy searching on the right side of a keyword by default. (#1420)
- It’s now possible to add columns to an element query’s
select
clause without completely replacing all of the default columns, by calling itsaddSelect()
method. - Users are no longer logged out when verifying a new email address on their own account. (#1421)
- Users no longer get an exception or error message if they click on an invalid/expired email verification link and are already logged in. Instead they’ll be redirected to wherever they would normally be taken immediately after logging in. (#1422)
craft\base\Volume::filesystem()
now accepts a config parameter.craft\base\Volume::getFileList()
now returns the file list array indexed by the file URIs.craft\base\Volume::getMissingFiles()
no longer accepts a list of volume IDs and returns all missing files for that session,craft\base\Volume::indexFile()
now requires an instance ofcraft\base\Volume
(instead ofcraft\base\VolumeInterface
) and a URI path as parameters.craft\base\Volume::indexFile()
now accepts a parameter to indicate whether to cache remote files or not.craft\controllers\TasksController::actionRerunTask()
now returns1
, rather than the Json-encoded task info.craft\services\Assets::findFolders()
now returns the folder list array indexed by folder ids.craft\services\Tasks::rerunTaskById()
now returnstrue
if the task was queued up to be rerun successfully, and will throw an exception if the task isn’t a top-level one.craft\web\Controller::renderTemplate()
now returns ayii\web\Response
object rather than a string.craft\web\User::getReturnUrl()
now returns a URL based on thepostCpLoginRedirect
orpostLoginRedirect
config setting depending on the user’s permissions, if they didn’t have a return URL stored in their session data, and a default URL was not supplied.- Renamed
craft\services\EmailMessages
toSystemMessages
, which is now available to Craft Personal installations. - Renamed
craft\base\ApplicationTrait::$emailMessages
to$systemMessages
. - Renamed
craft\base\ApplicationTrait::getEmailMessages()
togetSystemMessages()
. - Renamed
craft\controllers\EmailMessagesController
toSystemMessagesController
. - Renamed the
emailmessages
DB table tosystemmessages
. - Renamed
craft\models\RebrandEmail
toSystemMessage
, and removed its$language
and$htmlBody
properties. - Renamed
craft\records\EmailMessage
toSystemMessage
. - Renamed
craft\web\assets\emailmessages\EmailMessagesAsset
tocraft\web\assets\systemmessages\SystemMessagesAsset
. - System messages registered with the
craft\services\SystemMessages::EVENT_REGISTER_MESSAGES
event must now either becraft\models\SystemMessage
objects or arrays withkey
,heading
,subject
, andbody
keys. - Rich Text field settings will no longer show the “All” option for the “Available Volumes and “Available Transforms” settings if no volumes or transforms have been defined.
- Removed
craft\elements\db\UserQuery::$withPassword
. - Removed
craft\elements\db\UserQuery::withPassword()
. - Removed
craft\helpers\Header
. - Removed
craft\helpers\Json::sendJsonHeaders()
. - Removed
craft\helpers\Json::setJsonContentTypeHeader()
. - Removed
craft\models\AssetIndexData::$offset
. - Removed
craft\records\AssetIndexData::$offset
. - Removed
craft\services\AssetIndexer::getIndexEntry()
. - Removed
craft\services\AssetIndexer::processIndexForVolume()
. - Removed
craft\services\AssetIndexer::storeIndexEntry()
. - Removed
craft\services\AssetIndexer::updateIndexEntryRecordId()
. - Removed
craft\services\Users::getUserByEmail()
. - Removed
craft\web\Application::returnAjaxError()
. - Removed
craft\web\Application::returnAjaxException()
. - Removed
craft\web\Controller::asJson()
andasXml()
, because the baseyii\web\Controller
class now defines the exact same methods.
- Fixed a bug where it was not possible to update a Asset transform index entry. (#1434)
- Fixed a bug where the Control Panel wouldn’t keep up with task progress after the user chose to rerun a task.
- Fixed a PHP error that could occur if
craft\web\AssetBundle
had been loaded beforecraft\web\View
. - Fixed a bug where new Assets could not be indexed. (#1437)
- Fixed a bug where system email subjects and bodies were just getting the translation keys, e.g.
activate_account_subject
andactivate_account_body
. - Fixed a bug where you would get a SQL error when saving an Assets field that had a selected asset. (#1444)
- Fixed a couple bugs that broke new email verification.
- Fixed an InvalidParamException that was thrown when clicking a user email verification link with an invalid/expired token.
- Fixed a SQL error that could occur when restoring a database backup after a failed update.
- Fixed a bug where the
invalidUserTokenPath
config setting wasn’t being respected. - Fixed a bug where creating/editing an entry with a Rich Text field that had Asset Volumes attached in its settings would create a SQL error on PostgreSQL. (#1438)
- Fixed a bug where template requests were not getting a
Content-Type
header based on the template’s MIME type. (#1424) - Fixed a bug where element pagination would only think there was one page. (#1440)
- Fixed a bug where the
offset
param would doubly reduce the number of elements that could be paginated. (#1425) - Fixed a bug where Composer-installed plugins’ source translations weren’t getting loaded. (#1446)
- Fixed a SQL error that could occur when loading the elements on an element index page if there were any collapsed elements. (#1450)
- Added a “Column Type” advanced setting to Plain Text fields.
- Added a “Column Type” advanced setting to Table fields. (#1381)
- Added
craft\base\ElementInterface::hasUris()
. Elements that can have URIs must add this static method and returntrue
now. - Added
craft\db\Connection::getIsMysql()
. - Added
craft\db\Connection::getIsPgsql()
. - Added
craft\events\GenerateTransformEvent
. - Added
craft\helpers\Component::applySettings()
. - Added
craft\helpers\Db::getMinAllowedValueForNumericColumn()
. - Added
craft\helpers\Db::getMaxAllowedValueForNumericColumn()
. - Added
craft\helpers\Db::isNumericColumnType()
. - Added
craft\helpers\Db::isTextualColumnType()
. - Added
craft\helpers\Db::parseColumnLength()
. - Added
craft\helpers\Db::parseColumnType()
. - Added
craft\validators\ElementUriValidator
. - Added
craft\validators\SlugValidator
.
- The
cacheDuration
config setting can now be set to an integer (number of seconds). - Volumes’ “Base URL” settings can now begin with
@web
, which is an alias for the root URL that Craft is running from. - Local volumes’ “File System Path” settings can now begin with
@webroot
, which is an alias for the path to the directory thatindex.php
lives in. - Volume settings defined in
config/volumes.php
are now passed directly into volume class constructors. - Moved Rich Text fields’ “Clean up HTML?”, “Purify HTML?”, and “Column Type” settings into an “Advanced” section.
- Renamed Plain Text fields’ “Max Length” setting to “Character Limit”.
- Element queries can now be explicitly configured to ignore the element structure tables by setting the
withStructure
param tofalse
. - Required custom field validation rules are now created by the element, so
craft\base\Field::getElementValidationRules()
just returns an empty array now. - Elements now validate that custom field values will fit within their database columns, for fields with textual or numeric column types.
craft\feeds\Feeds::getFeedItems()
no longer explicitly sets the cache duration to thecacheDuration
config setting; it lets the data caching driver decide what the default should be (which is set based on thecacheDuration
config setting… by default).craft\helpers\Db::getTextualColumnStorageCapacity()
now returnsfalse
if the max capacity can’t be determined, rather than throwing an exception.craft\helpers\Db::getTextualColumnStorageCapacity()
now supports passing in full column type definitions, including attributes likeNOT NULL
, etc.craft\helpers\Db::getTextualColumnStorageCapacity()
will now return the max length forstring
andchar
column type definitions.craft\helpers\ElementHelper::findSource()
now adds akeyPath
key to the returned source definition array if the source was nested.craft\helpers\ElementHelper::setUniqueUri()
now behaves consistently whether or not the element’s URI format has a{slug}
token – it will always throw a OperationAbortedException if it can’t find a unique URI.craft\i18n\Formatter::asText
will now format DateTime objects to text.craft\mail\Mailer::send()
now returnsfalse
if the message couldn’t be sent, rather than throwing aSendEmailException
.- Updated the Yii Debug extension to 2.0.8.
- Updated d3.js to 4.6.0.0.
- Updated timepicker to 1.11.10.
- Updated Velocity to 1.4.3.
- Updated Fabric to 1.7.6.
- Updated Codeception to 2.2.9.
- Updated Codeception Verify to 0.3.3.
- Updated Codeception Specify to 0.4.6.
- Updated Flysystem to 1.0.35.
- Updated Yii to 2.0.11.2.
- Removed
craft\errors\SendEmailException
. - Removed
craft\helpers\ElementHelper::setValidSlug()
.
- Fixed a bug where Assets Indexing utility would generate an erroneous request at the end of the operation. (#1373)
- Fixed a JS error that occurred on edit pages with a Color field, unless the
useCompressedJs
config setting was set tofalse
. (#1392) - Fixed a bug where the
cacheDuration
config setting wasn’t getting applied to data caches, so everything was getting cached indefinitely by default. - Fixed a PHP error that occurred when saving a new entry draft, if the entry’s section only had one entry type. (#1390)
- Fixed a bug where entries’ “Title” field would receive two identical validation errors if a brand new entry was immediately saved as a draft, and didn’t have a title yet.
- Fixed a bug where it was not possible to edit categories on anything but the primary site. (#1403)
- Fixed a PHP type error that could occur when editing an entry or category, if its corresponding template was
NULL
in the database, for some reason. - Fixed an exception that occurred when testing email settings, if the settings weren’t correct. (#1405)
- Fixed a bug where new Dashboard widgets would get placed before other widgets after reloading the Dashboard. (#1410)
- Fixed a bug where Assets modal would not work when using dynamic paths. (#1374)
- Fixed a bug that prevented the database from being restored properly in certain circumstances if a 2.x to 3.0 upgrade failed.
- Removed the “Column Type” setting from Rich Text fields for PostgreSQL installs, since PostgreSQL doesn’t have/need a
mediumtext
column type. - Fixed a bug where clicking on the link in a forgot password email would cause a “Invalid Verification Code” error to be thrown. (#1386)
- Fixed a bug where the admin “Copy Password Reset URL” option for a user account would give an error when used.
- Fixed a bug where checking the “Require a password reset on next login” for a user would cause a SQL error when saving that user. (#1411)
- Fixed a bug where custom field validation errors didn’t always include the correct field name.
- Fixed a bug where Craft was throwing an exception when it couldn’t set a valid slug on an element during save, rather than adding a validation error.
- Fixed a bug where saving an element with the title “0” would result in the element’s title getting saved as “-”. (#1383)
- Fixed a bug where the Control Panel layout templates didn’t to a good job handling pages with a title of “0”.
- Fixed a bug where the migration responsible for converting user photos to Assets would fail intermittently.
- Fixed a bug where existing entries were not getting their structure data if their section was converted from a Single/Channel to a Structure. (#1407)
- Fixed a bug where
craft\services\Globals::saveSet()
could returntrue
even if the global set hadn’t been saved successfully. - Fixed a bug where it was possible to save an element without a slug if the Title didn’t contain any alphanumeric characters. (#22)
- Fixed a bug where it was possible to save a Single section with an invalid URI. (#1416)
- Fixed a bug where saving an element with an invalid URI would halfway work. (#1416)
- Added the “Branch Limit” Categories field setting, which replaces the “Limit” setting. (#1388)
- Added the
withStructure
param to element queries (defaults totrue
for entry and category queries). - Added
craft\base\PluginInterface::setSettings()
. - Added
craft\base\FolderVolumeInterface
that should be used by all Volumes supporting discrete folders. - Added
craft\base\FolderVolume
that should be used by all Volumes supporting discrete folders. - Added
craft\elements\db\ElementQueryInterface::withStructure()
. - Added
craft\helpers\App::humanizeClass()
. - Added
craft\helpers\FileHelper::lastModifiedTime()
. - Added
craft\models\FieldLayout::getFieldByHandle()
. - Added
craft\services\Categories::applyBranchLimitToCategories()
. - Added
craft\services\Tasks::getTaskInfo()
. - Added
craft\web\Request::accepts()
. - Added the
$maybeAutoRun
argument tocraft\services\Tasks::queueTask()
. - Added Craft’s required PHP extensions to
composer.json
.
- The Resave Elements task now shows a more humanized version of the element type’s class name in its default descriptions.
- Elements no longer get a default title on save, unless they’re being saved without validation.
craft\fields\BaseRelationField::$allowMultipleSources
is now public.craft\fields\BaseRelationField::$allowLimit
is now public.- Renamed
craft\fields\BaseRelationField::sourceOptions()
togetSourceOptions()
, and now it’s public. - Renamed
craft\fields\BaseRelationField::targetSiteFieldHtml()
togetTargetSiteFieldHtml()
, and now it’s public. - Renamed
craft\fields\BaseRelationField::viewModeFieldHtml()
togetViewModeFieldHtml()
, and now it’s public. - It’s now possible for field types that extend
craft\fields\BaseRelationField
to override the settings template by setting the$settingsTemplate
property. craft\volumes\Local
now extendscraft\base\FolderVolume
instead ofcraft\base\Volume
.- Replaced
craft\services::fillGapsInCategoryIds()
withfillGapsInCategories()
. - Updated Garnish to 0.1.13.
- Removed
craft\base\Element::resolveStructureId()
. - Removed
craft\base\ElementInterface::getStructureId()
. - Removed
craft\base\ElementInterface::setStructureId()
. - Removed
craft\base\Volume::createDir()
. - Removed
craft\base\Volume::deleteDir()
. - Removed
craft\base\Volume::folderExists()
. - Removed
craft\base\Volume::renameDir()
. - Removed
craft\base\VolumeInterface::createDir()
. - Removed
craft\base\VolumeInterface::deleteDir()
. - Removed
craft\base\VolumeInterface::renameDir()
. - Removed the
table.inputs
styles. Usediv.flex
instead.
- Fixed a bug where a plugin’s
init()
method couldn’t access its own settings values. (#1361) - Fixed a PHP type error if you tried to save a Number field’s setting with “Min Value” set to nothing.
- Fixed a bug where it was not possible to rename a file with the Asset "Rename File" action.
- Fixed a PHP error that occurred when uploading a user photo. (#1367)
- Fixed a bug where element titles were not translatable. (#1365)
- Fixed a PHP error that occurred on the Settings → General page if the
timezone
config setting was set. (#1366) - Fixed a bug where some Control Panel message strings were getting translated with the
site
translation category rather thanapp
. - Fixed a bug where pagination URLs would define page numbers using a
pg
query string param if thepageTrigger
config setting was set to'?p'
and thepathParam
config setting was set to something besides'p'
. - Fixed a bug where if a Craft update failed and the attempt to restore the database from a backup failed, the UI would still show that the restore was successful.
- Fixed several migration related bugs that were preventing some Craft 2.6 installs from being able to update to Craft 3.
- Fixed a bug where renaming a folder would remove it’s trailing slash from path.
- Fixed a bug where asset bundles weren’t always getting re-published when a sub-file(s) had been updated. (#1371)
- Fixed a bug where SVG images without a viewbox defined would not be scaled correctly.
- Fixed a bug where Craft would generate warning when trying to index images with no content in them.
- Fixed a bug where the Database Backup utility wouldn’t show an error when the backup failed. (#1372)
- Fixed a bug where saving preexisting Active Record objects was not updating the
dateUpdated
column automatically. - Fixed a bug where required fields on a field layout were not being enforced. (#1380)
- Fixed a bug where required Plain Text fields were not getting a validation error if left blank.
- Fixed a PHP type error that occurred when calling
craft\base\Element::getPrevSibling()
orgetNextSibling()
. - Fixed a bug where Structure-related element methods (e.g.
getParent()
) weren’t working for elements that weren’t queried with thestructureId
param set. (#1375) - Fixed a bug where an exception was thrown when saving an element with a slug that was more than 255 characters long, rather than giving the slug a validation error. (#1389)
- Fixed a bug where the Password input on the Control Panel Login page was getting extra padding on the right side instead of the left side for browsers that preferred a RTL language. (#1391)
- Fixed several issues and unexpected behaviors around the Number field, its default values, min and max settings and required validation.
- Fixed a bug where the element listing wouldn’t get refreshed after running the “Set status” action, if any of the elements couldn’t be enabled due to validation errors.
- Added the new “System Name” general setting, which defines the name that should be visible in the global CP sidebar. (#1338)
- Added
craft\base\ElementInterface::getSearchKeywords()
. - Added
craft\helpers\Db::areColumnTypesCompatible()
. - Added
craft\helpers\Db::getSimplifiedColumnType()
. - Added
craft\services\Security::redactIfSensitive()
.
- The “Set status” batch element action now goes through the normal element save process, rather than directly modifying the DB values, ensuring that the elements validate before enabling them. (#2)
- The “Set status” batch element action now updates elements’ site statuses in addition to their global statuses, when setting the status to Enabled.
- Sensitive global values are now redacted from the logs. (#1328)
- Editable tables now support a
radioMode
checkbox column option, which prevents more than one of the column’s checkboxes from being checked at a time. craft\helpers\Db::getNumericalColumnType()
no longer returns unsigned integer column types for MySQL.- The “Field Type” setting on Edit Field pages no longer shows field type options where there’s no chance the existing field data will map over.
- When an entry type is updated, Craft now re-saves all entries of that type.
- Added a
string
return type declaration tocraft\base\PreviewableFieldInterface::getTableAttributeHtml()
. - Updated Craft Server Check to 1.0.8.
- Removed the
afterSetStatus
event fromcraft\elements\actions\SetStatus
. - Removed
craft\enums\ColumnType
. - Removed
craft\helpers\Logging
. - Removed
craft\models\SiteSettings
. - Removed
craft\web\assets\jcrop\JcropAsset
.
- Fixed a bug where saving a disabled entry or draft without a post/expiry date would default to the currently-set date on the entry/draft, rather than clearing out the field.
- Fixed some asterisk icons.
- Fixed a bug where it was impossible to upload user photo, site logo or site icon. (#1334)
- Fixed a bug where it was possible to select multiple default options for Dropdown and Radio Buttons fields. (#8)
- Fixed a bug where the “Globals” Control Panel nav item would link to a 404 right after deleting the first global set in Settings → Globals. (#9)
- Fixed a bug that occurred when generating transforms for images with focal points/ (#1341)
- Fixed a bug where the utility status was overlapping the submit button in Utilities. (#1342)
- Fixed a bug where
craft\helpers\Db::getNumericalColumnType()
could return a column type that wouldn’t actually fix the$max
argument in PostgreSQL. - Fixed a bug where entry URIs weren’t getting updated after an entry type was updated when the URI format referenced entry type properties. (#15)
- Fixed a bug that broke site administration. (#1332)
- Fixed a PHP error that occurred when saving an entry with a Matrix field on a multi-site install, in some cases.
- Fixed a PHP error that occurred when saving an element with a Date/Time field. (#1332)
- Fixed a Twig syntax error when editing an element with a Color field. (#1354)
- Fixed a bug where fields that implemented
craft\base\PreviewableFieldInterface
were not showing up as options on element indexes. - Fixed task re-running.
- Fixed a bug with transforming SVG files.
- Fixed a bug with transforming images on external sources.
config/app.php
can now be a multi-environment config. (#1344)- Fixed a PHP error that occurred when creating a new tag. (#1345)
- Fixed a bug where relations would be dropped when running the Resave Elements task. (#1360)
- Fixed a PHP error that occurred when executing an element query with the
relatedTo
param set to an element. (#1346) - Fixed a JavaScript error that was preventing Redactor from loading for Rich Text fields, for users with a non-English preferred language. (#1349)
- Fixed a PHP type error that would occur when calling
craft\services\Globals::getSetByHandle()
. (#1351) - Fixed a bug where Plain Text fields weren’t enforcing their Max Length setting, and Number fields weren’t enforcing their Min and Max Value settings. (#1350)
- Fixed a 404 error that would occur when switching sites when editing a global set. (#1355)
- Fixed a bug that broke reference tags for Global Sets, Matrix Blocks and Tags. (#1359)
- Fixed a Twig parse error that occurred when using the deprecated
{% includecss %}
or{% includejs %}
tags as tag pairs. (#1358) - Fixed a bug where Craft was only logging warnings and errors when Dev Mode was enabled.
- Fixed the “x” button’s icon that appears in search inputs, used to clear the search input. (#1356)
- Fixed a bug where you would get a validation error if you tried to purchase Craft with a 100%-off coupon code.
- Fixed a migration error that was preventing Craft 2.6 installs from being able to update to Craft 3. (#1347)
- Craft now logs
craft\db\QueryAbortedException
s. - Element queries will now throw
craft\db\QueryAbortedException
s if any structure params are set, butstructureId
is not set. craft\services\Categories::fillGapsInCategoryIds()
now has a required$structureId
argument.- Added
type
andvalue
to the list of reserved field handles. (#1331) - Console requests now get the CP template mode by default.
- Site requests now resolve plugin template paths as if they were CP requests when rendering with the CP template mode. (#1335)
- Updated Yii to 2.0.11.1.
- Removed support for Memcache (without a d), as it is not compatible with PHP 7. (#1309)
- Fixed a bug where
craft\feeds\Feeds::getFeedItems()
was returningnull
when the results were not already cached, resulting in an “unknown error” on the Dashboard. - Fixed an InvalidConfigException that would get thrown when attempting to edit an entry version with an author that had been deleted.
- Fixed a bug where swapping between entries in a section enabled for multiple sites would cause a PHP type error. (#1310)
- Fixed a bug where the “Save as a draft” entry Save menu option would take you to a 404.
- Fixed a bug where the “Publish draft” entry draft Save menu option would take you to a 404.
- Fixed a bug where the “Delete draft” entry draft Save menu options would take you to a 404.
- Fixed a bug where the “Delete” category button would take you to a 404.
- Fixed a bug where saving a user with no permissions would result in a PHP type error.
- Fixed a bug where removing a user’s admin permissions using PostgreSQL would result in a SQL error.
- Fixed a bug where the “Revert entry to this version” button on entry version pages would result in an “No element exists with the ID 'X'” exception. (#1037)
- Fixed a bug where creating a new user would cause a PHP type error. (#1311)
- Fixed a bug where
src/config/defaults/general.php
was listing'redis'
as a possiblecacheMethod
setting value, but Yii 2 does not have native support for Redis. (#1314) - Fixed a bug where
craft\db\QueryAbortedException
s were not getting caught when callingcraft\db\Query::scalar()
orcolumn()
. - Fixed a bug where expanding a collapsed Structure entry or category on an index page would come up empty. (#1321)
- Fixed some
TypeError
s in controller action responses. (#1316) - Fixed a PHP error that occurred when using the
{% nav %}
tag, or when selecting categories in a Categories field. (#1313) - Fixed a bug where deleting all the selections in a relation field would result in no changes being made to the field on save.
- Fixed a PHP error that occurred when editing a Rich Text field with the “Available Transforms” setting set to
*
. (#1322) - Fixed a PHP error that occurred when editing an image using GD. (#1312)
- Fixed a PHP error that occurred when generating image transforms. (#1323)
- Fixed a bug where Assets fields’ “Sources” settings weren’t working.
- Fixed a bug where disabled entries and categories weren’t showing up in their Control Panel indexes. (#1325)
- Fixed a bug where creating a Number field type on PostgreSQL would result a SQL error.
- Fixed a bug where calling
craft\services\Sections::getEntryTypesByHandle()
would cause a PHP type error. (#1326) - Fixed a bug where plugin updates could be displayed with the wrong date if the system time zone was behind UTC.
- Ported all recent changes from Craft 2, including chart-related things added in Craft 2.6.
- Craft 3 now requires PHP 7.0.0 or later.
- Added an image editor to the Assets index page, with support for cropping, rotating, and flipping images, as well as setting focal points on them, which influences where images should be cropped for image transforms.
- Craft can now be installed via Composer:
composer require craftcms/craft
. - Craft now supports installing plugins via Composer, with the help Craft CMS Composer Installer.
- Craft now checks for plugin info in a composer.json file, rather than plugin.json, for plugins that were manually installed in
plugins/
. (See the Craft CMS Composer Installer readme for details on how the info should be formatted.) - Plugin icons now must be stored at the root of the plugin’s source directory.
- Plugin IDs are now
kebab-case
versions of their handles. - Craft now automatically loads the
vendor/autoload.php
file (if it exists) for plugins that were manually installed. - Added the
bootstrap/
folder alongside thesrc/
folder, with new web.php and console.php bootstrap files. - Added PostgreSQL support, which can be enabled by setting the
driver
setting inconfig/db.php
to'pgsql'
. - Added the
update/run-pending-migrations
controller action, which can be used as a post-deploy hook for deployment services like DeployBot, to get Craft to automatically run any pending migrations, minimizing site downtime. - Added the
backupCommand
config setting, which can be used to override the command Craft executes when creating a database backup. - Added the
restoreCommand
config setting, which can be used to override the command Craft executes when restoring a database backup. - Added the
dsn
DB config setting, which can be used to manually specify the DSN string, ignoring most other DB config settings. - Added the
schema
DB config setting, which can be used to assign the default schema used when connecting to a PostgreSQL database. - Added support for setting Volume config settings in
config/volumes.php
. The file should return an array with keys that match volume handles, and values that are config arrays for the volumes. - It is now possible to override the default Guzzle settings from
config/guzzle.php
. - Added the
view
global Twig variable, which is a reference to the View class that is rendering the template. - Added
craft.matrixBlocks()
, which can be used to query for Matrix blocks. - Added the
SORT_ASC
andSORT_DESC
global Twig variables, which can be used to define query sorting in element queries. - Added the
POS_HEAD
,POS_BEGIN
,POS_END
,POS_READY
, andPOS_LOAD
global Twig variables, which can be used to define the placement of registered scripts. - Added the
className()
global Twig function, which returns the class name of a given object. - Added the
|atom
and|rss
Twig filters, for formatting dates in Atom and RSS date formats, respectively. - Added the
|column
Twig filter, for capturing the key/property values of a series of arrays/objects. - Added the
|index
Twig filter, for indexing an array of arrays/objects by one of their keys/values. - Added the “Utilities” section to the Control Panel, replacing the Tools area of the Settings page.
- Added the Utility API, which enables plugins to provide custom utilities.
- Added the JavaScript method
BaseElementIndex::refreshSources()
. - Added method parameter and return types everywhere possible.
- Added a new
@lib
Yii alias, pointed tovendor/craftcms/cms/lib/
. - Added
Craft::createGuzzleClient()
, which creates a Guzzle client instance with any custom config settings merged in with the site default settings. - Added
craft\base\LocalVolumeInterface
. - Added
craft\base\Utility
. - Added
craft\base\UtilityInterface
. - Added
craft\controllers\UtilitiesController
. - Added
craft\db\pgsql\QueryBuilder
. - Added
craft\db\pgsql\Schema
. - Added
craft\db\TableSchema
. - Added
craft\elements\actions\EditImage
. - Added
craft\errors\InvalidPluginException
. - Added
craft\errors\ShellCommandException
. - Added
craft\events\RegisterAssetFileKindsEvent
. - Added
craft\events\RegisterCacheOptionsEvent
. - Added
craft\events\RegisterComponentTypesEvent
. - Added
craft\events\RegisterCpAlertsEvent
. - Added
craft\events\RegisterCpNavItemsEvent
. - Added
craft\events\RegisterElementDefaultTableAttributesEvent
. - Added
craft\events\RegisterElementHtmlAttributesEvent
. - Added
craft\events\RegisterElementSearchableAttributesEvent
. - Added
craft\events\RegisterElementSortOptionsEvent
. - Added
craft\events\RegisterElementSourcesEvent
. - Added
craft\events\RegisterElementTableAttributesEvent
. - Added
craft\events\RegisterEmailMessagesEvent
. - Added
craft\events\RegisterRichTextLinkOptionsEvent
. - Added
craft\events\RegisterUrlRulesEvent
. - Added
craft\events\RegisterUserActionsEvent
. - Added
craft\events\RegisterUserPermissionsEvent
. - Added
craft\events\ResolveResourcePathEvent
. - Added
craft\events\SetAssetFilenameEvent
. - Added
craft\events\SetElementRouteEvent
. - Added
craft\events\SetElementTableAttributeHtmlEvent
. - Added
craft\helpers\FileHelper
. - Added
craft\helpers\MailerHelper
. - Added
craft\services\Utilities
. - Added
craft\utilities\AssetIndexes
. - Added
craft\utilities\ClearCaches
. - Added
craft\utilities\DbBackup
. - Added
craft\utilities\DeprecationErrors
. - Added
craft\utilities\FindAndReplace
. - Added
craft\utilities\PhpInfo
. - Added
craft\utilities\SearchIndexes
. - Added
craft\utilities\SystemReport
. - Added
craft\utilities\Updates
. - Added
craft\validators\ArrayValidator
. - Added
craft\validators\AssetFilenameValidator
. - Added
craft\validators\UsernameValidator
. - Added
craft\validators\UserPasswordValidator
. - Added
craft\web\AssetBundle
. - Added
craft\web\assets\assetindexes\AssetIndexesAsset
. - Added
craft\web\assets\clearcaches\ClearCachesAsset
. - Added
craft\web\assets\colorpicker\ColorpickerAsset
. - Added
craft\web\assets\craftsupport\CraftSupportAsset
. - Added
craft\web\assets\dashboard\DashboardAsset
. - Added
craft\web\assets\datepickeri18n\DatepickerI18nAsset
. - Added
craft\web\assets\dbbackup\DbBackupAsset
. - Added
craft\web\assets\deprecationerrors\DeprecationErrorsAsset
. - Added
craft\web\assets\editcategory\EditCategoryAsset
. - Added
craft\web\assets\editentry\EditEntryAsset
. - Added
craft\web\assets\edittransform\EditTransformAsset
. - Added
craft\web\assets\edituser\EditUserAsset
. - Added
craft\web\assets\emailmessages\EmailMessagesAsset
. - Added
craft\web\assets\fabric\FabricAsset
. - Added
craft\web\assets\feed\FeedAsset
. - Added
craft\web\assets\fields\FieldsAsset
. - Added
craft\web\assets\fileupload\FileUploadAsset
. - Added
craft\web\assets\findreplace\FindReplaceAsset
. - Added
craft\web\assets\generalsettings\GeneralSettingsAsset
. - Added
craft\web\assets\imageeditor\ImageEditorAsset
. - Added
craft\web\assets\installer\InstallerAsset
. - Added
craft\web\assets\jcrop\JcropAsset
. - Added
craft\web\assets\jqueryui\JqueryUiAsset
. - Added
craft\web\assets\login\LoginAsset
. - Added
craft\web\assets\matrix\MatrixAsset
. - Added
craft\web\assets\matrixsettings\MatrixSettingsAsset
. - Added
craft\web\assets\newusers\NewUsersAsset
. - Added
craft\web\assets\plugins\PluginsAsset
. - Added
craft\web\assets\positionselect\PositionSelectAsset
. - Added
craft\web\assets\quickpost\QuickPostAsset
. - Added
craft\web\assets\qunit\QunitAsset
. - Added
craft\web\assets\recententries\RecentEntriesAsset
. - Added
craft\web\assets\redactor\RedactorAsset
. - Added
craft\web\assets\richtext\RichTextAsset
. - Added
craft\web\assets\routes\RoutesAsset
. - Added
craft\web\assets\searchindexes\SearchIndexesAsset
. - Added
craft\web\assets\sites\SitesAsset
. - Added
craft\web\assets\tablesettings\TableSettingsAsset
. - Added
craft\web\assets\tests\TestsAsset
. - Added
craft\web\assets\updater\UpdaterAsset
. - Added
craft\web\assets\updates\UpdatesAsset
. - Added
craft\web\assets\updateswidget\UpdatesWidgetAsset
. - Added
craft\web\assets\userpermissions\UserPermissionsAsset
. - Added
craft\web\assets\utilities\UtilitiesAsset
. - Added
craft\web\assets\whatsnew\WhatsNewAsset
. - Added
craft\web\assets\xregexp\XregexpAsset
. - Added
craft\base\ApplicationTrait::$env
, which stores the current environment ID, which is set to$_SERVER['SERVER_NAME']
by default and can be overridden with theCRAFT_ENVIRONMENT
PHP constant. - Added
craft\base\Element::$validateCustomFields
, which can be set to true or false to explicitly require/prevent custom field validation. - Added
craft\base\Element::afterDelete()
, which is called after an element is deleted. - Added
craft\base\Element::afterMoveInStructure()
, which is called after an element is moved within a structure. - Added
craft\base\Element::defineDefaultTableAttributes()
. - Added
craft\base\Element::beforeDelete()
, which is called before the element is deleted. - Added
craft\base\Element::defineActions()
. - Added
craft\base\Element::defineSearchableAttributes()
. - Added
craft\base\Element::defineSortOptions()
. - Added
craft\base\Element::defineSources()
. - Added
craft\base\Element::defineTableAttributes()
. - Added
craft\base\Element::getHtmlAttributes()
, which gives elements a chance to define any HTML attributes that should be included when rendering an element node for the Control Panel. - Added
craft\base\Element::getSerializedFieldValues()
. - Added
craft\base\Element::htmlAttributes()
. - Added
craft\base\Element::route()
. - Added
craft\base\Element::tableAttributeHtml()
. - Added
craft\base\ElementInterface::refHandle()
. - Added
craft\base\Field::afterElementDelete()
, which is called by an element after it is deleted. - Added
craft\base\Field::beforeElementDelete()
, which is called by an element before it is deleted. - Added
craft\base\Field::getElementValidationRules()
, which field types can override to return their element-level validation rules. - Added
craft\base\MissingComponentTrait::createFallback()
. - Added
craft\base\Plugin::$changelogUrl
, which replaces$releaseFeedUrl
and should point to a Markdown-formatted changelog. - Added
craft\base\Plugin::$downloadUrl
, which should point to the plugin’s download URL. - Added
craft\base\Plugin::$hasCpSection
, which replaces the statichasCpSection()
method. - Added
craft\controllers\AssetsController::actionImageEditor()
. - Added
craft\controllers\AssetsController::actionEditImage()
. - Added
craft\controllers\AssetsController::actionSaveImage()
. - Added
craft\db\Connection::backupTo()
. - Added
craft\db\mysql\Schema::findIndexes()
. - Added
craft\elements\Asset::$focalPoint
. - Added
craft\elements\Asset::$keepFileOnDelete
, which can be set to true if the corresponding file should not be deleted when deleting the asset. - Added
craft\elements\Asset::$newFilename
, which can be set before saving an asset to rename its file. - Added
craft\helpers\App::craftDownloadUrl()
. - Added
craft\helpers\App::isComposerInstall()
. - Added
craft\helpers\App::majorMinorVersion()
. - Added
craft\helpers\ArrayHelper::rename()
. - Added
craft\helpers\Assets::editorImagePath()
. - Added
craft\helpers\Db::isTypeSupported()
. - Added
craft\helpers\Update::getBasePath()
. - Added
craft\helpers\Update::parseManifestLine()
. - Added
craft\helpers\Assets::getFileKindByExtension()
. - Added
craft\helpers\Assets::getFileKindLabel()
. - Added
craft\helpers\Assets::getFileKinds()
. - Added
craft\image\Raster::flipHorizontally()
. - Added
craft\image\Raster::flipVertically()
. - Added
craft\services\Config::getAllowedFileExtensions()
. - Added
craft\services\Config::getDbPort()
. - Added
craft\services\Config::getUseWriteFileLock()
. - Added
craft\services\Config::isExtensionAllowed()
. - Added
craft\services\Elements::deleteElement()
. - Added
craft\services\Elements::getElementTypesByIds()
. - Added
craft\services\Images::getCanUseImagick()
. - Added
craft\services\Images::getImageMagickApiVersion()
. - Added
craft\services\Path::getImageEditorSourcesPath()
. - Added
craft\services\Plugins::getPluginByModuleId()
. - Added
craft\services\Plugins::getPluginByPackageName()
. - Added
craft\services\Plugins::isComposerInstall()
. - Added
craft\web\AssetManager::getPublishedPath()
. - Added
craft\web\AssetManager::getPublishedUrl()
. - Added
craft\web\Session::addAssetBundleFlash()
. - Added
craft\web\Session::getAssetBundleFlashes()
. - Added
craft\web\UploadedFile::saveAsTempFile()
. - Added the
beforeDelete
,afterDelete
,beforeMoveInStructure
, andafterMoveInStructure
events tocraft\base\Element
. - Added the
beforeElementSave
,afterElementSave
,beforeElementDelete
, andafterElementDelete
events tocraft\base\Field
. - Added the
beforeRestoreBackup
andafterRestoreBackup
events tocraft\db\Connection
. - Added the
registerActions
event tocraft\base\Element
. - Added the
registerAlerts
event tocraft\helpers\Cp
. - Added the
registerFileKinds
event tocraft\helpers\Assets
. - Added the
registerCacheOptions
event tocraft\tools\ClearCaches
. - Added the
registerCpNavItems
event tocraft\web\twig\variables\Cp
. - Added the
registerCpUrlRules
andregisterSiteUrlRules
events tocraft\web\UrlManager
. - Added the
registerDefaultTableAttributes
event tocraft\base\Element
. - Added the
registerElementTypes
event tocraft\services\Elements
. - Added the
registerFieldTypes
event tocraft\services\Fields
. - Added the
registerHtmlAttributes
event tocraft\base\Element
. - Added the
registerLinkOptions
event tocraft\fields\RichText
. - Added the
registerMailerTransportTypes
event tocraft\helpers\MailerHelper
. - Added the
registerMessages
event tocraft\services\EmailMessages
. - Added the
registerPermissions
event tocraft\services\UserPermissions
. - Added the
registerSearchableAttributes
event tocraft\base\Element
. - Added the
registerSortOptions
event tocraft\base\Element
. - Added the
registerSources
event tocraft\base\Element
. - Added the
registerTableAttributes
event tocraft\base\Element
. - Added the
registerUserActions
event tocraft\controllers\UsersController
. - Added the
registerVolumeTypes
event tocraft\services\Volumes
. - Added the
registerWidgetTypes
event tocraft\services\Dashboard
. - Added the
resolveResourcePath
event tocraft\services\Resources
. - Added the
setFilename
event tocraft\helpers\Assets
. - Added the
setRoute
event tocraft\base\Element
. - Added the
setTableAttributeHtml
event tocraft\base\Element
. - Added support for a
.readable
CSS class for views that are primarily textual content. - Added a “Size” setting to Number fields.
- Added
d3FormatLocaleDefinition
,d3TimeFormatLocaleDefinition
,d3Formats
global JS variables. - Added the
xAxis.showAxis
,xAxis.formatter
andyAxis.formatter
settings to the Area chart. - Added
Craft.charts.BaseChart.setSettings()
. - Added
Craft.charts.utils.getNumberFormatter()
. - Added
Craft.charts.utils.getTimeFormatter()
. - Added php-shellcommand.
- Added the ZendFeed library.
- Added the fabric.js JavaScript library.
- Added the d3-format JavaScript library.
- Added the d3-time-format JavaScriptlibrary.
- The bootstrap script now assumes that the
vendor/
folder is 3 levels up from thebootstrap/
directory by default (e.g.vendor/craftcms/cms/bootstrap/
). If that is not the case (most likely because Craft had been symlinked into place), theCRAFT_VENDOR_PATH
PHP constant can be used to correct that. - The default
port
DB config value is now either3306
(if MySQL) or5432
(if PostgreSQL). - The default
tablePrefix
DB config value is now empty. - Renamed the
defaultFilePermissions
config setting todefaultFileMode
, and it is nownull
by default. - Renamed the
defaultFolderPermissions
config setting todefaultDirMode
. - Renamed the
useWriteFileLock
config setting touseFileLocks
. - Renamed the
backupDbOnUpdate
config setting tobackupOnUpdate
. Note that performance should no longer be a major factor when setting this to false, since the backup is no longer generated by PHP. - Renamed the
restoreDbOnUpdateFailure
config setting torestoreOnUpdateFailure
. - File-based data caching now respects the
defaultDirMode
config setting. - Redactor config files must now be valid JSON.
- When a category is deleted, its nested categories are no longer deleted with it.
- Craft Personal and Client editions are now allowed to have custom Volume types (e.g. Amazon S3).
- Renamed the “Get Help” widget to “Craft Support”.
- When editing a field whose type class cannot be found, Craft will now select Plain Text as a fallback and display a validation error on the Field Type setting.
- When editing a volume whose type class cannot be found, Craft will now select Local as a fallback and display a validation error on the Volume Type setting.
- When editing email settings and the previously-selected transport type class cannot be found, Craft will now select PHP Mail as a fallback and display a validation error on the Transport Type setting.
- The Feed widget is now limited to show 5 articles by default.
- Element queries’
status
params must now always be set to valid statuses, or the query won’t return any results. - Craft now relies on command line tools to create database backups (
mysqldump
andpg_dump
). - Test emails now mask the values for any Mailer transport type settings that include “key” or “password” in their setting name.
- The Control Panel page header is now fixed when scrolling down.
- Translatable fields are no longer marked as translatable when editing an element type that isn’t localizable (e.g. user accounts).
- Custom email messages are now stored on o per-language basis rather than per-site basis.
- Element indexes now remember which sources were expanded across multiple requests.
- Element indexes now remember if a nested source was selected across multiple requests.
- Plugin schema versions now default to
'1.0.0'
, and plugins absolutely must increment their schema version if they want any pending migrations to be noticed. - Resource requests no longer serve files within Craft’s or plugins’
resources/
folders. - Renamed the
{% registercss %}
Twig tag to{% css %}
. - Renamed the
{% registerjs %}
Twig tag to{% js %}
. craft\base\Plugin
no longer automatically registers field types in the plugin’sfields/
subfolder.craft\base\Plugin
no longer automatically registers widget types in the plugin’swidgets/
subfolder.craft\base\Plugin
no longer automatically registers volume types in the plugin’svolumes/
subfolder.craft\elements\User
now supports apassword
validation scenario, which only validates the$newPassword
property.craft\elements\User
now supports aregistration
validation scenario, which only validates the$username
,$email
, and$newPassword
properties.- It is no longer possible to change a user’s locked/suspended/pending/archived status when saving the User element normally.
craft\elements\db\MatrixBlockQuery::owner()
andownerSiteId()
now set the$siteId
property when appropriate.- The source keys that are passed into element methods’
$source
arguments now reflect the full path to the source, if it is a nested source (e.g.folder:1/folder:2
). - The
Craft.publishableSections
Javascript array now includes info about each section’s entry types. craft\db\Connection::backup()
now throws an exception if something goes wrong, rather than returningtrue
orfalse
. If no exception is thrown, it worked.craft\db\mysql\Schema::getTableNames()
no longer only returns the table names with the right table prefix.craft\services\Elements::deleteElementById()
no longer accepts an array of element IDs.craft\base\Element::afterSave()
now has an$isNew
argument, which will indicate whether the element is brand new.craft\base\Element::beforeSave()
now has an$isNew
argument, which will indicate whether the element is brand new.craft\base\Field::afterElementSave()
now has an$isNew
argument, which will indicate whether the element is brand new.craft\base\Field::beforeElementSave()
now has an$isNew
argument, which will indicate whether the element is brand new.craft\base\SavableComponent::afterSave()
now has an$isNew
argument, which will indicate whether the element is brand new.craft\base\SavableComponent::beforeSave()
now has an$isNew
argument, which will indicate whether the element is brand new.craft\db\Connection::columnExists()
’s$table
argument can now be acraft\yii\db\TableSchema
object.craft\elements\Asset::getFolder()
now throws ayii\base\InvalidConfigException
if its$folderId
property is set to an invalid folder ID.craft\elements\Asset::getVolume()
now throws ayii\base\InvalidConfigException
if its$volumeId
property is set to an invalid volume ID.craft\elements\Tag::getGroup()
now throws ayii\base\InvalidConfigException
if its$groupId
property is set to an invalid tag group ID.craft\elements\User::getAuthor()
now throws ayii\base\InvalidConfigException
if its$authorId
property is set to an invalid user ID.craft\elements\User::getPhoto()
now throws ayii\base\InvalidConfigException
if its$photoId
property is set to an invalid asset ID.craft\models\FieldLayoutTab::getLayout()
now throws ayii\base\InvalidConfigException
if its$layoutId
property is set to an invalid field layout ID.craft\services\Elements::deleteElementById()
now has$elementType
and$siteId
arguments.craft\services\Element::getElementTypeById()
no longer accepts an array of element IDs. UsegetElementTypesByIds()
instead.craft\services\Path::getAppPath()
now throws an exception if it is called within a Composer install, as there is no “app path”.- The
beforeElementSave
andafterElementSave
events triggered bycraft\base\Element
now have$isNew
properties, which indicate whether the element is brand new. - The
beforeSave
andafterSave
events triggered bycraft\base\Element
now have$isNew
properties, which indicate whether the element is brand new. - The
beforeSave
andafterSave
events triggered bycraft\base\SavableComponent
now have$isNew
properties, which indicate whether the component is brand new. - Renamed literally every Craft class’ namespace from
craft\app\*
tocraft\*
. - Renamed
craft\base\Savable
toSerializable
, and itsgetSavableValue()
method was renamed toserialize()
. - Renamed
craft\et\Et
toEtTransport
. - Renamed
craft\events\DbBackupEvent
toBackupEvent
. - Renamed
craft\events\EntryEvent
toVersionEvent
. - Renamed
craft\events\Event
toCancelableEvent
. - Renamed
craft\helpers\Url
toUrlHelper
. - Renamed
craft\services\Feeds
tocraft\feeds\Feeds
. - Renamed
craft\mail\transportadaptors\BaseTransportAdaptor
tocraft\mail\transportadapters\BaseTransportAdapter
. - Renamed
craft\mail\transportadaptors\Gmail
tocraft\mail\transportadapters\Gmail
. - Renamed
craft\mail\transportadaptors\Php
tocraft\mail\transportadapters\Php
. - Renamed
craft\mail\transportadaptors\Sendmail
tocraft\mail\transportadapters\Sendmail
. - Renamed
craft\mail\transportadaptors\Smtp
tocraft\mail\transportadapters\Smtp
. - Renamed
craft\mail\transportadaptors\TransportAdaptorInterface
tocraft\mail\transportadapters\TransportAdapterInterface
. - Renamed
craft\models\AppNewRelease
toAppUpdateRelease
. - Renamed
craft\models\PluginNewRelease
toUpdateRelease
. - Renamed
Craft::getCookieConfig()
tocookieConfig()
. - Renamed
craft\base\Element::defineAvailableTableAttributes()
totableAttributes()
. - Renamed
craft\base\Element::defineSearchableAttributes()
tosearchableAttributes()
. - Renamed
craft\base\Element::defineSortableAttributes()
tosortOptions()
. - Renamed
craft\base\Element::getAvailableActions()
toactions()
, and the method must return an array now. - Renamed
craft\base\Element::getContentPostLocation()
togetFieldParamNamespace()
. - Renamed
craft\base\Element::getDefaultTableAttributes()
todefaultTableAttributes()
. - Renamed
craft\base\Element::getEagerLoadingMap()
toeagerLoadingMap()
. - Renamed
craft\base\Element::getFieldByHandle()
tofieldByHandle()
. - Renamed
craft\base\Element::getFields()
tofieldLayoutFields()
. - Renamed
craft\base\Element::getIndexHtml()
toindexHtml()
. - Renamed
craft\base\Element::getSources()
tosources()
. - Renamed
craft\base\Element::getStatuses()
tostatuses()
, and the method must return an array now. - Renamed
craft\base\Element::setContentPostLocation()
tosetFieldParamNamespace()
. - Renamed
craft\base\Element::setFieldValuesFromPost()
tosetFieldValuesFromRequest()
, and the method no longer accepts an array of field values. Only call this method as a shortcut forsetFieldParamNamespace()
andsetFieldValues()
, passing in the param namespace the field values should be extracted from on the request body. - Renamed
craft\base\Field::getContentPostLocation()
torequestParamName()
. - Renamed
craft\base\Field::prepareValue()
tonormalizeValue()
. - Renamed
craft\base\Field::prepareValueForDb()
toserializeValue()
. - Renamed
craft\base\Plugin::getSettingsHtml()
tosettingsHtml()
. - Renamed
craft\base\PluginInterface::getVariableDefinition()
todefineTemplateComponent()
. - Renamed
craft\base\Task::getDefaultDescription()
todefaultDescription()
. - Renamed
craft\base\Volume::getAdapter()
toadapter()
. - Renamed
craft\base\Volume::getFilesystem()
tofilesystem()
. - Renamed
craft\base\Volume::getVisibilitySetting()
tovisibility()
. - Renamed
craft\base\WidgetInterface::getMaxColspan()
tomaxColspan()
(now static). - Renamed
craft\base\WidgetInterface::getIconPath()
toiconPath()
(now static). - Renamed
craft\controllers\BaseElementsController::getContext()
tocontext()
. - Renamed
craft\controllers\BaseElementsController::getElementType()
toelementType()
. - Renamed
craft\db\Command::insertOrUpdate()
toupsert()
. - Renamed
craft\db\Migration::insertOrUpdate()
toupsert()
. - Renamed
craft\db\mysql\QueryBuilder::insertOrUpdate()
toupsert()
. - Renamed
craft\elements\User::getAuthData()
toauthData()
- Renamed
craft\fields\BaseOptionsField::getDefaultValue()
todefaultValue()
. - Renamed
craft\fields\BaseOptionsField::getOptionLabel()
tooptionLabel()
. - Renamed
craft\fields\BaseOptionsField::getOptionsSettingsLabel()
tooptionsSettingLabel()
. - Renamed
craft\fields\BaseOptionsField::getTranslatedOptions()
totranslatedOptions()
. - Renamed
craft\fields\BaseRelationField::getAvailableSources()
toavailableSources()
. - Renamed
craft\fields\BaseRelationField::getInputSelectionCriteria()
toinputSelectionCriteria()
. - Renamed
craft\fields\BaseRelationField::getInputSources()
toinputSources()
. - Renamed
craft\fields\BaseRelationField::getInputTemplateVariables()
toinputTemplateVariables()
. - Renamed
craft\fields\BaseRelationField::getSourceOptions()
tosourceOptions()
. - Renamed
craft\fields\BaseRelationField::getSupportedViewModes()
tosupportedViewModes()
, and the method must return an array now. - Renamed
craft\fields\BaseRelationField::getTargetSiteFieldHtml()
totargetSiteFieldHtml()
. - Renamed
craft\fields\BaseRelationField::getTargetSiteId()
totargetSiteId()
. - Renamed
craft\fields\BaseRelationField::getViewMode()
toviewMode()
. - Renamed
craft\fields\BaseRelationField::getViewModeFieldHtml()
toviewModeFieldHtml()
. - Renamed
craft\helpers\App::getEditionName()
toeditionName()
. - Renamed
craft\helpers\App::getEditions()
toeditions()
. - Renamed
craft\helpers\App::getMajorVersion()
tomajorVersion()
. - Renamed
craft\helpers\App::getPhpConfigValueAsBool()
tophpConfigValueAsBool()
. - Renamed
craft\helpers\App::getPhpConfigValueInBytes()
tophpConfigValueInBytes()
. - Renamed
craft\helpers\ArrayHelper::getFirstKey()
tofirstKey()
. - Renamed
craft\helpers\Assets::getFileTransferList()
tofileTransferList()
. - Renamed
craft\helpers\Assets::getPeriodList()
toperiodList()
. - Renamed
craft\helpers\Assets::getTempFilePath()
totempFilePath()
. - Renamed
craft\helpers\Assets::getUrlAppendix()
tourlAppendix()
. - Renamed
craft\helpers\ChartHelper::getCurrencyFormat()
tocurrencyFormat()
. - Renamed
craft\helpers\ChartHelper::getDateRanges()
=>dateRanges() - Renamed
craft\helpers\ChartHelper::getDecimalFormat()
=>decimalFormat() - Renamed
craft\helpers\ChartHelper::getFormats()
toformats()
. - Renamed
craft\helpers\ChartHelper::getPercentFormat()
topercentFormat()
. - Renamed
craft\helpers\ChartHelper::getShortDateFormats()
toshortDateFormats()
. - Renamed
craft\helpers\Cp::getAlerts()
toalerts()
. - Renamed
craft\helpers\ElementHelper::getEditableSiteIdsForElement()
toeditableSiteIdsForElement()
. - Renamed
craft\helpers\ElementHelper::getSupportedSitesForElement()
tosupportedSitesForElement()
. - Renamed
craft\helpers\Image::getImageSize()
toimageSize()
. - Renamed
craft\helpers\Image::getPngImageInfo()
topngImageInfo()
. - Renamed
craft\helpers\Image::getWebSafeFormats()
towebSafeFormats()
. - Renamed
craft\helpers\Localization::getLocaleData()
tolocaleData()
. - Renamed
craft\helpers\MailerHelper::getAllMailerTransportTypes()
toallMailerTransportTypes()
. - Renamed
craft\helpers\Search::getMinWordLength()
tominWordLength()
. - Renamed
craft\helpers\Search::getStopWords()
tostopWords()
. - Renamed
craft\helpers\StringHelper::getAsciiCharMap()
toasciiCharMap()
. - Renamed
craft\helpers\StringHelper::getCharAt()
tocharAt()
. - Renamed
craft\helpers\StringHelper::getEncoding()
toencoding()
. - Renamed
craft\helpers\StringHelper::uppercaseFirst()
toupperCaseFirst()
. - Renamed
craft\helpers\Template::getRaw()
toraw()
. - Renamed
craft\helpers\UrlHelper::getActionUrl()
toactionUrl()
. - Renamed
craft\helpers\UrlHelper::getCpUrl()
tocpUrl()
. - Renamed
craft\helpers\UrlHelper::getResourceUrl()
toresourceUrl()
. - Renamed
craft\helpers\UrlHelper::getSiteUrl()
tositeUrl()
. - Renamed
craft\helpers\UrlHelper::getUrl()
tourl()
. - Renamed
craft\helpers\UrlHelper::getUrlWithParams()
tourlWithParams()
. - Renamed
craft\helpers\UrlHelper::getUrlWithProtocol()
tourlWithProtocol()
. - Renamed
craft\helpers\UrlHelper::getUrlWithToken()
tourlWithToken()
. - Renamed
craft\mail\transportadapters\TransportAdapterInterface::getTransportConfig()
todefineTransport()
, and it is now called at runtime when configuring the Mailer app component, rather than only when email settings are saved. - Renamed
craft\models\AssetTransform::getTransformModes()
tomodes()
. - Renamed
craft\services\Assets::renameAsset()
torenameFile()
, and replaced its$newFilename
argument with$runValidation
. - Renamed
craft\services\Config::omitScriptNameInUrls()
togetOmitScriptNameInUrls()
. - Renamed
craft\services\Config::usePathInfo()
togetUsePathInfo()
. - Renamed
craft\services\Resources::getResourcePath()
toresolveResourcePath()
. - Renamed
craft\volumes\AwsS3::getClient()
toclient()
. - Renamed
craft\volumes\AwsS3::getStorageClasses()
tostorageClasses()
. - Renamed
craft\volumes\GoogleCloud::getClient()
toclient()
. - Renamed
craft\volumes\Rackspace::getClient()
toclient()
. - Renamed
craft\web\assets\AppAsset
tocraft\web\assets\cp\CpAsset
. - Renamed
craft\web\assets\D3Asset
tocraft\web\assets\d3\D3Asset
. - Renamed
craft\web\assets\ElementResizeDetectorAsset
tocraft\web\assets\elementresizedetector\ElementResizeDetectorAsset
. - Renamed
craft\web\assets\GarnishAsset
tocraft\web\assets\garnish\GarnishAsset
. - Renamed
craft\web\assets\JqueryPaymentAsset
tocraft\web\assets\jquerypayment\JqueryPaymentAsset
. - Renamed
craft\web\assets\JqueryTouchEventsAsset
tocraft\web\assets\jquerytouchevents\JqueryTouchEventsAsset
. - Renamed
craft\web\assets\PicturefillAsset
tocraft\web\assets\picturefill\PicturefillAsset
. - Renamed
craft\web\assets\SelectizeAsset
tocraft\web\assets\selectize\SelectizeAsset
. - Renamed
craft\web\assets\TimepickerAsset
tocraft\web\assets\timepicker\TimepickerAsset
. - Renamed
craft\web\assets\VelocityAsset
tocraft\web\assets\velocity\VelocityAsset
. - Renamed
craft\web\twig\variables\CraftVariable::getLocale()
back tolocale()
. - Moved
craft\volumes\VolumeInterface::getRootPath()
tocraft\volumes\LocalVolumeInterface::getRootPath()
. craft\base\Element::getEditorHtml()
is no longer static, and no longer has an$element
argument.craft\base\Element::getElementRoute()
is no longer static, no longer has an$element
argument, and has been renamed togetRoute()
.craft\base\Element::getElementQueryStatusCondition()
has been moved tocraft\elements\db\ElementQuery::statusCondition()
, and no longer has a$query
argument.craft\base\Element::getFieldsForElementQuery()
has been moved tocraft\elements\db\ElementQuery::customFields()
, and no longer has a$query
argument.craft\base\Element::getTableAttributeHtml()
is no longer static, and no longer has an$element
argument.craft\base\Element::onAfterMoveElementInStructure()
is no longer static, no longer has an$element
argument, and has been renamed toafterMoveInStructure()
.craft\services\AssetIndexer::getIndexEntry()
now returnsnull
if the index doesn’t exist, instead offalse
.craft\services\Updates::getUnwritableFolders()
now returns folder paths without trailing slashes.craft\web\Session::addJsFlash()
now has$position
and$key
arguments.craft\web\Session::getJsFlashes()
now returns an array of nested arrays, each defining the JS code, the position, and the key.craft\web\View::getTwig()
no longer has$loaderClass
or$options
arguments.- Renamed
craft.getAssets()
back tocraft.assets()
. - Renamed
craft.getCategories()
back tocraft.categories()
. - Renamed
craft.getEntries()
back tocraft.entries()
. - Renamed
craft.getTags()
back tocraft.tags()
. - Renamed
craft.getUsers()
back tocraft.users()
. - Moved
numberFormat
,percentFormat
andcurrencyFormat
fromChartHelper
to theCraft.charts.BaseChart
default settings. - Improved
Craft.charts.BaseChart
andCraft.charts.Area
settings. - Renamed
xAxisGridlines
setting toxAxis.gridlines
andyAxisGridlines
setting toyAxis.gridlines
for the Area chart. - Renamed
axis.y.show
setting toyAxis.showAxis
for the Area chart. - Renamed the
enablePlots
Area chart setting toplots
. - Renamed the
enableTips
Area chart setting totips
. - All Craft and library dependencies that make remote calls use Craft's centralized Guzzle instance.
- Updated Yii to 2.0.10.
- Updated Yii 2 Debug Extension to 2.0.7.
- Updated Yii 2 SwiftMailer to 2.0.6.
- Updated Twig to 2.1.0.
- Updated Guzzle to 6.2.2.
- Updated D3 to 4.5.0.0.
- Updated Imagine to the new
pixelandtonic/imagine
fork at 0.6.3.2. - Updated Garnish to 0.1.12.
- Updated Velocity to 1.4.2.
- Updated element-resize-detector.js to 1.1.10.
- Updated flysystem to 1.0.34.
- Updated qUnit to 2.1.1.
- Updated Redactor to 1.4.
- Craft no longer requires the mcrypt PHP extension.
- Improved the way the height of sidebars is calculated for panes with no tabs
- Moved Utilities nav item to keep Settings as the last item
- The
getTranslations()
global Twig function has been deprecated. Usecraft.app.view.getTranslations()
instead. craft\web\View::registerHiResCss()
has been deprecated. UseregisterCss()
instead, and type your own media selector.
- Removed support for the
CRAFT_FRAMEWORK_PATH
PHP constant in the bootstrap script. It is now expected Yii is located alongside Craft and other dependencies in thevendor/
folder. - Removed support for the
environmentVariables
config setting. Use thesiteUrl
config setting inconfig/general.php
to set the site URL, and override volume settings withconfig/volumes.php
. - Removed support for Yii 1-style controller action paths (e.g.
entries/saveEntry
), which were previously deprecated. Use the Yii 2 style instead (e.g.entries/save-entry
). - Removed the deprecated
activateAccountFailurePath
config setting. - Removed the
appId
config setting. - Removed the
collation
DB config setting. - Removed the
initSQLs
DB config setting. - Removed the
{% registerassetbundle %}
Twig tag. Use{% do view.registerAssetBundle("class\\name") %}
instead. - Removed the
{% registercssfile %}
Twig tag. Use{% do view.registerCssFile("/url/to/file.css") %}
instead. - Removed the
{% registercssresource %}
and{% includecssresource %}
Twig tags. - Removed the
{% registerhirescss %}
Twig tag. Use{% css %}
instead, and type your own media selector. - Removed the
{% registerjsfile %}
Twig tag. Use{% do view.registerJsFile("/url/to/file.js") %}
instead. - Removed the
{% registerjsresource %}
and{% includejsresource %}
Twig tags. - Removed the
{% endpaginate %}
Twig tag as it’s unnecessary. - Removed the
childOf
,childField
,parentOf
, andparentField
element query params. UserelatedTo
instead. - Removed the
depth
element query param. Uselevel
instead. - Removed the
name
tag query param. Usetitle
instead. - Removed support for passing
"name"
into theorderBy
tag query param. Pass"title"
instead. - Removed the PEL library.
- Removed the PclZip library.
- Removed the SimplePie library.
- Removed support for EXIF data removal and automatic image rotating for servers without ImageMagick installed.
- Removed the automatic creation of
@craft/plugins/HANDLE
aliases for installed plugins. - Removed
craft\base\Tool
. - Removed
craft\base\ToolInterface
. - Removed
craft\cache\FileCache
. - Removed
craft\cache\adapters\GuzzleCacheAdapter
. - Removed
craft\controllers\ToolsController
. - Removed
craft\dates\DateTime
. - Removed
craft\dates\DateInterval
. - Removed
craft\db\DbBackup
. - Removed
craft\enums\BaseEnum
. - Removed
craft\errors\DbBackupException
. - Removed
craft\errors\ErrorException
. - Removed
craft\errors\InvalidateCacheException
. - Removed
craft\events\CategoryEvent
. - Removed
craft\events\BackupFailureEvent
. - Removed
craft\events\DeleteUserEvent
. - Removed
craft\events\EntryDeleteEvent
. - Removed
craft\events\RestoreFailureEvent
. - Removed
craft\events\UserEvent
. - Removed
craft\helpers\Io
. - Removed
craft\log\EmailTarget
. - Removed
craft\models\AccountSettings
- Removed
craft\models\Username
. - Removed
craft\io\BaseIO
. - Removed
craft\io\File
. - Removed
craft\io\Folder
. - Removed
craft\io\PclZip
. - Removed
craft\io\Zip
. - Removed
craft\io\ZipArchive
. - Removed
craft\io\ZipInterface
. - Removed
craft\models\LogEntry
. - Removed
craft\models\Password
. - Removed
craft\web\twig\StringTemplate
. - Removed
craft\base\Component::getType()
. It was only really there for objects that implementcraft\base\MissingComponentInterface
, and now they have an$expectedType
property. - Removed
craft\base\ComponentInterface::classHandle()
. - Removed
craft\base\Element::getContentFromPost()
. - Removed
craft\base\Element::getSourceByKey()
. - Removed
craft\base\Element::saveElement()
. - Removed
craft\base\Element::setRawPostValueForField()
. - Removed
craft\base\Field::getElementValue()
. - Removed
craft\base\Field::setElementValue()
. - Removed
craft\base\FieldInterface::validateValue()
. Fields should start implementinggetElementValidationRules()
if they want to customize how their values get validated. - Removed
craft\base\Model::create()
. - Removed
craft\base\Model::getAllErrors()
. - Removed
craft\base\Model::populateModel()
. - Removed
craft\base\Plugin::$releaseFeedUrl
. Plugins that wish to have update notifications should now set$changelogUrl
. - Removed
craft\base\Plugin::getClassesInSubpath()
. - Removed
craft\base\Plugin::getFieldTypes()
. - Removed
craft\base\Plugin::getVolumeTypes()
. - Removed
craft\base\Plugin::getWidgetTypes()
. - Removed
craft\base\PluginInterface::hasCpSection()
. Plugins that have a CP section should set the$hasCpSection
property. - Removed
craft\base\VolumeInterface::isLocal()
. Local volumes should implementcraft\base\LocalVolumeInterface
instead. - Removed
craft\db\Command::addColumnAfter()
. - Removed
craft\db\Command::addColumnBefore()
. - Removed
craft\db\Command::addColumnFirst()
. - Removed
craft\db\Migration::addColumnAfter()
. - Removed
craft\db\Migration::addColumnBefore()
. - Removed
craft\db\Migration::addColumnFirst()
. - Removed
craft\db\mysql\QueryBuilder::addColumnAfter()
. - Removed
craft\db\mysql\QueryBuilder::addColumnBefore()
. - Removed
craft\db\mysql\QueryBuilder::addColumnFirst()
. - Removed
craft\db\Query::scalar()
. - Removed
craft\db\Query::column()
. - Removed
craft\elements\db\ElementQuery::configure()
. - Removed
craft\elements\Tag::getName()
. Use thetitle
property instead. - Removed
craft\helpers\ArrayHelper::getFirstValue()
. - Removed
craft\helpers\Json::removeComments()
. - Removed
craft\helpers\MigrationHelper::makeElemental()
. - Removed
craft\helpers\MigrationHelper::refresh()
. - Removed
craft\helpers\MigrationHelper::restoreAllForeignKeysOnTable()
. - Removed
craft\helpers\MigrationHelper::restoreAllIndexesOnTable()
. - Removed
craft\helpers\MigrationHelper::restoreAllUniqueIndexesOnTable()
. - Removed
craft\helpers\Update::cleanManifestFolderLine()
. - Removed
craft\helpers\Update::isManifestLineAFolder()
. - Removed
craft\services\Assets::deleteAssetsByIds()
. - Removed
craft\services\Assets::deleteCategory()
. - Removed
craft\services\Assets::deleteCategoryById()
. - Removed
craft\services\Assets::findAsset()
. - Removed
craft\services\Assets::findAssets()
. - Removed
craft\services\Assets::getFilesByVolumeId()
. - Removed
craft\services\Categories::saveCategory()
. - Removed
craft\services\Content::validateContent()
. - Removed
craft\services\Entries::deleteEntry()
. - Removed
craft\services\Entries::deleteEntryById()
. - Removed
craft\services\Entries::saveEntry()
. - Removed
craft\services\Globals::deleteSetById()
. - Removed
craft\services\Globals::saveContent()
. - Removed
craft\services\Images::getIsImagickAtLeast()
. - Removed
craft\services\Matrix::deleteBlockById()
. - Removed
craft\services\Matrix::saveBlock()
. - Removed
craft\services\Matrix::validateBlock()
. - Removed
craft\services\Path::getMigrationsPath()
. - Removed
craft\services\Path::getResourcesPath()
. - Removed
craft\services\Plugins::call()
. - Removed
craft\services\Plugins::callFirst()
. - Removed
craft\services\SystemSettings::getCategoryTimeUpdated()
. - Removed
craft\services\Tags::saveTag()
. - Removed
craft\services\Updates::flushUpdateInfoFromCache()
. - Removed
craft\services\Users::changePassword()
. - Removed
craft\services\Users::deleteUser()
. - Removed
craft\tools\*
. - Removed
craft\web\Session::addJsResourceFlash()
. - Removed
craft\web\Session::getJsResourceFlashes()
. - Removed
craft\web\twig\variables\CraftVariable::getTimeZone()
. - Removed
craft\web\twig\variables\Fields::createField()
. - Removed
craft\web\View::registerCssResource()
. - Removed
craft\web\View::registerJsResource()
. - Removed the
$attribute
argument fromcraft\base\ApplicationTrait::getInfo()
. - Removed the
$except
argument fromcraft\base\Element::getFieldValues()
. - Removed the
$indexBy
argument fromcraft\elements\User::getGroups()
. - Removed the
$indexBy
argument fromcraft\models\Section::getEntryTypes()
. - Removed the
$indexBy
argument fromcraft\services\AssetTransforms::getAllTransforms()
. - Removed the
$indexBy
argument fromcraft\services\Categories::getGroupSiteSettings()
. - Removed the
$indexBy
argument fromcraft\services\CategoryGroups::getAllGroups()
. - Removed the
$indexBy
argument fromcraft\services\CategoryGroups::getEditableGroups()
. - Removed the
$indexBy
argument fromcraft\services\Dashboard::getAllWidgets()
. - Removed the
$indexBy
argument fromcraft\services\Fields::getAllFields()
. - Removed the
$indexBy
argument fromcraft\services\Fields::getAllGroups()
. - Removed the
$indexBy
argument fromcraft\services\Fields::getFieldsByElementType()
. - Removed the
$indexBy
argument fromcraft\services\Fields::getFieldsByGroupId()
. - Removed the
$indexBy
argument fromcraft\services\Globals::getAllSets()
. - Removed the
$indexBy
argument fromcraft\services\Globals::getEditableSets()
. - Removed the
$indexBy
argument fromcraft\services\Matrix::getBlockTypesByFieldId()
. - Removed the
$indexBy
argument fromcraft\services\Sections::getAllSections()
. - Removed the
$indexBy
argument fromcraft\services\Sections::getEditableSections()
. - Removed the
$indexBy
argument fromcraft\services\Sections::getSectionSiteSettings()
. - Removed the
$indexBy
argument fromcraft\services\Sections::getEntryTypesBySectionId()
. - Removed the
$indexBy
argument fromcraft\services\Sites::getAllSites()
. - Removed the
$indexBy
argument fromcraft\services\Sites::getEditableSites()
. - Removed the
$indexBy
argument fromcraft\services\Tags::getAllTagGroups()
. - Removed the
$indexBy
argument fromcraft\services\UserGroups::getAllGroups()
. - Removed the
$indexBy
argument fromcraft\services\UserGroups::getGroupsByUserId()
. - Removed the
$indexBy
argument fromcraft\services\Volumes::getViewableVolumes()
. - Removed the
$indexBy
argument fromcraft\services\Volumes::getPublicVolumes()
. - Removed the
$indexBy
argument fromcraft\services\Volumes::getAllVolumes()
. - Removed the
$newName
and$after
arguments fromcraft\db\Command::alterColumn()
. - Removed the
$newName
and$after
arguments fromcraft\db\Migration::alterColumn()
. - Removed the
$newName
and$after
arguments fromcraft\db\mysql\QueryBuilder::alterColumn()
. - Removed the
$runValidation
argument fromcraft\services\Content::saveContent()
. - Removed the
$params
argument fromcraft\helpers\Db::parseDateParam()
. - Removed the
$params
argument fromcraft\helpers\Db::parseParam()
. - Removed the
beforeDeleteAsset
,afterDeleteAsset
,beforeSaveAsset
andafterSaveAsset
events fromcraft\services\Assets
. - Removed the
beforeDeleteCategory
,afterDeleteCategory
,beforeSaveCategory
andafterSaveCategory
events fromcraft\services\Categories
. - Removed the
beforeDeleteEntry
,afterDeleteEntry
,beforeSaveEntry
andafterSaveEntry
events fromcraft\services\Entry
. - Removed the
beforeDeleteGlobalSet
,beforeDeleteGlobalSet
,beforeSaveGlobalContent
andafterSaveGlobalContent
events fromcraft\services\Globals
. - Removed the
beforeDeleteUser
,afterDeleteUser
,beforeSaveUser
,afterSaveUser
,beforeSetPassword
, andafterSetPassword
events fromcraft\services\Users
. - Removed the
backupFailure
event fromcraft\db\Connection
. - Removed the
beforeSaveTag
andafterSaveTag
events fromcraft\services\Tags
. - Removed the
addRichTextLinkOptions
plugin hook. Custom Rich Text field link options should be registered using theregisterLinkOptions
event oncraft\fields\RichText
now. - Removed the
addTwigExtension
plugin hook. Custom Twig extensions should be added by callingCraft::$app->view->twig->addExtension()
directly. - Removed the
addUserAdministrationOptions
plugin hook. Custom actions for the Edit User page should be registered using theregisterUserActions
event oncraft\controllers\UsersController
now. - Removed the
defineAdditionalAssetTableAttributes
,defineAdditionalCategoryTableAttributes
,defineAdditionalEntryTableAttributes
, anddefineAdditionalUserTableAttributes
plugin hooks. Custom table attributes should be registered using theregisterTableAttributes
event oncraft\base\Element
or one of its subclasses now. - Removed the
defineAssetActions
,defineCategoryActions
,defineEntryActions
, anddefineUserActions
plugin hooks. Custom element actions should be registered using theregisterActions
event oncraft\base\Element
or one of its subclasses now. - Removed the
getAssetTableAttributeHtml
,getCategoryTableAttributeHtml
,getEntryTableAttributeHtml
, andgetUserTableAttributeHtml
plugin hooks. Table attribute HTML should be overridden using thesetTableAttributeHtml
event oncraft\base\Element
or one of its subclasses now. - Removed the
getCpAlerts
plugin hook. Custom Control Panel alerts should be registered using theregisterAlerts
event oncraft\helpers\Cp
now. - Removed the
getElementRoute
plugin hook. Element routes should be overridden using thesetRoute
event oncraft\base\Element
or one of its subclasses now. - Removed the
getFieldTypes
plugin hook. Custom field types should be registered using theregisterFieldTypes
event oncraft\services\Fields
now. - Removed the
getMailTransportAdapters
plugin hook. Custom transport types should be registered using theregisterMailerTransportTypes
event oncraft\helpers\MailerHelper
now. - Removed the
getResourcePath
plugin hook. Custom resource URIs should be resolved to file paths using theresolveResourcePath
event oncraft\services\Resources
now. - Removed the
getTableAttributesForSource
plugin hook. - Removed the
getVolumeTypes
plugin hook. Custom volume types should be registered using theregisterVolumeTypes
event oncraft\services\Volumes
now. - Removed the
getWidgetTypes
plugin hook. Custom widget types should be registered using theregisterWidgetTypes
event oncraft\services\Dashboard
now. - Removed the
modifyAssetFilename
plugin hook. Asset filenames should be overridden using thesetFilename
event oncraft\helpers\Assets
now. - Removed the
modifyAssetSortableAttributes
,modifyCategorySortableAttributes
,modifyEntrySortableAttributes
, andmodifyUserSortableAttributes
plugin hooks. Sortable attribute modifications should be made using theregisterSortableAttributes
event oncraft\base\Element
or one of its subclasses now. - Removed the
modifyAssetSources
,modifyCategorySources
,modifyEntrySources
, andmodifyUserSources
plugin hooks. Element source modifications should be made using theregisterSources
event oncraft\base\Element
or one of its subclasses now. - Removed the
modifyCpNav
plugin hook. Control Panel nav modifications should be made using theregisterCpNavItems
event oncraft\web\twig\variables\Cp
now. - Removed the
registerCachePaths
plugin hook. Custom options for the Clear Caches tool (which can be set to callbacks now in addition to file paths) should be registered using theregisterCacheOptions
event oncraft\tools\ClearCaches
now. - Removed the
registerCpRoutes
andregisterSiteRoutes
plugin hooks. Custom URL rules for the Control Panel and front-end site should be registered using theregisterCpUrlRules
andregisterSiteUrlRules
events oncraft\web\UrlManager
now. - Removed the
registerEmailMessages
plugin hook. Custom email messages should be registered using theregisterMessages
event oncraft\services\EmailMessages
now. - Removed the
registerUserPermissions
plugin hook. Custom user permissions should be registered using theregisterPermissions
event oncraft\services\UserPermissions
now. - Removed the
craft\requirements
folder. It is now a composer dependency. - Removed the
Craft.charts.utils.applyShadowFilter()
JavaScript method. - Removed the
Craft.charts.utils.arrayToDataTable()
JavaScript method.
- Fixed a bug where custom 503 templates weren’t rendering when Craft was in the middle of updating from an earlier version than 3.0.2933.
- Fixed a validation error that occurred when saving a field.
- Fixed a PHP error that occurred when using the
{% header %}
Twig tag. - Fixed the Generate Pending Transforms task creation that occurs in
craft\services\Assets::getUrlForAsset()
. - Fixed a PHP error that occurred when viewing entry revisions that were created before updating to Craft 3.
- Fixed a bug where brand new elements were not getting their
$uid
property set on them after getting saved. - Fixed a bug where user activation emails that were sent immediately after creating the user account were getting an invalid activation URL.
- Fixed a PHP error that occurred when saving a Structure section entry with a new parent.
- Fixed a bug where entry titles were required for validation even if the entry type didn’t opt to show the title field.
- Fixed a bug where the
users/edit-user
controller action wasn’t respecting the passed in User object, if there was one, so validation errors weren’t getting reported. - Fixed an error that occurred when the Control Panel attempted to start running background tasks if there were no tasks queued up.
- Fixed a bug where Recent Entries widgets would lose their “Locale” (now “Site”) setting values when upgrading from an older version of Craft.
- Fixed a bug where the Dashboard was allowing users to add widgets that were calling themselves unselectable.
- Fixed a bug where sessions table rows weren’t getting deleted after users logged out.
- Fixed a bug where the
fixedOrder
parameter wasn’t being respected for entry queries. - Fixed a bug where plugin-supplied custom fields weren’t working.
- Fixed a PHP error that occurred when opening an element editor.
- Fixed a PHP error that occurred when re-saving a category group.
- Fixed a PHP error that occurred when using the
{% exit %}
tag with a specific status code. - Fixed authorization error that occurred when editing an entry in a section that’s not enabled for the current site.
- Fixed a PHP error when using the
{% cache %}
tag. - Fixed an error that occurred when clicking on an email message to edit it.
- Fixed an error that occurred when
craft\cache\FileCache::setValue()
was called and the destination folder already existed. - Fixed support for the
testToEmailAddress
config setting. - Fixed a bug where the
tasks/run-pending-tasks
controller action was requiring an authenticated session. - Fixed a PHP error that occurred when saving a Recent Entries widget.
- Fixed a bug where Recent Entries widgets’ Site and Limit settings weren’t being validated correctly.
- Fixed a bug where widget settings errors were getting reported twice.
- Fixed a bug where console requests were only working when running the Pro edition.
- Fixed a bug where the Instructions setting within newly-created sub-fields in a Matrix field’s settings were getting marked as required.
- Fixed a bug where custom nested element sources registered by plugins were not getting Admin-defined custom table attributes.
- Fixed a bug where searching by an
"exact phrase"
wasn’t working. - Fixed a bug where the Backup Database tool wasn’t downloading the DB backup if the “Download backup?” checkbox was checked.
- Fixed a bug where the requirements checker wasn’t taking into account MySQL/PostgreSQL installs running on non-standard ports.
- Fixed a bug where you’d get a fatal PHP error during an update if you didn’t meet one of Craft’s requirements.
- Fixed a bug where you’d get a database error when saving a private Assets Volume.
- Fixed a bug where linking to an entry or category from a Rich Text field wasn’t working.
- Fixed
Plugins::validateConfig()
’s nulls. - Fixed a bug where JavaScript flashes weren’t getting registered on the subsequent page.
- Fixed a bug where
craft\db\Connection::columnExists()
wasn’t returningtrue
if the column existed.
- Added
craft\i18n\Locale::getNumberPattern()
. - Added
craft\web\Request::getValidatedBodyParam()
. - Added
craft\services\Fields::deleteGroup()
. - Added
craft\services\Fields::deleteLayout()
. - Added
craft\services\Sections::deleteSection()
. - Added
craft\services\Sections::deleteEntryType()
. - Added
craft\services\Sites::deleteSite()
. - Added
craft\services\Volumes::deleteVolume()
. - Added
craft\base\SavableComponent::beforeSave()
. - Added
craft\base\SavableComponent::afterSave()
. - Added
craft\base\SavableComponent::beforeDelete()
. - Added
craft\base\SavableComponent::afterDelete()
. - Added the
beforeSave
,afterSave
,beforeDelete
, andafterDelete
events tocraft\base\SavableComponent
. - Added the
beforeSaveWidget
,afterSaveWidget
,beforeDeleteWidget
, andafterDeleteWidget
events tocraft\services\Dashboard
. - Added the
beforeSaveFieldLayout
,beforeDeleteFieldLayout
,afterDeleteFieldLayout
,beforeSaveFieldGroup
,afterSaveFieldGroup
,beforeDeleteFieldGroup
,afterDeleteFieldGroup
,beforeSaveField
,afterSaveField
,beforeDeleteField
, andafterDeleteField
events tocraft\services\Fields
. - Added the
beforeLoadPlugins
,beforeEnablePlugin
,afterEnablePlugin
,beforeDisablePlugin
,afterDisablePlugin
,beforeInstallPlugin
,afterInstallPlugin
,beforeUninstallPlugin
,afterUninstallPlugin
,beforeSavePluginSettings
, andafterSavePluginSettings
events tocraft\services\Plugins
. - Added the
beforeSaveRoute
,afterSaveRoute
,beforeDeleteRoute
, andafterDeleteRoute
events tocraft\services\Routes
. - Added the
beforeSearch
andafterSearch
events tocraft\services\Search
. - Added the
beforeSaveTask
,afterSaveTask
,beforeDeleteTask
, andafterDeleteTask
events tocraft\services\Tasks
. - Added the
loginFailure
event tocraft\controllers\UsersController
(replacing the like-named event oncraft\elements\User
).
- Updated the Intl fallback data based on ICU 56.1. If you have any additional locale data files in
locales/
, you should update them, too. - Ported recent changes from Craft 2.
- The
beforeSaveAssetTransform
event oncraft\services\AssetTransforms
no longer supports an$isValid
property. - The
beforeDeleteAssetTransform
event oncraft\services\AssetTransforms
no longer supports a$isValid
property. - The
beforeSaveCategory
event oncraft\services\Categories
no longer supports an$isValid
property. - The
beforeDeleteGroup
event oncraft\services\Categories
no longer supports an$isValid
property. - The
beforeDeleteSection
event oncraft\services\Sections
no longer supports an$isValid
property. - The
beforeSaveEntryType
event oncraft\services\Sections
no longer supports an$isValid
property. - The
beforeDeleteEntryType
event oncraft\services\Sections
no longer supports an$isValid
property. - The
beforeReorderSites
event oncraft\services\Sites
no longer supports an$isValid
property. - The
beforeMoveElement
event oncraft\services\Structures
no longer supports an$isValid
property. - The
beforeSaveTag
event oncraft\services\Tags
no longer supports an$isValid
property. - The
beforeSaveGroup
event oncraft\services\Tags
no longer supports an$isValid
property. - The
beforeDeleteGroup
event oncraft\services\Tags
no longer supports an$isValid
property. - The
beforeSaveUserGroup
event oncraft\services\UserGroups
no longer supports an$isValid
property. - The
beforeDeleteUserGroup
event oncraft\services\UserGroups
no longer supports an$isValid
property. - The
beforeSaveVolume
event oncraft\services\Volumes
no longer supports an$isValid
property. - The
beforeDeleteVolume
event oncraft\services\Volumes
no longer supports an$isValid
property. craft\services\AssetTransforms::saveTransform()
now accepts a$runValidation
argument.craft\services\Categories::saveCategory()
now accepts a$runValidation
argument.craft\services\Entries::saveEntry()
now accepts a$runValidation
argument.craft\services\Fields::saveField()
now accepts a$runValidation
argument.craft\services\Fields::saveGroup()
now accepts a$runValidation
argument.craft\services\Fields::saveLayout()
now accepts a$runValidation
argument.craft\services\Tags::saveTag()
now accepts a$runValidation
argument.craft\services\Tags::saveTagGroup()
now accepts a$runValidation
argument.craft\services\UserGroups::saveGroup()
now accepts a$runValidation
argument.craft\services\Volumes::saveVolume()
now accepts a$runValidation
argument.craft\services\Sections::deleteEntryTypeById()
no longer accepts an array of entry type IDs.- Renamed
craft\validators\DateTime
toDateTimeValidator
. - Renamed
craft\validators\Handle
toHandleValidator
. - Renamed
craft\validators\SingleSectionUri
toSingleSectionUriValidator
. - Renamed
craft\validators\SiteId
toSiteIdValidator
. - Renamed
craft\validators\Unique
toUniqueValidator
. - Renamed
craft\validators\Uri
toUriValidator
. - Renamed
craft\validators\Url
toUrlValidator
. - Renamed
craft\validators\UriFormat
toUriFormatValidator
. - Deleted the
craft\services\Volumes::VOLUME_INTERFACE
constant. - Deleted the
craft\services\Tasks::TASK_INTERFACE
constant. - Deleted the
craft\services\Fields::FIELD_INTERFACE
constant. - Deleted the
craft\services\Elements::ELEMENT_INTERFACE
constant. - Deleted the
craft\services\Elements::ACTION_INTERFACE
constant. - Deleted the
craft\services\Dashboard::WIDGET_INTERFACE
constant. - Deleted
craft\enums\ConfigCategory
. Its constants have been moved tocraft\services\Config
in the form ofCATEGORY_X
.
- Removed the concept of “Safe Mode” from Twig, as it is no longer needed.
- Removed the
beforeInstall
,afterInstall
,beforeUpdate
,afterUpdate
,beforeUninstall
, andafterUninstall
events fromcraft\base\Plugin
.
- Fixed a bug where Craft couldn’t locate the DB backup file when attempting to restore it after a failed update.
- Fixed bug where element queries weren’t automatically getting ordered in their structure’s order, when applicable.
- Fixed a bug where changes to users’ Preferred Language settings weren’t sticking.
- Fixed a bug where
craft\i18n\I18N::getAppLocales()
andgetAppLocaleIds()
were only returning en-US. - Fixed a bug where Craft was including a localized
0
character when formatting numbers as JPY, KRW, VND, XAF, XOF, and XPF currencies, if the Intl extension was not installed. - Fixed a bug where Craft wasn’t displaying the “Can’t run Craft CMS” page correctly if it couldn’t connect to the database.
- Fixed a bug where updating to Craft 3.0.2933 or later could fail if the
backupDbOnUpdate
config setting was enabled. - Fixed a bug where Matrix fields would lose their blocks when the owner element was saved outside of a normal Save Entry (etc.) POST request, e.g. when creating a new site.
- Fixed a PHP error that occurred when loading a category page on the front-end.
- Fixed a PHP error that occurred when calling the
site()
method on an element query. - Fixed an infinite recursion bug when calling the
toArray()
method on an element query, or passing an element query object intocraft\helpers\ArrayHelper::toArray()
. - Fixed a PHP error that occurred when deleting an entry.
- Fixed a bug where Craft wasn’t renaming content table columns when a field’s handle was renamed; instead it was just adding a new column based on the new handle.
- Added Content Migrations support.
- Added the
|timestamp
filter, for formatting a date as a user-friendly timestamp. - Added the
|datetime
filter, for formatting a date with a localized date+time format. - Added the
|time
filter, for formatting a date with a localized time format. - Added
craft\web\Request::getAcceptsJson()
, which returns whether the HTTP request accepts a JSON response. - Added
craft\web\Controller::requireAcceptsJson()
, which mandates that the HTTP request accepts a JSON response. - Added
craft\i18n\Formatter::asTimestamp()
, for formatting a date as a user-friendly timestamp. - Added
craft\helpers\StringHelper::ensureStartsWith()
, which will check if a string begins with a substring, and prepend it if it doesn’t. - Added
craft\helpers\StringHelper::ensureEndsWith()
, which will check if a string ends with a substring, and append it if it doesn’t. - Added the
craft\services\EntryRevisions::beforeRevertEntryToVersion
event. - Added
craft\helpers\MigrationHelper::doesForeignKeyExist()
. - Added
craft\helpers\MigrationHelper::doesIndexExist()
.
- Improved the error message when a Migrate action was called with an invalid --plugin arg.
- Ported all recent changes from Craft 2.
- The
|date
filter can be passed'short'
,'medium'
,'long'
, and'full'
, which will format the date with a localized date format. - The
{% cache %}
tag no longer includes the query string when storing the cache URL. craft\helpers\DateTimeHelper::isToday()
,isYesterday()
,isThisYear()
,isThisWeek()
,isThisMonth()
,isWithinLast()
,isInThePast()
, andtimeAgoInWords()
now support all the same types of$date
values ascraft\helpers\DateTimeHelper::toDateTime()
.craft\helpers\MigrationHelper::dropForeignKeyIfExists()
anddropIndexIfExists()
now allow the$columns
argument to be a string.- The
craft\services\EntryRevisions::beforeSaveDraft
event’s$isValid
property is no longer respected. To prevent a draft from saving, set$isValid = false
on thecraft\models\EntryDraft::beforeValidate
event. - The
craft\services\EntryRevisions::beforePublishDraft
event’s$isValid
property is no longer respected. To prevent a draft from publishing, set$isValid = false
on thecraft\models\EntryDraft::beforeValidate
event. - The
craft\services\EntryRevisions::beforeDeleteDraft
event’s$isValid
property is no longer respected. - The
craft\services\Updates::afterUpdateFail
event has been renamed toupdateFailure
. - The
craft\mail\Mailer::sendEmailError
event has been renamed tosendMailFailure
. - Front-end forms that submit Ajax requests to Craft that expect a JSON response must start passing an
Accept: application/json
header. jQuery’s Ajax methods will do this if thedataType
option is set to'json'
. - Renamed
craft\helpers\DateTimeHelper::wasYesterday()
toisYesterday()
. - Renamed
craft\helpers\DateTimeHelper::wasWithinLast()
toisWithinLast()
. - Renamed
craft\helpers\DateTimeHelper::wasInThePast()
toisInThePast()
. - The
$day
argument ofcraft\i18n\Locale::getWeekDayName()
should now be 0-6 instead of 1-7, where0
represents Sunday.
- Deprecated the
round()
Twig function. Use the|round
filter instead. - Deprecated
craft\craft\app\dates\DateTime::__toString()
. Useformat('Y-m-d')
instead. - Deprecated
craft\craft\app\dates\DateTime::atom()
. Useformat(DateTime::ATOM)
instead. - Deprecated
craft\craft\app\dates\DateTime::cookie()
. Useformat(DateTime::COOKIE)
instead. - Deprecated
craft\craft\app\dates\DateTime::iso8601()
. Useformat(DateTime::ISO8601)
instead. - Deprecated
craft\craft\app\dates\DateTime::rfc822()
. Useformat(DateTime::RFC822)
instead. - Deprecated
craft\craft\app\dates\DateTime::rfc850()
. Useformat(DateTime::RFC850)
instead. - Deprecated
craft\craft\app\dates\DateTime::rfc1036()
. Useformat(DateTime::RFC1036)
instead. - Deprecated
craft\craft\app\dates\DateTime::rfc1123()
. Useformat(DateTime::RFC1123)
instead. - Deprecated
craft\craft\app\dates\DateTime::rfc2822()
. Useformat(DateTime::RFC2822)
instead. - Deprecated
craft\craft\app\dates\DateTime::rfc3339()
. Useformat(DateTime::RFC3339)
instead. - Deprecated
craft\craft\app\dates\DateTime::rss()
. Useformat(DateTime::RSS)
instead. - Deprecated
craft\craft\app\dates\DateTime::w3c()
. Useformat(DateTime::W3C)
instead. - Deprecated
craft\craft\app\dates\DateTime::w3cDate()
. Useformat('Y-m-d')
instead. - Deprecated
craft\craft\app\dates\DateTime::mySqlDateTime()
. Useformat('Y-m-d H:i:s')
instead. - Deprecated
craft\craft\app\dates\DateTime::localeDate()
. UseCraft::$app->formatter->asDate($date, 'short')
instead. - Deprecated
craft\craft\app\dates\DateTime::localeTime()
. UseCraft::$app->formatter->asTime($date, 'short')
instead. - Deprecated
craft\craft\app\dates\DateTime::year()
. Useformat('Y')
instead. - Deprecated
craft\craft\app\dates\DateTime::month()
. Useformat('n')
instead. - Deprecated
craft\craft\app\dates\DateTime::day()
. Useformat('j')
instead. - Deprecated
craft\craft\app\dates\DateTime::nice()
. UseCraft::$app->formatter->asDatetime($date)
instead. - Deprecated
craft\craft\app\dates\DateTime::uiTimestamp()
. UseCraft::$app->formatter->asTimestamp($date, 'short')
instead.
- Removed the static
$plugin
property oncraft\base\Plugin
. - Removed
craft\web\Controller::requireAjaxRequest()
. UserequireAcceptsJson()
instead. - Removed
craft\helpers\DateTimeHelper::fromString()
. UseDateTimeHelper::toDateTime($date)->getTimestamp()
instead. - Removed
craft\helpers\DateTimeHelper::uiTimestamp()
. UseCraft::$app->formatter->asTimestamp($date)
instead. - Removed
craft\helpers\DateTimeHelper::timeAgoInWords()
. UseCraft::$app->formatter->asRelativeTime($date)
instead. - Removed
craft\helpers\DateTimeHelper::nice()
. UseCraft::$app->formatter->asDatetime($date)
instead. - Removed
craft\helpers\DateTimeHelper::niceShort()
. - Removed the
craft\craft\app\dates\DateTime::W3C_DATE
constant. - Removed the
craft\craft\app\dates\DateTime::MYSQL_DATETIME
constant. - Removed the
craft\craft\app\dates\DateTime::UTC constant
. - Removed the
craft\craft\app\dates\DateTime::DATEFIELD_24HOUR
constant. - Removed the
craft\craft\app\dates\DateTime::DATEFIELD_12HOUR
constant.
- Fixed PHP error when
Craft::$app->getIsUpdating()
was called in a console request. - Fixed a bug that occurred when applying a coupon to a Craft Client/Pro purchase.
- Fixed bug where
craft\helpers\StringHelper::startsWith()
andendsWith()
were returning strings instead of booleans. - Fixed a bug where the
$isNew
property on entry draft events wasn’t getting set correctly. - Fixed the default email settings.
- Fixed a PHP error that occurred when installing/updating/uninstalling a plugin that didn’t have a
migrations/
folder. - Fixed a bug where files that were registered via an asset bundle weren’t getting included when calling
craft\web\View::getHeadHtml()
. - Fixed a bug where localized datepicker resources weren’t getting included properly.
- Fixed a bug where matrixblocks.ownerSiteId was getting set to NOT NULL for new Craft installs, resulting in MySQL errors when saving non-localized Matrix fields.
- Fixed a PHP error that occurred when saving a category.
- Fixed a JavaScript error in
Craft.compare()
that affected Live Preview. - Fixed a bug where changes to tags’ titles made from the inline editor within Tags fields would not be reflected in the Tags field, for newly-selected tags.
- Fixed a bug where
craft\helpers\Io::copyFolder()
was not working. - Fixed an "Entry is missing its type ID" bug when saving a entry without multiple entry types.
- Fixed a PHP error that occurred when saving a Matrix field's settings on a Craft install with only one Site.
- Fixed a couple places where Craft wasn't enforcing the PHP 5.6 requirement.
- Fixed a bug where Craft would attempt to create a 'migrations' folder within plugins' folders when checking if they have any new migrations.
- Fixed a bug where ordering element queries based on custom field values wasn't working if the orderBy param was set via the
orderBy()
method. - Fixed a MySQL error that occurred when updating Craft when any plugins were installed.
- Fixed a bug where element queries were not always respecting the 'limit' and 'offset' params when the 'search' param was applied.
- Fixed a bug where element queries were non respecting the 'orderBy' param if it was set to "score" and the 'search' param was applied.
- It is now possible to override 'assetManager', 'cache', 'db', 'mailer', 'locale', 'formatter', and 'log' application components' configurations from
config/app.php
. - Renamed
craft\services\Plugins::getPluginInfo()
togetAllPluginInfo()
. craft\elements\MatrixBlock::getType()
now throws anyii\base\InvalidConfigException
if the block type cannot be determined, rather than returningnull
.
- Fixed a MySQL error that occurred when updating a Craft install to Craft Dev 3.0.2933, if any user permissions had been assigned.
- Fixed an "Invalid entry type ID" error that occurred when creating a new entry.
- Fixed a bug where fields weren't passing validation, with no visible validation errors, when there was only one Site.
- Fixed a bug where elements'
afterSave()
functions and fields'afterElementSave()
functions weren't getting called when saving new elements, which prevented Matrix and relationship fields' values from getting saved. - Fixed a PHP error that occurred when executing
migrate
commands from the CLI. - Fixed a bug where
config/db.php
was not getting validated before attempting to establish a DB connection.
- Multi-site management!
- Locale permissions have been replaced by Site permissions.
- Sections and category groups can now choose to have URLs on a per-site basis.
- Field types that have a column in the content table now get a "Translation Method" setting (replacing the "This field is translatable" setting), with the options "Not translatable", "Translate for each language", "Translate for each site", and "Custom…".
- Matrix fields now have a "Manage blocks on a per-site basis" setting.
- Relationship fields now have a "Manage relations on a per-site basis" setting.
- Added support for a
CRAFT_SITE
PHP constant, which can be set to the handle of the current site. - Element queries now support 'site', 'siteId', and 'enabledForSite' criteria params.
- Added
craft\services\Sites
. - Added
craft\validators\SiteId
. - Added
Craft::$app->getIsMultiSite()
, replacinggetIsLocalized()
. - Added
Craft::$app->getSystemUid()
, replacinggetSiteUid()
. - Added
craft\i18n\I18N::getSiteLanguages()
, replacinggetSiteLocaleIds()
. - Added
craft\elements\User::getPreferredLanguage()
, replacinggetPreferredLocale()
. - Added
craft\helpers\ElementHelper::getSupportedSitesForElement()
- Added
craft\helpers\ElementHelper::getEditableSiteIdsForElement()
, replacinggetEditableLocaleIdsForElement()
- Added
ElementInterface::getSupportedSites()
, replacinggetLocales()
. - Added
Craft.isMultiSite
for JavaScript, replacingCraft.isLocalized
. - Added
Craft.systemUid
for JavaScript, replacingCraft.siteUid
. - Added
Craft.UriFormatGenerator
for JavaScript, replacingCraft.EntryUrlFormatGenerator
. - Plugins now have a static
$plugin
property, which gets set to the instance of the plugin, if it has been initialized.
- Routes can now be stored on a per-site basis, rather than per-locale.
- Renamed all "URL Format" things to "URI Format", in the Control Panel UI and in the code.
- Structure sections and category groups no longer have Nested URL Format settings. (It's still possible to achieve the same result with a single URI Format setting.)
- Fields that are translatable now have a chat bubble icon, replacing the locale ID badge.
craft\elements\Category::getGroup()
now throws anyii\base\InvalidConfigException
if the category group type cannot be determined, rather than returningnull
.- Renamed
craft\base\PluginTrait::$releasesFeedUrl
to$releaseFeedUrl
. craft\mail\Message::setTo()
will now set a 'user' variable on the message, if it was passed a User model.Craft.ui.createSelect()
andcreateLightswitch()
now initialize theCraft.FieldToggle
class on the returned elements.
- Fixed a PHP error that occurred if a Position Select field had a blank first option.
- Fixed a bug where users without Control Panel access weren't getting redirected correctly after account activation.
- Fixed a JavaScript error that occurred when calling
Craft.ui.createCheckboxField()
.
- Table fields now have a "Lightswitch" column type option.
- Added a
|unique
Twig filter for filtering out duplicate values in an array. - Added
craft\craft\app\validators\Unique
, which can be used as a drop-in replacement forcraft\yii\validators\UniqueValidator
, but with better support for validating a model's attributes based on an associated record's attributes. - Added
Craft.ui.createTextarea()
,createTextareaField()
,createLightswitch()
, andcreateLightswitchField()
. - Added a
lightswitch
column type option to editable tables. - Text columns within editable tables can now define placeholder text.
- Editable table cell values can now be specified as an array with
value
andhasErrors
(optional boolean) keys. Cells wherehasErrors
is set totrue
will get a red border.
- Ported all recent changes from Craft 2.
craft\elements\Entry::getSection()
andgetType()
now throw anyii\base\InvalidConfigException
if the section/entry type cannot be determined, rather than returningnull
.
- Fixed bug where
was getting output for editable table headings that should have been empty. - Fixed a bug where xregexp-all.js was not getting included properly when the
useCompressedJs
config setting was set totrue
(as it is by default).
- Added
$flavor
and$inlineOnly
arguments to the|markdown
filter, making it possible to choose which Markdown flavor should be used, and whether it should parse paragraphs or treat the whole thing as inline elements. - Added
Craft::$app->getIsUpdating()
, which returnstrue
if Craft is undergoing an application update. - Added the beforeSaveGlobalSet, afterSaveGlobalSet, beforeDeleteGlobalSet, and afterDeleteGlobalSet events to
craft\services\Globals
. - Added the beforeSaveUserGroup, afterSaveUserGroup, beforeDeleteUserGroup and afterDeleteUserGroup events to
craft\services\UserGroups
. - Added the beforeSaveAssetTransform, afterSaveAssetTransform, beforeDeleteAssetTransform, and afterDeleteAssetTransform events to
craft\services\AssetTransforms
. - Added the beforeDeleteEntryType and afterDeleteEntryType events to
craft\services\Sections
. - Added the afterInit event to
craft\web\Application
andcraft\console\Application
. - Added the loginFailure event to
craft\elements\User
.
- All before/after-save events now have an
$isNew
property that identifies whether the object of the event is brand new or not. - The
_includes/forms/field
include template now parses the passed inwarning
variable as an inline Markdown string, if it exists. - The
_includes/forms/editableTable
include template now supports astaticRows
variable, which if defined and set totrue
will prevent row CRUD operations in the resulting table. - The
_includes/forms/editableTable
include template now supports aheading
column type, which can be used in conjunction withstaticRows
to define row headings. - The
_includes/forms/editableTable
include template now supports aninfo
property on column configs, which will add an info button to the column header which reveas instruction text for the column. - Renamed some event classes to be more consistent.
- Fixed a bug where it was not possible to replace a file from the Assets page.
- Fixed a bug where asset volumes' Cache Duration settings were not being respected.
- Fixed a bug that affected asset indexing reliability.
- Fixed a PHP error that occurred when rendering a Twig template from a console request.
- Fixed a bug where setting custom field attributes on an element query would prevent the query from executing.
- Fixed a bug where plugin Control Panel nav items were getting the full plugin class name in the URL instead of just handle.
- User photos are now assets. (Note that the
storage/userphotos/
folder must be manually moved to a publicly accessible location, and the User Photos asset volume’s settings must be updated accordingly, for user photos to work properly.) - Added
craft\elements\User::getPhoto()
, which returns the user’s photo asset, if they have one. - Added
craft\helpers\StringHelper::randomStringWithChars()
. - Added the
beforeSaveContent
event tocraft\services\Content
. - Added the
beforeSaveDraft
andbeforePublishDraft
events tocraft\services\EntryRevisions
. - Added the
beforeSaveGroup
,afterSaveGroup
,beforeDeleteGroup
, andafterDeleteGroup
events tocraft\services\Tags
. - Added the
beforeSaveVolume
,afterSaveVolume
,beforeDeleteVolume
, andafterDeleteVolume
events tocraft\services\Volumes
. - Added the
redirectInput()
global function, which simplifies the code required to createredirect
params.
- All
redirect
params must now be hashed using the|hash
filter (e.g.<input type="hidden" name="redirect" value="{{ 'foo'|hash }}">
). A newredirectInput()
global function makes this a little easier (e.g.{{ redirectInput('foo') }}
). - Ported recent changes from Craft 2.
- The
getCsrfInput()
global function has been renamed tocsrfInput()
. (getCsrfInput() still works but produces a deprecation error.) - The
|hash
filter no longer requires a$key
argument. - Brought back
getId()
,getName()
, andgetNativeName()
methods to Locale, so Craft 2 templates don’t need to be updated right away, although they will produce a deprecation error.
craft\elements\User::getPhotoUrl()
is now deprecated in favor ofuser.getPhoto.getUrl()
.
- Fixed a bug where
craft\helpers\StringHelper::toTitleCase()
was returning all-lowercase strings. - Fixed a typo where
craft\helpers\Json::encodeIfJson()
should have been nameddecodeIfJson()
. - Fixed a bug where element queries were not respecting the
offset
property. - Fixed a MySQL error that occurred when querying users with the
can
property. - Fixed a MySQL error that occurred when executing an element query that had custom query params.
- Fixed a PHP error that occurred when rendering templates with a
{% paginate %}
tag. (Note that you may need to delete yourstorage/runtime/compiled_templates/
folder.) - Fixed a PHP warning that occurred when using
craft\services\Feeds
on a server running PHP 7. - Fixed a few bugs related to saving elements on localized sites.
- Fixed tag group saving and deleting.
- Fixed a bug where all global sets were listed in the sidebar of the Globals page, rather than just the ones the user had permission to edit.
- Fixed a bug where nested Structure section entries were not showing the parent entry on their edit pages.
- Fixed a bug where nested categories were not showing the parent category on their edit pages.
- Fixed a MySQL error that occurred when saving a nested Structure section entry.
- Fixed a MySQL error that occurred when saving a nested category.
- Fixed a bug where User elements returned by
craft\services\Users::getUserByUsernameOrEmail()
andgetUserByEmail()
were missing their content. - Fixed a bug where user info like Last Login Date was not getting updated when users logged in.
- Fixed a bug where email messages were not respecting the recipient user’s preferred language.
- Fixed a PHP error that occurred when saving an element with an invalid field, if the field’s value couldn’t be converted to a string.
- Fixed a PHP error that occurred when sharing an entry or category with a tokenized share URL.
- Fixed a bug where the
dateCreated
,dateUpdated
, anduid
attributes on new active record objects would not necessarily reflect the values in the database, after saving the record for the first time. - Fixed a bug that broke cookie-based authentication.
- Fixed a bug where temporary asset uploads were getting deleted when clearing data caches.
- Fixed a JavaScript error that occurred in the Control Panel.
craft\services\Security::hashData
andvalidateData()
no longer require a$key
argument.
- Ported all the changes from Craft 2.
- Craft 3 now requires PHP 5.6 or later.
- Craft 3 now requires MySQL 5.5 or later.
- The debug toolbar now has the Craft “C” logo rather than the Yii logo.
craft.app
now points to the same Application object thatCraft::$app
references in PHP, giving templates access to literally all of the service methods, etc., that PHP code has access to.- Added the
is missing
Twig test for determining if an object implementscraft\base\MissingComponentInterface
. - Added a new
uid
parameter to element queries, for fetching elements by their UID. - Elements’ UIDs are now fetched in element queries, and stored as a
uid
property on the resulting elements. - Added support for Reduced Redundancy Storage and Infrequent Access Storage for Amazon S3 asset volumes.
- Added the beforeCreateBackup event to
craft\db\Connection
. - Added the beforeSaveGroup and afterSaveGroup events to
craft\services\Categories
. - Documented all magic properties and methods in class doc blocks, so IDEs should always know what’s available.
- Added
craft\db\mysql\Schema::TYPE_TINYTEXT
andTYPE_LONGTEXT
, and added custom support for them incraft\db\mysql\ColumnSchemaBuilder
. - Added
craft\db\Migration::tinyText()
,mediumText()
,longText()
,enum()
, anduid()
column schema definition helpers. - Added
craft\errors\DbBackupException
. - Added
craft\errors\DbUpdateException
. - Added
craft\errors\DownloadPackageException
. - Added
craft\errors\FilePermissionsException
. - Added
craft\errors\InvalidateCacheException
. - Added
craft\errors\MinimumRequirementException
. - Added
craft\errors\MissingFileException
. - Added
craft\errors\UnpackPackageException
. - Added
craft\errors\ValidatePackageException
. - Added
craft\helpers\Localization::getLocaleData()
. - Added
craft\volumes\Temp
. - Added a
$format
argument tocraft\i18n\Locale::getDateFormat()
,getTimeFormat()
, andgetDateTimeFormat()
, for specifying whether the returned string should be in the ICU, PHP, or jQuery UI date/time format.
- Craft now checks for a plugin.json file within plugin directories, rather than config.json.
- Plugin-based email messages now get translated using the plugin handle as the translation category, rather than
'app'
. - “owner” is now a reserved field handle.
- Made lots of improvements to exceptions.
- Improved the handling of invalid locale IDs. (Work in progress, though.)
- Renamed lots of class and method names to be more in-line with Yii conventions.
- Renamed the
craft\i18n\Locale::FORMAT_*
constants toLENGTH_*
. - Renamed
craft\web\View::includeTranslations()
toregisterTranslations()
, and it now accepts two arguments:$category
and$messages
. craft\db\Command::createTable()
andcraft\db\Migration::createTable()
no longer accept$addIdColumn
or$addAuditColumn
arguments. Theid
,dateCreated
,dateUpdated
, anduid
columns are now expected to be included in the$columns
array.craft\web\View::clearJsBuffer()
no longer returns an array.- Renamed
Craft.locale
toCraft.language
in JS. Craft.t()
in JS now accepts a category argument, likeCraft::t()
in PHP.- Updated Yii to 2.0.9.
- Updated the Yii 2 Debug module to 2.0.6.
- Updated the Yii 2 Nested Sets module to 0.9.0.
- Updated Swiftmailer to 5.4.3.
- Updated SimplePie to 1.4.2.
- Updated Guzzle to 6.2.1.
- Updated Twig to 1.24.1.
- Updated PEL to 0.9.4.
- Updated Stringy to 2.3.2.
- Updated Imagine to 0.6.3.
- Updated Flysystem to 1.0.26.
- Updated PclZip to 2.8.2.
- Updated jQuery Timepicker to 1.11.2.
- Updated qUnit to 2.0.1.
- Updated Redactor II to 1.2.5.
- Updated selectize.js to 0.12.2.
- Updated element-resize-detector.js to 1.1.6.
- Updated jQuery UI to 1.12.0.
- Updated Picturefill to 3.0.2.
- Updated xRegExp to 3.1.1.
- Deprecated
craft.categoryGroups
. - Deprecated
craft.config
. - Deprecated
craft.deprecator
. - Deprecated
craft.elementIndexes
. - Deprecated
craft.entryRevisions
. - Deprecated
craft.feeds
. - Deprecated
craft.fields
. - Deprecated
craft.globals
. - Deprecated
craft.i18n
. - Deprecated
craft.request
. - Deprecated
craft.sections
. - Deprecated
craft.systemSettings
. - Deprecated
craft.tasks
. - Deprecated
craft.session
. - Deprecated
craft.userGroups
. - Deprecated
craft.emailMessages
. - Deprecated
craft.userPermissions
.
- Removed the
overridePhpSessionLocation
config setting. - Removed
craft.elements
. - Removed the
{% includeTranslations %}
tag. - Removed the
craft\db\InstallMigration
class. - Removed the
craft\web\twig\variables\ComponentInfo
class.
- Fixed a lot of bugs. OK?
- Ported all improvements and bug fixes from the latest Craft 2.4 builds.
- Added the
showBetaUpdates
config setting. - Added
craft\helpers\StringHelper::delimit()
. - Added
craft\helpers\StringHelper::indexOf()
. - Added
craft\helpers\StringHelper::indexOfLast()
. - Added
craft\helpers\StringHelper::lines()
.
- Image transforms’ Quality settings are now represented as a dropdown input in the Control Panel, with the options “Auto”, “Low”, “Medium”, “High”, “Very High (Recommended)”, and “Maximum”.
- It is now possible to access
Craft.Grid
objects from their container elements, via.data('grid')
. - It is now possible to access
Craft.BaseElementSelectInput
objects from their container elements, via.data('elementSelect')
. - Craft now displays helpful errors after failed asset uploads.
- Fixed an error that occurred when backing up the database.
- Fixed a bug where plugin settings were getting HTML-encoded.
- Fixed an error that occurred when deleting a field group.
- Fixed a MySQL error that occurred when saving a category group without URLs.
- Fixed an error that occurred when fields existed with invalid types, if there was no corresponding column in the database.
- Fixed a MySQL error that occurred when saving user groups.
- Fixed a bug where user group names and handles were not being validated for uniqueness.
- Fixed a bug where route params registered with
craft\web\UrlManager::setRouteParams()
were not being passed to the template, for requests that ultimately get routed to a template. - Fixed a bug where no Admin user would be created when installing Craft with the
useEmailAsUsername
config setting set totrue
. - Fixed a bug where Title fields were not being validated.
- Fixed a bug where custom fields’ validation errors were not being reported after attempting to save elements.
- Fixed an error that occurred when attempting to save an element with a required Rich Text field that had no value.
- Fixed a bug where PHP could easily run out of memory when unzipping large zip files.
- Fixed a bug where
craft\helpers\MigrationHelper
would forget that it had dropped a table afterdropTable()
was called. - Fixed an error that would occur if another error occurred during a MySQL transaction that included savepoints, and the savepoints had already been implicitly committed.
- Ported all improvements and bug fixes from the latest Craft 2.4 builds.
- Added the
enableCsrfCookie
config setting, which determines whether CSRF tokens should be saved in cookies. Defaults totrue
. CSRF tokens will be stored in the PHP session if set tofalse
. - The Content model has been removed. Elements now have
craft\behaviors\ContentBehavior
s directly. Because speed! - Added
craft\base\ElementTrait::$contentId
for storing the content row’s ID. - Added
craft\base\ElementTrait::$title
for storing the element’s title, replacingcraft\base\ElementInterface::getTitle()
. - Added
craft\base\ElementInterface::getFieldValues()
, replacinggetContent()
. - Added
craft\base\ElementInterface::setFieldValues()
, replacingsetContent()
. - Added
craft\base\ElementInterface::setFieldValuesFromPost()
, replacingsetContentFromPost()
. - Added
craft\base\ElementInterface::setRawPostValueForField()
, replacingsetRawPostContent()
. - Added
craft\base\ElementInterface::setFieldValue()
. - All
$value
arguments on Field methods are now set to the prepared field value, with the sole exception ofprepareValue()
. - Added
craft\base\FieldInterface::prepareValueForDb()
, giving fields direct control over how their values should be saved to the database, without affecting the value stored on the element. (This replaces the protectedprepareValueBeforeSave()
method.) - Added protected
craft\base\Field::isValueEmpty()
which aidscraft\base\Field::validateValue()
in required-field validation. - Added
craft\helpers\DateTimeHelper::normalizeTimeZone()
. - Added
craft.getTimeZone()
for Control Panel JavaScript. - Added the
craft\craft\app\base\Savable
interface. Objects that implement it have control over howcraft\helpers\DbHelper::prepareValueForDb()
prepares them to be saved to the database. - Added
craft\craft\app\web\View::getBodyHtml()
, replacinggetBodyBeginHtml()
andgetBodyEndHtml()
.
- Updated Yii to 2.0.5.
- Element queries are no longer limited to 100 results by default.
craft\elements\db\ElementQuery::count()
now returns the total cached results, if set.craft\base\FieldInterface::validateValue()
is now responsible for required-field validation (and a basic is-empty check is included incraft\base\Field
).craft\base\FieldInterface::validateValue()
no longer needs to returntrue
if the value passed validation.craft\dates\DateTimeHelper::toDateTime()
’s$timezone
argument has been replaced with$assumeSystemTimeZone
. If set totrue
and if$value
doesn’t have an explicit time zone, the method will use the system’s time zone. Otherwise UTC will be used. (Defaults tofalse
.)craft\dates\DateTimeHelper::toDateTime()
now checks for atimezone
key when$value
is in the date/time-picker array format.craft\dates\DateTimeHelper::toDateTime()
now returnsfalse
instead ofnull
when an array without'date'
or'time'
keys is passed in.craft\dates\DateTime::createFromFormat()
no longer sets the$timezone
argument if left null, matching the baseDateTime
class’s behavior.- Date/time-pickers in the CP now explicitly declare that they are using the system time zone in their post data.
- Nested database transactions will now set savepoints within the master transaction, as MySQL doesn’t support nested transactions.
PluginClassName::getInstance()
will now return the singular instance of the plugin class.
- Removed
craft\dates\DateTime::format()
, so it no longer has a$timezone
argument and automatically sets the time zone on theDateTime
object.
- Fixed many, many bugs.
- Ported all new features and improvements that were introduced in Craft 2.4.
- The codebase now follows the PSR-2 coding style.
- Added support for
config/app.php
, which can return an array that will be merged with Craft’s core application config array. - Craft now looks for translation files at
translations/locale-ID/category.php
, wherecategory
can either be'app'
,'site'
,'yii'
, or a plugin’s handle. - All user-defined strings in the Control Panel (e.g. section names) are now translated using the
'site'
category, to prevent translation conflicts with Craft’s own Control Panel translations. - Craft now uses SwiftMailer to send emails.
- Added the ability for plugins to provide custom SwiftMailer transport options.
- Added
craft\helpers\DateTimeHelper::toIso8601()
, for converting a date (or date-formatted string) into an ISO-8601-formatted string. - Added
craft\helpers\DateTimeHelper::isIso8601()
, for determining if a given variable is an ISO-8601-formatted string. - Added
craft\helpers\DateTimeHelper::translateDate()
, for translating month and weekday names from English to the active application language. - Added
craft\helpers\DbHeleper::prepareDateForDb()
, which replaces the oldcraft\helpers\DateTimeHelper::formatTimeForDb()
. - Added
craft\behaviors\FieldLayoutBehavior
, which replacescraft\base\FieldLayoutTrait
, enabling a single class to have more than one field layout associated with it. - The localized date format used by JavaScript date pickers is now available from
Craft.datepickerFormat
. - Added the JavaScript method,
Craft.formatDate()
, for formatting a date (or date-formatted string) into a string using the same localized date format used by JavaScript date pickers.
- The
translationDebugOutput
config setting will now wrap strings with@
characters if the category is'app'
,$
if the category is'site'
, and%
for anything else. - Web requests are now logged to
storage/logs/web.log
. - Web requests that result in 404 errors are now logged to
storage/logs/web-404s.log
. - Console requests are now logged to
storage/logs/console.log
. - Template error handling now works similarly to how it does in Craft 2 when Craft is running in Dev Mode, where the template source is shown in the error view.
- Twig class names now link to their respective class reference URLs in the error view’s stack trace.
- The
registercss
,registerhirescss
, andregisterjs
tags can now be used as tag pairs. - The
registerassetbundle
,registerjs
,registerjsfile
, andregisterjsresource
tags now support anat
param for specifying the location on the page their HTML tags should be placed. (Possible values areat head
,at beginBody
, andat endBody
.) - The
registerjs
tag now supports anon
param for specifying when the JavaScript code should be executed. (Possible values areon ready
andon load
.) (Theat
andon
parameters are mutually exclusive.) - The
registercss
,registerhirescss
,registercssfile
,registercssresource
,registerjsfile
, andregisterjsresource
tags now support awith
param, which can be set to an object that specifies additional attributes on the resulting tags (e.g.with { rel: "stylesheet" }
). - The
t
filter now always defaults to translating the given string using the'site'
category unless it is otherwise specified (e.g.myString|t('pluginhandle')
). @craft/plugins/pluginhandle
aliases are now registered before Craft attempts to load a plugin’s primary class, making it easier for plugins to use custom class names.craft\base\Model::toArray()
now convertsDateTime
attributes to ISO-8601 strings.- Renamed
craft\helpers\AssetHelper::cleanAssetName()
toprepareAssetName()
. - Renamed
craft\helpers\DbHelper::prepObjectValues()
toprepareValuesForDb()
. - Renamed
craft\helpers\DbHelper::prepValue()
toprepareValueForDb()
. - Renamed
craft\events\Event::$performAction
to$isValid
to be consistent with Yii events. craft\helpers\DateTimeHelper::toDateTime()
will now returnfalse
if it is unable to convert$object
to aDateTime
object.craft\helpers\DateTimeHelper::toDateTime()
now supports ISO-8601-formatted dates.craft\helpers\DbHelper::prepareValueForDb()
now treats ISO-8601 strings as dates, and converts them to the MySQL date format.
- All the new
register*
tags must be all-lowercase now. (The oldinclude*
tags still work as they do in Craft 2, however they remain deprecated.)
- Removed
craft\helpers\DateTimeHelper::currentTimeForDb()
. - Removed
craft\helpers\DateTimeHelper::formatTimeForDb()
.
- Fixed a bug where Craft was not enforcing required entry titles and custom fields.
- Fixed a bug where it was not possible to create new Volumes on Craft Personal/Craft Client installs.
- Fixed an error that occurred when using the
type
param when querying for Matrix blocks. - Fixed an “IP address restriction” error that prevented the Debug toolbar from showing up for some people.
- Fixed a PHP error that would occur when converting models without
$dateCreated
or$dateUpdated
properties to an array. - Fixed a PHP error that occurred when resetting a password.
- Fixed a PHP error that occurred when sending an activation email.
- Fixed a PHP error that occurred when saving an entry with validation errors, or when loading a draft for an entry, if the entry had any Matrix fields.
- Fixed a PHP error that occurred when editing an entry draft or version.
- Fixed a MySQL error that occurred when saving new image transforms.
- Fixed a MySQL error that occurred when saving a section with entry versioning disabled.
- Fixed
craft\web\View::registerHiResCss()
, and the{% registerhirescss %}
tag. - Fixed a bug that prevented user and email settings from being remembered.
- Fixed a JavaScript error that occurred on pages with fields that could be toggled by a checkbox.
- Plugins can now add an array of Twig extensions from the
addTwigExtension
hook.
- Fixed a PHP error that occurred when installing Craft or validating URLs if the Intl extension wasn’t loaded.
- Added a
withPassword
criteria parameter to User queries, which includes the users’ hashed passwords in the query and sets them on the resulting User models. - Added a
$setToSystemTimeZone
argument tocraft\helpers\DateTimeHelper::toDateTime()
, which will set the resultingDateTime
object to the system’s Timezone setting (defaults totrue
). - Added the
convertFilenamesToAscii
config setting.
- The Debug toolbar no longer requires Dev Mode to be enabled.
- URL validation now accounts for URLs that include environment variables.
- URL validation now allows international domain names.
contentTable
is now a reserved field handle.- Craft is now distributed with a
public/cpresources/
folder, which should be set with writable permissions. - Craft now ensures that the public Resources folder exists and is writable at a much earlier stage so it can give a more helpful error message.
- Fixed a bug where many locales had the wrong display name in the CP if the Intl extension was not loaded.
- Fixed an error that occurred when saving a Volume using Craft Personal or Craft Client.
- Fixed an error error that occurred when validating a URL that included an environment variable.
- Fixed a bug where some dates were being output with the wrong timezone.
- Fixed an error that occurred when saving a Date/Time field set to only show the timepicker.
- Fixed a UI glitch where the bottom shadow of entry Save buttons would span the full width of the grid column if entry versioning was disabled or unavailable.
- Fixed a bug where the Min Build Required error message was getting HTML-encoded.
- Fixed a couple errors in that could occur if Craft didn’t receive the expected response from its web service.
- Fixed an error that occurred when attempting to log in with the wrong password multiple times.
- Fixed a bug where users would become permanently locked when their cooldown period had expired.
- Fixed a “Craft Client is required” error when editing entries in Craft Personal.
- Fixed an error that occurred after an Admin entered their password in order to change a user account’s email/password.
- Fixed a validation error on the New Password field if a user attempted to update their email address but didn’t want to change their existing password.
- Corrected the default config paths in the comments of
config/db.php
andconfig/general.php
. - Fixed a bug that resulted in the Updates page never getting past the “Checking for updates” step when an update was available.
- Added support for registering plugin resources via
craft\web\View::registerCssResource()
andregisterJsResource()
. - Added
craft\base\Element::getStructureId()
,setStructureId()
, andresolveStructureId()
.
- Drastically reduced the likelihood of importing a database backup with a falsely-identical schemaVersion as the files stored in
storage/runtime/compiled_classes/
.
- Updated the sample config files to use PHP 5.4’s short array syntax.
- Fixed a PHP error that would occur throughout the Control Panel when a new Craft update was available and its info was cached.
- Fixed a 404 error for jquery.placeholder.min.js that occurred on several pages in the Control Panel.
- Fixed a PHP error that occurred when formatting dates if the Intl extension wasn’t loaded.
- Fixed a PHP error that occurred when opening the category selection modal on a Categories field.
- Fixed a PHP error that occurred when saving an entry with a Categories field.
- Fixed a PHP error that occurred when searching for tags within a Tags field.
- Fixed a PHP error that occurred when using Date/Time fields configured to only show the timepicker.
- Fixed a bug where asset bundles wouldn’t get re-published if a file within one of its subdirectories was created or updated.
- Fixed a bug where database backups would get stored in
storagebackups/
instead ofstorage/backups/
. - Fixed a bug where the Min Build Required error message had encoded HTML.
- Completely rewritten and refactored codebase, powered by Yii 2.
- Improved internationalization support with PHP’s Intl extension and Stringy.
- Plugins are now loaded as Yii modules.
- Asset Sources are now called Volumes, and plugins can supply their own Volume Types (made easy with Flysystem).
- It is now possibly to customize the SQL of element queries, and there are more choices on how the data should be returned.
- Included the Yii 2 Debug Extension.