Home

>

Tools

>

Strapi

>

Releases

>

3.0.0-beta.19

Strapi Release: 3.0.0-beta.19

Tag Name: v3.0.0-beta.19

Release Date: 3/4/2020

Strapi LogoStrapi

Open-source headless CMS built with Node.js. Provides developers with complete freedom in choosing their favorite tools and frameworks for frontend development.

TL;DR

Strapi v3.0.0-beta.19 introduces Single Types, a major new feature that allows creating standalone content types like homepage or global settings. This release also includes UID field support, improved documentation, and various bug fixes for the content manager and database handling. The update focuses on enhancing content modeling flexibility and fixing issues with polymorphic relations and SQL database enumerations.

Highlight of the Release

    • Introduction of Single Types for standalone content like homepages or global settings
    • New UID field type for creating slugs and unique identifiers
    • Improved documentation with new Getting Started guides and FAQ
    • Fixed polymorphic relations in the content manager
    • Better database handling for SQL enumerations

Migration Guide

Migrating to v3.0.0-beta.19

Single Types Migration

If you want to use the new Single Types feature:

  1. Update your Strapi version to v3.0.0-beta.19
  2. In the Content-Type Builder, you can now choose between "Collection Type" and "Single Type" when creating new content types
  3. For existing Collection Types that you want to convert to Single Types:
    • Make sure the collection has 0 or 1 entry only
    • Edit the content type and change its kind from "Collection Type" to "Single Type"
    • This will rebuild the API entirely

Policy Updates

The policy syntax has been updated to use :: as a prefix:

  • Old format: global.policyName
  • New format: global::policyName

Update your policy references accordingly in your configuration.

Entity Validator Layer

A new entity validator layer has been introduced. If you've been extending core validation, you may need to review your custom validators to ensure compatibility.

For a complete migration guide, refer to the official documentation.

Upgrade Recommendations

Who should upgrade immediately:

  • Developers who need Single Types functionality for managing standalone content like homepages or global settings
  • Projects experiencing issues with SQL database enumerations
  • Teams facing problems with polymorphic relations in the content manager

Who can wait:

  • Production environments that don't immediately need Single Types
  • Projects with custom extensions to core validation (may need additional testing)

Upgrade Steps:

  1. Back up your database and project files
  2. Update your Strapi version: npm install [email protected]
  3. Run database migrations if necessary
  4. Test thoroughly in a development environment before deploying to production
  5. Review the migration guide for any breaking changes, especially if you use custom policies

This is a significant feature release with many improvements, but as it's still a beta version, thorough testing is recommended before upgrading production environments.

Bug Fixes

Content Manager Fixes

  • Fixed polymorphic relations display and handling in the content manager
  • Fixed WYSIWYG editor update when used in a dynamic zone
  • Fixed incorrect redirection after editing related content
  • Fixed autocomplete functionality
  • Fixed UI issues with select fields being incorrectly wrapped
  • Fixed display issues with the UID field
  • Fixed stepper and console errors
  • Fixed table display on Safari and repeatable components on Firefox

Database and Core Fixes

  • Fixed enumeration handling on SQL databases
  • Suppressed unnecessary config rewrites in the database when there are no changes
  • Fixed validation for duplicate enums
  • Removed the option to set rich text fields as unique attributes

New Features

Single Types

The major new feature in this release is the introduction of Single Types. Unlike Collection Types that manage multiple entries, Single Types are designed for standalone content that only has one instance, such as:

  • Homepage content
  • Global settings
  • SEO configuration
  • Contact information

This feature includes:

  • New UI in the admin panel with a dedicated section for Single Types
  • API endpoints for Single Types
  • GraphQL support for Single Types
  • Ability to convert between Collection Types and Single Types

UID Field Type

A new field type has been added to create unique identifiers or slugs:

  • Can be used to generate SEO-friendly URLs
  • Supports automatic generation based on another field
  • Includes validation to ensure uniqueness
  • Available in both the Content-Type Builder and Content Manager

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Database Performance

  • Improved database performance by preventing unnecessary rewrites of configuration in the database when there are no changes
  • This addresses issue #5337 where Strapi would rewrite all 'plugin_content_manager_configuration_content_types' keys in the "core_store" database table on each restart

Admin UI Performance

  • Removed Redux Saga from various parts of the admin UI, simplifying the state management
  • Updated to styled-components v5 which offers better performance
  • Updated Buffet.js dependencies for improved UI component performance

Impact Summary

Strapi v3.0.0-beta.19 introduces a significant new feature with Single Types, allowing developers to create standalone content structures like homepages or global settings. This fundamentally enhances Strapi's content modeling capabilities by providing a clear distinction between collection-based content and singleton content.

The new UID field type adds another powerful tool to the content modeling toolkit, enabling the creation of SEO-friendly URLs and unique identifiers that can be automatically generated based on other fields.

The release also addresses several important bugs, particularly in the content manager UI and database handling. Fixes for polymorphic relations, SQL enumerations, and unnecessary database rewrites will improve stability and performance.

Documentation has been significantly enhanced with new Getting Started guides and an FAQ section, making it easier for new users to adopt Strapi and for existing users to troubleshoot common issues.

Overall, this release represents a substantial step forward in Strapi's evolution as a headless CMS, providing more flexibility in content modeling while addressing key pain points reported by the community.

Full Release Notes

Read the migration guide Here

💅 Enhancement

🐛 Bug fix

  • [admin] Update div wrapper for SelectWrapper (#5346) @kubuntux
  • [core:database] Fix enumeration on SQL databases (#5383) @derrickmehaffy
  • [plugin:content-manager] Fix polymorphic relations in the content manager (#5341) @soupette
  • [plugin:content-type-builder] Add validations for duplicate enums (#5345) @soupette
  • [plugin:content-type-builder] fix: don't show unique attribute for rich text fields #5305 (#5362) @robinv85

🚀 New feature

Statistics:

File Changed300
Line Additions9,722
Line Deletions4,042
Line Changes13,764
Total Commits250

User Affected:

  • Can now create and manage Single Types for standalone content like homepages or global settings
  • Benefit from improved UI for content management with fixed polymorphic relations
  • Experience better handling of rich text fields and enumerations

Contributors:

soupettevirginiekyHichamELBSIlauriejimalexandrebodinsanvitMattieBeltMurzNNderrickmehaffyrobvenn