Updates & Release Notes

Scrivito 1.8.1 Release Notes

posted by Andreas


This is a bugfix release that solves two widget-related issues, and one referring to the Content Browser.

  • Restoring a widget that originally had a direct subwidget (which was deleted) no longer causes an error.
  • When restoring a widget, attributes that were originally empty are now cleared.
  • The Content Browser now applies the “base_query” if provided.

Sorry for the inconvenience these bugs might have caused. Please update your Gemfile and run “bundle.”

Thank you for using Scrivito!

Scrivito 1.8.0 Release Notes

posted by Andreas


Content Browser

The Content Browser is significantly faster now because it loads much more data in parallel. Just watch the main area while image thumbnails are being displayed!

Also, the multi-selection mode is now directly accessible in the user interface. It lets you select several items instead of just one.

This comes in handy if, for example, you want to delete a bunch of outdated images or the like. The multi-selection switch becomes available if the Content Browser is opened via the sidebar. Note that toggling the mode deselects all items.

More responsive changes list with better sorting

We've improved the look and feel of the changes dialog that lets you comfortably access the modified CMS objects of a working copy. Not only are the changes loaded much faster now, the not yet visible ones also show up continuously and smoothly as you scroll down.

The list of changed CMS objects can now be sorted using a drop-down menu instead of column headers. There are three sort criteria, last change date, object type name, and modification type. For each of them, both sort directions (ascending and descending) are available.

Configurable minimum request timeout

The Scrivito SDK fetches the content to display from the Scrivito backend located in European data centers. In case the content is requested from a far-off location, the response times might be longer than the SDK permits, resulting in a failure to load the data in time. To remedy this, you can now configure the minimum timeouts to apply to connections to the Scrivito API endpoint:

# config/initializers/scrivito.rb Scrivito.configure do |config| # … config.minimum_open_timeout = 1.0 config.minimum_ssl_timeout = 1.5 config.minimum_read_timeout = 1.0 # … end

These timeouts override shorter timeouts specified on a per-request basis, but not longer ones.

Other improvements

  • The Content Browser now ignores CMS objects of the MigrationStore type. Such objects are used by the SDK internally to identify migrations that have already been run.
  • The Scrivito::Workspace.use('workspace title') method now fails with a proper error message if there is no working copy with the given title. Previously, it failed with an unclear error message.

Scrivito 1.7.0 Release Notes

posted by Andreas


Rails 5.0 support

This release of Scrivito adds support for Rails 5.0 to the SDK. Rails 5.0 was released this summer and includes numerous speed improvements, refactorings and new features (see the Rails 5.0 overview for details).

Scrivito continues to support Rails 4.2, so in case you don't want to upgrade to Rails 5.0 yet, you can still update Scrivito to the latest version. A simple bundle update scrivito does the trick. There is one small exception: We no longer support the json gem in versions prior to 1.8.3. Previously, json 1.7.7 or newer was supported.

We worked hard to support both Rails versions and to facilitate a smooth transition from Rails 4.2 to 5.0. If you want to upgrade your application to Rails 5.0, please first upgrade to Scrivito 1.7.0 or later, then update Rails itself. See the Guide for Upgrading Ruby on Rails for a detailed list of changes between Rails 4.2 and 5.0.

We continue to support Ruby 2.1. Rails 5.0, however, requires Ruby 2.2.2 or newer. Since Ruby 2.1 has already reached a state in which it only receives security fixes, it is highly advised to upgrade to a newer Ruby version (see the Support plans for Ruby 2.0.0 and 2.1 for details).

Other improvements and changes

  • Due to optimizations regarding the saving indicator, adding widgets to and removing them from pages using the UI is now performed faster.
  • Scrivito has been optimized with respect to connections to the backend, which are now established in advance. Depending on your connection quality, this can save 100 ms or more per request during UI initialization.
  • The documented signature of scrivito_cache has been corrected: scrivito_cache should not be called with options=nil.
  • Due to unexpected behavior in the “Deletions” view mode, the Content Browser is now disabled in this mode.
  • Assets are now compiled deterministically into the “scrivito_app_extensions.js” file, yielding the same JavaScript file independently of the host OS or machine.
  • We fixed a bug that caused the changes list to redirect to the wrong URL for non-binary CMS objects after removing the /:id route.
  • In rare cases, opening a widget or navigation menu caused an error. This bug has been fixed.
  • The Content Browser is now able to handle different error situations in which an image cannot be displayed. If, for example, an image cannot be transformed due to its type or if the image is too large, the Content Browser now displays an appropriate thumbnail with an explanatory message.

    Scrivito 1.5.5 and 1.6.1 Release Notes

    posted by Dave


    In some cases, the referencelist attribute editor was unable to process references with purely numeric IDs.

    According to our in-house mathematician, Scrivito users had a 0,054% chance to hit this issue. The number increased with the size of the referencelist. After fixing the issue, the chance of a clash is most probably zero.

    Please update your Gemfile and run “bundle.”

    Thank you for using Scrivito!

    Scrivito 1.4.3 and 1.5.4 Release Notes

    posted by Andreas


    These releases make Scrivito compatible with jquery-ui-rails 6.

    On November 29, 2016, jquery-ui-rails 6 has been released. Unfortunately, Scrivito was incompatible with this new major version.

    Sorry to everyone who has been bitten by this. Please update your Gemfile and run “bundle.”

    Thank you for using Scrivito!

    Scrivito 1.6.0 Release Notes

    posted by Andreas


    Introducing the sidebar

    Over the past months, as we added notification icons and the display size switch to the Scrivito panel, we realized that the panel has become too small to nicely accommodate any further controls. So we complemented it with a sidebar for better accessibility and unique presentation of the available functions and pieces of information.

    The working copy menu as well as all the buttons and notification icons in the top right corner of the Scrivito panel, except the page menu, have moved to the sidebar. (The page menu icon has been redesigned, too, by the way.)

    To give you full control over the amount of space available for editing content, the sidebar can be minimized, left open, or hidden together with the Scrivito top panel. In the minimized state, there are four main buttons each of which represents a distinct set of functions: the Content Browser, working copies, notifications, and display sizes. The Content Browser is opened directly, but clicking one of the other buttons opens the sidebar, revealing the functions included in the corresponding set. Clicking the button once more minimizes the sidebar again.

    The sidebar is automatically opened and closed as the mouse pointer enters or, respectively, leaves it unless the button of the currently open section is clicked to close it. In this case, hovering temporarily has no effect.

    At the bottom right, there is a button for hiding the sidebar as well as the top panel. In this state, the only visible element is this button which, however, looks slightly different. Click it to have the panel and the sidebar displayed again.

    We also redesigned the mode switch to make the selected mode better distinguishable from the other ones.

    In the “Changes” position, the switch now has a meaningful background color reflecting the selected “Changes” mode: green for “Additions”, red for “Deletions”, and blue for “All changes”.

    We hope you like the new sidebar as much as we do!

    Better confirmation prompt on deletion

    When deleting a CMS object, and this object is referenced by other objects via a link, linklist, reference, or referencelist attribute, or via an <a href> or an <img src> tag inside an html attribute, Scrivito now lets you know this, and also which objects contain these links.

    If you're unsure about a CMS object referencing the one to delete, just click the given description to open this referencing object in the Content Browser.

    The dialog uses the description_for_editor callback of the model classes of the referencing objects, making it possible to have the page titles displayed, for example.

    Improved reference attribute editor

    Users can now clear single references using a delete button.

    To make this button appear in a reference editor, specify the data-scrivito-editors-allow-delete=true option in the call to scrivito_tag:

    <%= scrivito_tag(:div, widget, :my_reference, data: { scrivito_editors_allow_delete: true }) %>

    Introducing numeric attribute types

    Scrivito has two new attribute types, integer and float, that make it easier to handle values of these types. You no longer need to use strings to represent them, validate these strings and convert them to a numeric type. Also, sorting objects by true numbers yields properly sorted lists as opposed to sorting them by numbers represented as strings.


    First, add the desired attributes to the model class concerned:

    class SomePage < Obj attribute :float_attribute, :float attribute :integer_attribute, :integer end

    To have the attribute values displayed and make them editable in a details view, render them as shown below.

    <%= scrivito_details_for("Float attribute") do %> <%= scrivito_tag(:div, obj, :float_attribute) %> <% end %> <%= scrivito_details_for("Integer attribute") do %> <%= scrivito_tag(:div, obj, :integer_attribute) %> <% end %>

    For both types, the provided number editor supports a range and a step size you can specify using the min, max, and step options:

    <%= scrivito_details_for("Float attribute") do %> <%= scrivito_tag(:div, obj, :float_attribute, {data: { scrivito_editors_min: 0, scrivito_editors_max: 10, scrivito_editors_step: 0.1 } }) %> <% end %>

    Syntactically invalid values (e.g. “2oo”) and values not in the given range are not stored and marked as an error.

    Updated slider editor

    The slider editor now supports these new attribute types. Here is an example of a slider for durations ranging from 1 to 10 seconds, in steps of 0.5 seconds:

    scrivito_tag(@obj, :float_duration_seconds, { data_scrivito_editors_min: 1, data_scrivito_editors_max: 10, data_scrivito_editors_step: 0.5, }, editor: :slider)

    Semi-automatic conversion of numbers stored as strings

    If you have been using string attributes for representing numbers, you can simply change the type of these attributes to integer or float in the model classes without having to migrate the attribute values, i.e. change their format. When retrieving strings as values of integer or float attributes, Scrivito automatically converts them to the corresponding type.

    However, converted integer and float attribute values are not automatically written back to the attributes, causing them not to be considered in searches.

    CMS objects now have a backlinks method (via their base class, BasicObj). backlinks searches for CMS objects containing one or more attributes linking to a given CMS object. So the search returns the CMS objects in which at least one html, link, linklist, reference or referencelist attribute links to the CMS object.

    For rendering such backlinks on details views, Scrivito includes a new helper, scrivito_backlinks:

    <%= scrivito_details_for "What links here?" do %> <%= scrivito_backlinks @obj %> <% end %>

    The helper generates HTML markup that fits in with the general look and feel of Scrivito's user interface.

    Establishing CMS object associations

    The Scrivito SDK now includes helpers for establishing CMS object associations in the style of Active Record Associations. Three new methods, belongs_to, belongs_to_many and has_many, allow you to define one-to-one and one-to-many associations between CMS objects. See Modeling Object Associations for examples and further details.


    The changelog reflects minor improvements and bugfixes that were made in addition to the changes listed above.

    Scrivito 1.5.3 Release Notes

    posted by Andreas


    This is a bugfix release that addresses an issue with <script> tags contained in html attributes that are edited in place:

    • In Scrivito 1.5.0, we reimplemented how values are stored while content is edited in place. During this reimplementation, we also reworked the part that handles html attributes. This change introduced a bug causing <script> tags to be removed from html attributes prior to saving. This release fixes this issue so that <script> tags are now preserved again.

    Sorry for the inconvenience this bug might have caused. Please update your Gemfile and run “bundle.”

    Thank you for using Scrivito!

    Scrivito 1.5.2 Release Notes

    posted by Andreas


    This is another bugfix release. It fixes a minor issue regarding in-place editing:

    • Scrivito's in-place editing interface now again stores HTML tags with missing attributes, e.g. <a>Link</a> or <img>.

    We're sorry for the inconvenience this bug might have caused. Please update your Gemfile and run “bundle.”

    Thanks again for using Scrivito!

    Scrivito 1.5.1 Release Notes

    posted by Andreas


    This release fixes three bugs that were found in Scrivito's editing interface:

    • The “Duplicate page” command caused the resulting new page to have the same path as the source page.
      Now, the duplicated CMS object shares the parent path of the source, but has a different and unique last path component.
    • In the “last added” view of the Content Browser, changing the sort order did not set it correctly.
      Changing the sort order (intentionally) still doesn't affect the order of the last added items, but now it is applied correctly after selecting a different filter.
    • We fixed an inconsistency with the attributes passed to a default_for block.

    We're sorry for the inconvenience these bugs might have caused. Please update your Gemfile and run “bundle.”

    Thank you for using Scrivito!

    Scrivito 1.5.0 Release Notes

    posted by Andreas


    Editors now have access to the target property of link and linklist fields, making it possible to specify whether a link should be opened in a new window. Note that your app needs to render this property for it to have an effect:

    link_to(link.display_title, scrivito_path(link), target: link.target)

    Finding associated content

    There are two new search operators, links_to and refers_to that let you find CMS objects linking to or referencing specific CMS objects.


    links_to is a workhorse that searches all attributes able to handle links or references, including those contained in widgets. You can use it, for example, to determine whether an image that has been uploaded is included anywhere in your content, or in pages of a specific type:

    # Find CMS objects pointing to 'my_image' through any link or reference Obj.where("*", :links_to, my_image) BlogPostPage.where("*", :links_to, [my_img1, my_img2])

    Of course, links_to can be used for more than just that. You can also, for example, determine the pages that are or aren't linked by other pages, etc.


    The refers_to operator, on the other hand, is specialized in finding the CMS objects referencing specific objects via a specific reference or referencelist attribute. So object associations established using attributes of these types are no longer unidirectional but bidirectional, making it possible to implement all those use cases in which reverse lookups are required. For example, in a setting in which blogposts are equipped with a referencelist attribute for associating them with one or more authors represented as individual CMS objects, you can now look up the blogposts that were (co)produced by a specific author:

    # Find all objects of the 'BlogPost' class that reference # 'author_obj' via the 'authors' referencelist attribute. BlogPost.where("authors", :refers_to, author_obj)

    This principle can be transferred to all cases in which one-to-many or many-to-many associations need to be modelled, e.g. products and the parts they consist of, employees and the departments they work for, etc. 


    The changelog reflects minor improvements and bugfixes that were made in addition to the changes listed above.