# 2.3.0 (2009-02-23) ## Upgrading ### Translatable Problems **Don't use Translatable for multilingual database content. Don't upgrade to 2.3.0 if you're already using Translatable.** The [Translatable extension](/developer_guides/i18n) is currently marked as unstable for the initial 2.3 release. **If your site uses more than one language for page content, don't upgrade to this release.** We're working on bugfixes which will be contained in a minor 2.3.x release soon. Check our [releaseannouncements](http://groups.google.com/group/silverstripe-announce) for updates on Translatable bugfixes. ### BasicAuth disabled on test sites by default Basic auth isn't enabled by default on test sites. If you need this, put this in your _config.php if(Director::isTest()) BasicAuth::enable(); ### /silverstripe and /cms no longer work as aliases to /admin Removed certain URL aliases for CMS interface to allow for common page URLs like "silverstripe" or "cms". Please use /admin as the main URL to access the CMS. See http://open.silverstripe.com/ticket/3267 ### SiteTree Access tab now lets you select multiple groups In order to do this, `SiteTree->ViewersGroup` and `SiteTree->EditorsGroup` have been changed from has_one relations to many_many relations. Your group-assignements for "Who can view this page" and "Who can edit this page" should be automatically migrated upon calling `dev/build`. See [#2847](http://open.silverstripe.com/ticket/2847) ### Newsletter moved into new module Newsletter functionality has been moved into its own module called **[newsletter](http://addons.silverstripe.org/add-ons/silverstripe/newsletter)**. If you were previously using this as a feature out of the box with SilverStripe, then you will need to download the userforms module to continue using it. If you **don't** require the functionality, it's safe to delete these database tables: * Newsletter * NewsletterType * SubscribeForm * UnsubscribeRecord #### auth_openid removed from default installation The auth_openid module has been removed from default installation. Please install the module separately from [silverstripe.org](http://silverstripe.org/auth-openid-module/) ### GenericDataAdmin and RelatedDataEditor moved into new module GenericDataAdmin functionality has been moved into its own module. If you were previously using this as a feature out of the box with SilverStripe, then you will need to download this module to continue using it. ### User Defined Form moved into new module User Defined Form has been moved into its own module called **[userforms](http://addons.silverstripe.org/add-ons/silverstripe/userforms)**. If you were previously using this as a feature out of the box with SilverStripe, then you will need to download the userforms module to continue using it. //Important note: If you **do** have an existing page of User Defined Form type in your CMS site tree, it's best to install the module first as shown above. If you run dev/build?flush=1 without installing userforms, you'll lose the User Defined Form page type until you install it then run dev/build?flush=1.// If you **don't** require the User Defined Form functionality, it's safe to delete these database tables: * EditableCheckbox * EditableCheckboxOption * EditableDropdownOption * EditableEmailField * EditableFileField * EditableFormField * EditableMemberListField * EditableRadioOption * EditableTextField * SubmittedFileField * SubmittedForm * SubmittedFormField * UserDefinedForm * UserDefinedForm_Live * UserDefinedForm_versions ### PostBackup PostBackup has been moved into a module. See [postbackup module](http://open.silverstripe.com/browser/modules/postbackup/trunk). ### /db/build/?flush=1 is now called /dev/build Flushing the manifest with `?flush=1` doesn't need to be explicitly added. ### Core API Changes * Removed ViewableData->setVal(), use ViewableData->setValue() === * Removed Director::isLiveMode(), use Director::isLive() === * Removed DataObjectSet->append(), use DataObjectSet->push() or DataObjectSet->merge() * Removed Controller->LinkTo(), use Controller->join_links() * Removed DataObject->getLastWriteFields(), use DataObject->getChangedFields() * Removed Convert::raw2attr(), use Convert::raw2att() * Removed Member->isAdmin(), use Permission::check('ADMIN') * Removed Debug::warning(), use user_error("your message", E_USER_WARNING) * Removed SiteTree->canView_page(), Use instance-specific SiteTree->canView() instead by checking for `$this->ID`. * Deprecated URL parameter ?buildmanifest=1 (please use ?flush=1) * i18ntextcollector is executed from a new URL. Use http://mysite.com/dev/task/i18nTextCollectorTask instead of http://mysite.com/i18ntextcollector ### Director::addRules() If you have made your own custom director rules with `Director::addRules`, you will need to add a double-slash into the rule, to separate the part of the URL that specifies "this is how I get to this controller" from the part that specifies "these are arguments to the controller". In other words, change this: :::php Director::addRules(50, array( 'admin/ImageEditor/$Action' => 'ImageEditor', )); To this: :::php Director::addRules(50, array( 'admin/ImageEditor//$Action' => 'ImageEditor', )); ### Decorators * Renamed DataObjectDecorator->extraDBFields() to extraStatics() (see [r65065](http://open.silverstripe.com/changeset/65065)) * DataObjectDecorator->updateCMSFields() is now called from DataObject->getCMSFields(), instead of only SiteTree instances * Changed return values for DataObjectDecorator->updateCMSActions() to FieldSet, rather than an array. ### Data Model * Removed Datetime class, use SSDatetime instead (it was conflicting with PHP 5.2 integrated classes) * Removed Text->Att(), use Text->ATT_val() instead ### Forms * Removed NoScriptField, use LiteralField * Removed EncryptField, use PasswordField * Removed NamedLabelField, use LabelField * Removed NoScriptFormAction, use unobtrusive scripting * Removed FormField->setExtraClass(), use FormField->addExtraClass() * Removed deprecated ComplexRequiredFields, `RequiredFields` and custom javascript instead * If you have created your own FormField classes, FormField::performReadonlyTransformation() and FormField::performDisabledTransformation() must return new form fields, e.g., cloned instances, or unit tests will fail. ### Templates * '''$Top''' in templates has changed its behaviour; if you call $Top from inside a template that is rendered separately (eg, a Form template), it will point to the top element of that template execution (in this case, the Form object) rather than the top element of the outermost template (which would presumably be the page in question). This was a bug that we have fixed, but some people may rely on it. See http://open.silverstripe.com/ticket/2781 * A `` element has been added before any `
` in all SilverStripe forms. SearchForm.ss and Form.ss are where it has been added. This now validates the form HTML for W3C compliance. Please verify that your forms visually look okay after upgrading. Legend can be set by calling ''->setLegend('my legend here')'' on your Form object. ### CMS menu API We have deprecated the LeftAndMain menu customisation API. * Don't set any menu-item static variables any more. * For the most part, you won't need to add anything to _config.php to add CMS menu items; just define the static variables `$menu_title` and `$url_segment` on your `LeftAndMain` subclasses. * If you want to add a menu item that's not a subclass of `LeftAndMain` (eg, help or a link to a webstats package), use `CMSMenu::add_menu_item()` * To remove a menu item, use `CMSMenu::remove_menu_item()`. It identifies items by classname rather than arbitrary $code value. ### ContentNegotatior is now disabled by default, mostly The ContentNegotatior system was a bit of voodoo that confused a lot of people, so we have disabled it by default for regular templates. It will still enabled by default for templates that include the `` header, because these are the only templates that benefit from it significantly. If you want to enable it for your HTML4 templates, then you can do so by calling `ContentNegotiator::enable()`. Note also that the DOCTYPE altering, which was a frequent cause of pain, only executes if your original template had the `` header. ### Other API Changes * Removed deprecated File::loadallcontent(), use Upload class * Image->URL returns relative instead of absolute URL. Use Image->AbsoluteURL instead. * Moved DataReport and SQLReport into the ecommerce module. If you're using these classes, please see the [ecommerce modules](http://addons.silverstripe.org/add-ons?search=ecommerce&type=&compatibility%5B%5D=3.1). ### Default mysite/_config.php The installer includes a default configuration file: *mysite/_config.php*. If you have already have your own *mysite/_config.php*, you can safely keep your own version and disregard the new file. ### Default validators for Form instances (PHP and JavaScript) Enforcing usage of a Validator instance in Forms if its not explicitly passed to the Form constructor. By default a new RequiredField instance is used without any fields marked as required. This was necessary because some FormField implementations rely on their validate() method, sometimes as a wrongly placed processing hook, but mostly for security reasons. One example are file extension checks in FileField subclasses. In most cases this won't have any effect on existing forms, although you might get additional JavaScript dependencies like Validator.js and behaviour.js. If you want to disable JavaScript validation across forms, add the following to your _config.php: :::php Validator::set_javascript_validation_handler('none'); See http://open.silverstripe.com/changeset/69688 ## New Features * ![rev:71761] Allow combined files to be disabled * ![rev:70697] CRM Security with two levels: viewable and writeable. * ![rev:70422] added silverstripe version number to meta generator tag * ![rev:70142] add permission control for AddForm and EditForm * ![rev:69687] added Smiliey support to BBCode / forum. Now BBCode supports :) :P :D :( 8-) and :^). Yays for icons. Should move from BBCodeParser to TextParser so its available in tinymce but this will do for the forum * ![rev:66163] #1531 - Allow moving files in root assets file (hamish) * ![rev:65904] #1614: Allow use of admin/addpage?ParentID=(ID)&PageType=(Class) url to quick-add pages * ![rev:65690] #594: Added javascript-on-demand support * ![rev:65689] #594: Added javascript-on-demand support * ![rev:65688] #594: Added javascript-on-demand support * ![rev:65555] #2767 wakeless: Allow popuplation of non-DataObject tables with YamlFixture * ![rev:65351] merged back patch for image editor. Currently completely broken on trunk this patch does nothing to fix it sadly. I think its a prototype thing * ![rev:65095] Added CMSMenu and CMSMenuItem and adjusted existing LeftAndMain subclasses to use new notation.See #2872 (thanks to hamish for the patch!) * ![rev:64881] Making DataObject attributes translatable through i18n class, e.g. $db and all relation statics. Use DataObject->fieldLabels() to access translated attributes. * ![rev:64877] Added JavaScript unit tests with jQuery QUnit. Can be viewed similiarly to PHPUnit tests through dev/jstests URL. Uses an `