Updates & Release Notes

Scrivito 1.10.0 Release Notes

posted by Andreas

More options for creating, copying and moving pages

For making the life of editors even easier when creating pages, we've added several items to the page menu and made the wording more consistent. There are three new menu commands:

The Add subpage command lets you add a subpage to the current page, provided that the current page is part of the page hierarchy (i.e. that it has a path).
After issuing the well-known Copy or move page command for the current page, you can now also paste or move this page as a subpage, either directly underneath the current page (paste) or elsewhere (paste or move). For this, the corresponding new menu items Paste as subpage and Move here as subpage are available, again provided that the target page has a path.

Further improvements and bugfixes

  • More flexible attribute defaults
    When a user creates a page or a widget in place, its attributes can be initialized. If, for example, the author attribute of a new page should be prefilled with the user's name, you can achieve this by defining the default_for callback of the underlying page model class accordingly. Next to the current user, Scrivito now also passes the page the user is viewing to the callback. This enables you to assign attribute defaults based on properties of the current page, e.g. its model class or its location in the page hierarchy.

  • Updating binaries from temporary files
    Using Ruby, it is now possible to upload remote binaries to CMS objects directly, i.e. without first downloading them to regular files. For this, a Tempfile is now accepted when updating a CMS object:

    # Download an image to a local Tempfile
    require 'open-uri'
    tempfile = open("https://upload.wikimedia.org/wikipedia/commons/c/ce/Example_image.png")
    # Upload the temporary file to Scrivito
    @obj.update(blob: tempfile)

    See the Binary#upload class method for details and examples.

  • Fixed reloading of strings and enumeration values
    Scrivito's in-place editors let you edit content directly on a page or in the properties dialog of a page or widget. As a developer, you can have the contents of some of those editors reloaded after editing to always reflect their current values. Applying this to the string and enum editors caused a JavaScript “Unhandled rejection error”, which has been fixed.

  • More consistent autoloading for better compatibility
    A bug with Rails' eager loading has been fixed. Previously, the Scrivito SDK used a mix of plain Ruby autoload and Rails autoload_paths to load its code. Now scrivito_sdk relies solely on Rails autoload_paths, which makes the SDK compatible with sidekiq.

  • Improved link and linklist in-place editors
    The editors for link and linklist attributes now properly handle double quotes in link titles and link URLs.

  • Image editor available again in editing mode
    If an image object is selected from the changes list in editing mode, the built-in image editor is now available again in the image's resource dialog. The same applies to the image's details dialog opened, for example, via the Content Browser.

Scrivito 1.9.1 Release Notes

posted by Andreas

This is a bugfix release.


This release makes widget and widget list menus on properties dialogs visible again, allowing you to add widgets to widget lists or move, copy, paste, or delete widgets in details views.

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

Thank you for using Scrivito!

Scrivito 1.9.0 Release Notes

posted by Andreas

Unified changes view modes

When working on a page, Scrivito lets you compare the current page contents with the version you started off with. Up to now, the changes view that lets you do this had three modes, “Additions,” “Deletions,” and “All changes” of which – according to the feedback we collected – only the latter was used.

So, for less complexity and hence better usability, we combined these modes into one, removed the dropdown, and called this page display mode – guess what: “Changes.”

Further improvements and bugfixes

  • When hovering over the sidebar, a short delay now prevents it from opening immediately. This way, the mouse pointer can be moved over the edge of the browser window without causing the sidebar to flicker.

  • It is now possible to drag widgets from one CMS object to another one using their respective handle. This comes in handy if pages are composed of more than a single CMS object.

  • In the Content Browser’s details view a spinner is now displayed while the details of a CMS object are being loaded.

  • Scrivito now lets you prevent editors from accessing the publishing history. By default, all users may use the publishing history, but by withdrawing the new read_history permission, exceptions to the default can be made. For details, see: Defining users and their permissions

  • We fixed a bug that caused URL changes (using BinaryRewrite) to be not applied to binary CMS objects (e.g. images or PDF files) with a permalink.

  • When using the SDK editing API and applying scrivito("content") to enum attributes, string values with special characters (e. g. ampersands) are now handled correctly. Thus, the default enum editor now always properly reflects the current value.

  • We fixed a bug related to the preset routes. The preset routes wrongly identified the first component of the URL path as an ID if it was exactly 16 characters long and was made up of letters and digits. Now, it identifies only hexadecimal numbers (consisting of digits and the letters "a" to "f") as IDs.
    If your routes.rb file contains calls to scrivito_route, you are not using the preset routes and are therefore not affected by this bug.

  • Scrivito now automatically optimizes JPEG and PNG images by removing their metadata and adjusting their size using the default image transformation configuration setting. As a consequence, the Scrivito::BasicObj#apply_image_transformation? hook method no longer needs to be defined for each object class that represents images. In fact, this method has been deprecated because it's not called anymore.

  • When changes to content cannot be saved (due to network dropouts, for example), Scrivito now displays an alert box instead of showing the "Changes saved" indicator.

  • We fixed a bug related to restored browser sessions that caused the displayed content to be outdated.

  • A bug was fixed that caused a filter and the “Last added” view to be selected at the same time. It occurred only after creating a CMS object using the “Create item” button displayed along with the filtered items, not when creating items using drag and drop.

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!