Scrivito 0.60.0 Release Notes

Items added or extended after the release of RC 1 are marked with [0.60.0.rc2].

Breaking changes

As of Scrivito SDK 0.60.0, the minimum Ruby version required is 2.1.0. Ruby 2.0.0 is no longer supported. Ruby 2.1.0 was released over a year ago and is significantly faster than older Ruby versions. We recommend using the latest patch level of Ruby 2.1.5 or the newer Ruby version 2.2.1.

CMS-based object classes maintained using ObjClass are now deprecated because they are no longer required. Instead, model classes in the Rails application are used for defining CMS object classes and their attributes.

You can still use ObjClass to retrieve the object classes defined in a working copy, or to determine the attributes of a particular CMS-based object class. However, you cannot create or update CMS-based object classes anymore. There is a guide on migrating from CMS object classes to Rails model classes in a single step by means of the provided migration tool.

The widget attribute type has been renamed to widgetlist to better reflect that an attribute of this type may contain any number of widgets. Also, the text field type is now deprecated. Please use string instead.

In addition to migrating the object classes of your CMS content, the migration tool converts the attribute types mentioned above.

Obj#binary? now only returns “true” if the CMS object has a binary attribute named “blob”

The following methods have become useless after tearing down CMS-based object classes. They are deprecated:

  • Obj#obj_class always returns nil.
  • Widget#obj_class always returns nil.
  • Workspace#obj_classes always returns an empty collection.

Improvements

  • Overlapping menu handles are often hard to recognize visually. To help avoiding them, the Scrivito SDK now detects overlapping menu handles when they are clicked. This causes a warning to be printed to the JavaScript console: Whenever the Scrivito SDK triggers a JavaScript warning (e.g. a deprecation warning or on the occasion of overlapping menu handles), an indicator shows up on the Scrivito panel: Overlapping menu handles are only detected and the warning indicator is only shown if the Rails application is running in the “development” environment. Thus, editors won't be confused by warnings they cannot turn off or whose cause they cannot remedy.
  • Updating a working copy may reveal changes to content that was altered in another (now published) working copy. In such situations, editors are now immediately notified to make it clearer that actions are required to resolve the conflicts.
  • The error which is shown if an editor tries to upload a file while conflicting filters are selected is now displayed using a styled modal dialog instead of a browser alert.
  • We merged the (in-place) text editor into the string editor. The unified string editor assumes that text for which the “white-space” CSS property is “pre” should be edited in a context allowing newlines. You can use data-newlines=true and data-newlines=false to enforce the corresponding input mode. data-editor=text is still supported but deprecated. Please use data-editor=string (plus, optionally, data-newlines=true) instead. [0.60.0.rc2]
  • We adjusted the behavior of the “Add” button of the reference list editor. Clicking it now causes the Content Browser to open without the references contained in the list being selected. Items selected in the Content Browser are now appended to the reference list.
  • The inspector of the Content Browser now has a small recycle bin icon that allows you to delete the item being viewed. Both this new button and the one for deleting the selected items cause a confirmation dialog to be displayed before performing the deletion.
  • The Content Browser now lets you sort items by their date of last change, in ascending or descending order.
  • HTTP connections established and used by the SDK are now more robust. Previously, the SDK retried connecting only on specific errors such as Errno::ECONNREFUSED or Timeout::Error. Now, the SDK tries to reconnect if a StandardError such as OpenSSL::SSL::SSLError, Errno::ECONNREFUSED or Timeout::Error occurs.
  • Inserting a new widget into a widget field in which only a single widget type may be used now directly inserts a widget of the given type. Previously, a dialog for choosing from a single option would open. If only one valid widget class exists, the menu item text that usually reads “Insert widget” is replaced by what the description_for_editor callback method of this valid widget class returns. The widget classes to be valid inside a widget field can be specified by means of the valid_widget_classes_for method.
  • When your application is running in the “development” environment and you are editing content in place, you can now always extract Scrivito object IDs from HTML links. Previously, links pointing to the root object or to permalinked objects didn't include the ID of the target object. They now do because Scrivito renders the ID variant of the path for all CMS objects. Examples:
    /             /9e87c6bf5a4c32d1/root_slug
    /a_permalink  /0bc1a2e3afc456a7/a_slug
  • It is now possible to iterate over all the widgets of a CMS object:
    Obj.root.widgets.each do |widget|
      puts widget.id
    end
  • When deleting a page, the Scrivito SDK will now redirect to the parent page if it exists. If not, the SDK redirects to the root page. Previously, the redirection target was always the root page.
  • When inserting a widget, it is no longer placed underneath the widget whose menu was used. Instead, it is positioned where the latter widget was, i.e. directly where the insertion command was issued.
  • The new Widget.valid_container_classes method lets you restrict the widget container classes a widget of a particular class may inhabit:
    class TabWidget < Widget
      def self.valid_container_classes
        [TabGroupWidget]
      end
    end
  • The new request.for_scrivito_user(test_user) test method allows you to set the user of a request to a specific Scrivito::User.
  • The migrate:install Rake task that copies the migrations included in gems into the application was removed. Such migrations were used to define the CMS object classes the gems relied on. This is no longer required because CMS-based object classes don't exist anymore.
  • You can now prevent editors working in place from creating CMS objects and widgets of particular types, e.g. error pages or outdated widgets. Such types can be suppressed in the page and widget browser using the hide_from_editor class method. This method only affects in-place editing, not the API, meaning that custom code used for creating objects or widgets based on hidden classes continues to work. [0.60.0.rc2]

Bugfixes

  • Application routes no longer occasionally interfere with the Scrivito UI.
  • The “Insert widget” menu item is now disabled for widget fields to which no widgets of any type can be added.
  • Fixed a problem that caused expiring values to be forwarded to the second level cache.
  • All kinds of external links are now functional again. Previously, some external links could not be opened if the user was logged in.
  • When logged in and editing content, the query and fragment of internal links are now preserved. Previously, for testing such internal links, it was required to publish the working copy and to log out.
  • If the valid_widget_classes method of a widget returned nil, the valid_widget_classes method of the page containing the widget was used as a fallback when adding widgets. This behavior has been adjusted so that it conforms to similar callbacks, meaning that the valid_widget_classes method of a widget class no longer falls back to the corresponding page class method.
  • A bug was fixed that caused an “S3 responded with 403” error when using one of the binary_content_type, content_type, binary_content_length, or content_length methods.
  • Duplicate MIME type entries have been removed from the Content Browser configuration.
  • The editors for enum and multienum attribute values now automatically save their content on change. [0.60.0.rc2]
  • We fixed a Rails FileStore bug that caused paths to be generated that were longer than accepted by the file system. [0.60.0.rc2]