Blog

Scrivito 1.7.0 Release Notes

posted by Andreas

Improvements

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.

    100 % CDN-Backed Asset Delivery

    One of the central benefits of using Scrivito is that binary content, e.g. images, is delivered fast and reliably to the visitors of your website, no matter where they're located. The technology behind this, the transparent use of a Content Distribution Network, isn't new to our CMS. In fact, CDN integration was an early milestone in the course of developing Scrivito.

    So what's the news?

    As of mid-December 2016, all content delivery is backed by the CDN behind Scrivito, Amazon CloudFront. For this to work, we recently changed the asset URLs.

    Before that, only assets part of the published content and of working copies being previewed were delivered via the CDN. In editing mode, assets were served solely by EU-based Amazon S3.

    So, when editing pages containing any amount of images, pages should load speedier now, especially if you're not located in the EU.

    Happy editing!

    Scrivito 1.5.5 and 1.6.1 Release Notes

    posted by Dave

    Bugfixes

    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

    Bugfixes

    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!

    Preview URL change on Thursday, 2016-12-08

    posted by Tilo Prütz

    We're going to change our preview URL for assets from *.amazonaws.com to preview-cdn.scrvt.com on Thursday, 2016-12-08 around 11:00 CET.

    Existing links will continue to work, meaning that the legacy URLs pointing to *.amazonaws.com won't expire prematurely.

    The change will be done automatically in our backend. No SDK upgrade is necessary.

    If you are using your own CDN and have hardcoded the old preview URL in the Scrivito::BinaryRewrite callback, you might need to adapt it.

    Scrivito 1.6.0 Release Notes

    posted by Andreas

    Improvements

    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.

    Usage

    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.

    Changelog

    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

    Bugfixes

    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

    Bugfixes

    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!

    Welcome to the New Scrivito Demo!

    posted by Andreas

    We're happy to present our brand new Scrivito demo to you! Walk in, take a look, play around with it, and experience for yourself how cool the Scrivito CMS is. All you need to do is register with us (if you haven't already done so), then open your dashboard and click “Scrivito Demo.” We also made the demo available as the Scrivito example application you can install locally or deploy to your favorite hosting platform.

    The new demo showcases structures and components crucial to all websites – navigations, headers, footers, etc. –, but also more sophisticated functionality like a full-fledged blog, page hierarchies, and search.

    We've provided a decent amount of widgets and sample pages for you to experiment with, using Scrivito's genuine in-place editing and drag 'n' drop functionality. The widgets included in the demo form a collection that should cover most if not all of the elements needed on a typical website:

    The blog included in the demo

    Just put a section, headline, text, image, or card widget onto a page and enjoy the ease of use Scrivito is known for. Create pages with multiple sections, add columns, insert a navigation, and make them work or look the way you want using their respective property dialog.

    Launching the demo for the first time makes you a Scrivito editor, so you can instantly add or change content to your liking. If you'd like to start over again, no problem: you can easily have a fresh demo created via your dashboard.

    So, here we go - have fun! Please let us know about your impressions if you feel like it.

    Scrivito 1.5.1 Release Notes

    posted by Andreas

    Bugfixes

    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!