Home

>

Tools

>

Strapi

>

Releases

>

4.0.0-beta.11

Strapi Release: 4.0.0-beta.11

Pre Release

Tag Name: v4.0.0-beta.11

Release Date: 11/5/2021

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 v4.0.0-beta.11 introduces significant improvements to error handling with new REST error formats and error types for both REST and GraphQL APIs. The update also includes UI enhancements like a new SearchURLQuery component, DateTimePicker implementation, and fixes for media library functionality. This release focuses on improving developer experience through better error handling and enhancing the admin interface usability.

Highlight of the Release

    • Comprehensive refactoring of error handling system with new REST error formats
    • New SearchURLQuery component replacing the old Search component across the admin interface
    • Added DateTimePicker component to the helper plugin for improved date/time selection
    • Fixed media library functionality with proper allowed types implementation
    • UI improvements including updated menu logo and homepage wording

Migration Guide

Migrating to the New Error Handling System

If you've built custom plugins or extensions that rely on Strapi's error handling:

  1. Review the new REST error format to ensure your error handling logic is compatible
  2. Update any custom code that interacts with GraphQL errors to work with the new error handling approach
  3. If you were using the old Search component from the helper plugin, replace it with the new SearchURLQuery component

Replacing the Search Component

The old Search component has been removed from the helper plugin. Use the new SearchURLQuery component instead:

// Old implementation
import { Search } from '@strapi/helper-plugin';

// New implementation
import { SearchURLQuery } from '@strapi/helper-plugin';

The new component handles search state through URL parameters, providing better state persistence across page refreshes.

Upgrade Recommendations

This beta release contains significant improvements to error handling and UI components. We recommend upgrading to this version if:

  1. You're actively developing with Strapi v4 beta
  2. You want to benefit from the improved error handling system
  3. You're experiencing issues with the media library or relation displays in the Content Manager

Since this is still a beta release, we recommend:

  • Testing thoroughly in a development environment before deploying to production
  • Backing up your data before upgrading
  • Reviewing your custom code that interacts with Strapi's error handling system

The upgrade process follows the standard Strapi update procedure, but pay special attention to any custom code that relies on error handling or uses the old Search component.

Bug Fixes

Content Manager Fixes

  • Fixed relation display issues in the Content Manager
  • Fixed component display names in Dynamic Zones
  • Fixed media fields registration process

Testing and Validation

  • Fixed unit tests across multiple components
  • Fixed Enterprise Edition (EE) end-to-end tests
  • Resolved apollo-server-errors version conflict in yarn.lock

UI and Navigation

  • Fixed button alignments in various interfaces
  • Fixed plugin icon display issues

New Features

Error Handling Improvements

  • New REST error format providing more consistent and detailed error information
  • New error types that can be used by developers in their custom code
  • Enhanced GraphQL error handling with better formatting and original error preservation
  • Improved Yup validations with cleaner implementation

UI Components

  • New SearchURLQuery component with URL query support for better state management
  • Added DateTimePicker component to the helper plugin
  • Implemented allowed types functionality for media inputs

Admin Interface Enhancements

  • Updated menu logo and plugins icon
  • Improved homepage wording and links
  • Better button alignments throughout the interface

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Admin Interface

  • Improved search functionality with the new SearchURLQuery component that better handles state through URL parameters
  • More efficient error handling implementation reducing overhead in API responses

Code Structure

  • Cleaner implementation of Yup validations
  • Refactored error handling architecture for better maintainability and performance
  • Removed unnecessary code and components after SearchURLQuery implementation

Impact Summary

This beta release represents a significant step forward in Strapi v4's development, particularly in how errors are handled and presented to developers. The new error handling system provides more consistent, detailed, and useful error information across both REST and GraphQL APIs, making debugging and error management more straightforward.

The UI improvements, particularly the new SearchURLQuery component and DateTimePicker, enhance the admin interface usability while fixing several issues with media handling and relation displays. These changes improve the content management experience for editors and administrators.

For developers building with Strapi, this release offers better tools for handling errors and validating data, along with a more robust media library implementation. The code refactoring also improves maintainability and sets the foundation for future enhancements.

While this is still a beta release and may contain some instabilities, it represents important progress toward the final v4 release with meaningful improvements to both developer and user experiences.

Full Release Notes

Changes

  • Error handling
    • New REST Error format
    • New Error types usable by users
    • New Error types in GraphQL
  • Allowed types in media lib
  • Allow "all" as a locale for filtering
  • Fix homepage copy
  • Fix Menu logo

Statistics:

File Changed300
Line Additions5,051
Line Deletions2,380
Line Changes7,431
Total Commits56

User Affected:

  • Benefit from improved error handling with new REST error formats and error types
  • Can use new error types in both REST and GraphQL APIs
  • Have access to a new DateTimePicker component for implementation in custom views

Contributors:

ronronscelestespetersg83soupetteHichamELBSIalexandrebodin