Scrivito 0.90.0 Release Notes

Items added or changed after the release of RC 1 are marked with [0.90.0.rc2] or [0.90.0.rc3], repectively.

Improvements

New API for defining and selecting editors

The JavaScript API now provides a more concise way to define an editor for in-place editing:

The UI calls can_edit to determine whether the editor is capable of editing the given element. If the callback returns a truthy value, activate is called to activate the editor.

We also provided a new API for specifying the editor to use for a particular field:

If the select_editor callback specifies the editor to use, the UI checks whether this editor exists and, if it does, as mentioned above, calls its can_edit method to determine whether the editor is suitable for editing the field. If it is, the UI activates the editor by calling its activate method.

Call the disable method of an editor to completely prevent the field from being edited, regardless of any subsequent calls to use.

There is more detailed documentation on using and defining editors.

One helper to render them all

The scrivito_tag view helper now renders attributes for which dedicated helpers were needed previously. Therefore, these dedicated helpers were removed, namely scrivito_edit_enum, scrivito_edit_multienum, scrivito_edit_reference, scrivito_edit_referencelist, scrivito_edit_link, and scrivito_edit_linklist. When upgrading to this SDK version, calls to them should be replaced with calls to the scrivito_tag helper:

The helpers were removed because they are no longer required for activating the corresponding editors. Instead, the editors are now activated by default for the attribute types concerned.

Previously, these helpers were also needed to have the attribute values rendered in preview mode. However, the scrivito_tag helper does not yet provide this functionality and doesn't render markup equivalent to the markup the removed helpers produced. In most cases, though, you probably haven't used those helpers in views responsible for displaying the preview. But if you did and wish to stick to the formatting previously provided by these helpers, you might want to define them in your application:

Breaking changes

Scrivito now raises an error if the scrivito_tag helper is used to render an attribute that doesn't exist.


We unified the naming of the data attributes recognized by Scrivito's in-place editors.

Scrivito's editors can be configured through various HTML data attributes. These attributes weren't named consistently in the past. From this release on, all data attributes recognized by Scrivito editors are prefixed with data-scrivito-editors-:

Deprecated Renamed to
data-autosave data-scrivito-editors-autosave
data-date-format data-scrivito-editors-date-format
data-filter-context data-scrivito-editors-filter-context
data-filters data-scrivito-editors-filters
data-max data-scrivito-editors-max
data-min data-scrivito-editors-min
data-newlines data-scrivito-editors-multiline*
data-placeholder data-scrivito-editors-placeholder
data-reload data-scrivito-editors-reload
data-step data-scrivito-editors-step
data-time-format data-scrivito-editors-time-format
data-values not used

*On this occasion, we also renamed data-newlines (now deprecated) to data-scrivito-editors-multiline. Please refer to the documentation for the complete list of available data attributes.


We also streamlined the naming of Scrivito Editors. The Redactor WYSIWYG editor can now be made available using the editor: 'redactor' option of the scrivito_tag helper, but you might also continue using the default editor: 'html'. For not being chained to Redactor, use html to activate the primary WYSIWYG HTML editor, which is going to be the Medium Editor from one of the upcoming releases.

If you have been using scrivito.editors.html_editor.redactor.options in your JavaScript, please update to scrivito.editors.redactor_editor.options.


Because of buggy and cumbersome behavior, Scrivito no longer lets you set empty strings as selectable values of enum or multienum attributes.

Further improvements and changes

We added an alternative HTML editor to the collection of Scrivito Editors. You can now offer the MediumEditor to website editors for even more WYSIWYG convenience.

Just request the new medium editor in your scrivito_tag:


Workspaces now have a published? method. It lets you determine for a specific working copy whether it is the published one or not. In addition, the published class method was provided for retrieving the workspace that represents the published content. For example, you can now write the following code to retrieve all editable working copies:

[0.90.0.rc2] In the JavaScript API, the present, disabled, and execute callbacks that can be specified in $.scrivito("menu").add, $.scrivito("menu").update or $.scrivito("menu").replace are no longer provided with the DOM element concerned since this element can be derived from the context.

Bugfixes

We fixed a bug in the scrivito_details_for helper that occurred when it was called outside of a view, e.g. in a helper. In such cases, the return value of the block was not rendered.

The “Click to edit” placeholders are now always clickable in Chrome.

The JavaScript search API (scrivito.obj_where) had a bug that caused searches by date to take account of the year only. For example, searching for all CMS objects changed after May 5, 2015 returned all CMS objects changed in 2015. This bug has been fixed.

[0.90.0.rc3] We fixed the problem that in-place editors weren't activated again on pages after the details view, which used the same editors, had been opened.

More great blog posts from Andreas Viebke

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.40.0 Released

    Improvements Intermediately rendered components during loading time Scrivito.provideComponent now lets you give proper feedback to the visitor in cases where the actual component that is provided requires some time to load and render itself. This usually short time gap can now be bridged by...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.39.0 Released

    Improvements Enhanced data classes The Scrivito SDK now offers all attributes of a data class as placeholders for its instances, unless configured otherwise via the editing configuration. > As a developer using > Scrivito.provideDataClass > to load external data, you can now also return IDs of...

  • Bienvenue sur Scrivito !

    Latest updates to edit.scrivito.com

    Bienvenue sur Scrivito ! For all you French-speaking users, the Scrivito editing interface is now also available in your language. In addition to dialogs and buttons in French, input fields for page and widget properties have support for locale-specific calendar labels and French number...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.38.0 Released

    Improvements Accessing the current user’s picture The Scrivito.currentEditor API now seamlessly integrates with IAM, allowing developers to access the picture URL associated with the current editor’s IAM profile. Easier attribute type migration There are situations in which a developer needs to...

  • Creating and Linking a Details Page

    Latest updates to edit.scrivito.com

    > After introducing details pages for data items in version 1.36.0 of the Scrivito SDK, the editing interface now offers you to create such a page for a given data class directly from within a data item. If, for example, you have a card widget in your data list widget, and this card widget has a...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.37.0 Released

    Improvements Updating data items using custom logic By defining the update callback of Scrivito.provideDataItem , you can now smoothly update data items using your own logic. This gives you greater control and flexibility in managing your data within your Scrivito app. Prerendering fails early...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.36.1 Bugfix Release

    This release fixes a bug found in version 1.36.0 of the Scrivito JS SDK: Under certain conditions, the renderChild prop of Scrivito.ChildListTag received an argument that was not a child object. This could lead to unexpected app crashes. We apologize for any inconvenience this may have caused!

  • Managing Users and Teams in the JustRelate Console

    Latest updates to edit.scrivito.com

    Scrivito’s user management has moved to the Console After introducing the JustRelate Console in April this year and announcing that authorized Scrivito users would be able to manage their account’s users and teams there, we finally did it: Clicking “Manage users” in the main menu now opens a new...

  • Scrivito JS SDK 1.35.1 Bugfix Release

    Bugfixes All API keys now work properly in Node.js environments In the Scrivito JS SDK, version 1.35.0, we added support for private API keys in a Node.js environment. Due to an encoding error when passing the credentials to the Scrivito backend, some keys didn’t grant access to restricted...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.36.0 Released

    Introducing data details pages

    In an earlier Scrivito JS SDK release, we introduced data lists for seamlessly integrating not only individual data items but also collections of such items into your Scrivito app. Now, we are happy to present an even more powerful feature for data integration: Data details pages that can display...