Feature Changes

CMS image alignment changes

Image alignment elements have been changed slightly. There are no longer any <DIV> elements created with the images using the insert image toolbar in the CMS.

All of these selectors in your typography.css are affected:

  • div.image.left
  • div.image.right
  • div.image.leftAlone
  • div.image.center

They need to be changed to the following (respectively):

  • img.left
  • img.right
  • img.leftAlone
  • img.center

Here's an example of how the default Blackcandy theme was changed:

http://open.silverstripe.org/changeset/75917/themes/blackcandy/branches/2.3/blackcandy/css/typography.css

Translatable Datamodel

The datamodel for the Translatable extension was changed from multiple language tables to multiple rows for each translated record in the original table. We've also introduced the concept of “Translation groups”, which means not every translated record has to exist in a “master language”. Please review our updated documentation on how to enable Translatable.

If you are upgrading an existing database with existing translations, you'll need to run our Migration Script before using the database.

For in-depth discussion of the schema changes and translation groups, please refer to our developer mailinglist: 1 and 2.

Translatable property selection

It is no longer possible to exclude certain properties on a DataObject from being translatable. This is a limitation by our database schema choice. See discussion on our mailinglist and ticket #3722.

Translatable URLs

Every page is now forced to have a unique URL, different languages can't be switched by appending a ?lang=xx property any longer. Languages don't have to be set in sessions or cookies, as every request is able to determine the language for the remaining site by inspecting the URL. Unique URLs are enforced because of SEO concerns, problematic caching on proxies, browser and framework-level, as well as difficult debugging with session states. See discussion on our mailinglist.

API Changes

Important, but simple, ModelAdmin change

The configuration statics for ModelAdmin have been changed from protected to public, so that Object::get_static() can access them. In particular the following static variables have been changed.

  • ModelAdmin::$managed_models
  • ModelAdmin::$collection_controller_class
  • ModelAdmin::$record_controller_class
  • ModelAdmin::$model_importers
  • ModelAdmin::$page_length

Because of this, you will need to change the static definitions in your ModelAdmin subclasses. For example, you should change this:

class MyCatalogAdmin extends ModelAdmin {
 
  protected static $managed_models = array(
      'Product',
      'Category'
  );
 
  ... 
}

To this:

class MyCatalogAdmin extends ModelAdmin {
 
  public static $managed_models = array(
      'Product',
      'Category'
  );
 
  ... 
}

Deprecated Translatable::enable()

* Use Object::add_extension('SiteTree','Translatable) instead of Translatable::enable() * Use Object::remove_extension('SiteTree','Translatable) instead of Translatable::disable()

  • Use Object::has_extension('SiteTree','Translatable) instead of Translatable::is_enabled()''

Deprecated Translatable "lang" methods

Deprecated New
get_homepage_urlsegment_by_language() get_homepage_urlsegment_by_locale()
is_default_lang() is_default_locale()
set_default_lang() set_default_locale()
get_default_lang() get_default_locale()
current_lang() current_locale()
set_reading_lang() set_reading_locale()
get_reading_lang() get_reading_locale()
default_lang() default_locale()
get_by_lang() get_by_locale()
get_one_by_lang() get_one_by_locale()
isTranslation() <no replacement>
choose_site_lang() choose_site_locale()
 
upgrading/2.3.2.txt · Last modified: 2010/05/05 23:38 (external edit)

Please use comments for notes, tips and corrections about the described functionality.
Use the Silverstripe Forum to ask questions.

blog comments powered by Disqus
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Creative Commons LicenseSilverStripe Documentation by SilverStripe is licensed under a Creative Commons Attribution 3.0 New Zealand License.
Based on a work at doc.silverstripe.com
Recent changes RSS feed Driven by DokuWiki