Home

>

Tools

>

Strapi

>

Releases

>

4.0.1

Strapi Release: 4.0.1

Tag Name: v4.0.1

Release Date: 12/22/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.1 is a maintenance release that includes numerous bug fixes, performance improvements, and enhancements. Key updates include fixes for API token population, plugin configuration, content management relation fields, and GraphQL functionality. The release also improves the admin interface with text changes, adds creation information in detail views, and includes several translation updates for multiple languages.

Highlight of the Release

    • Fixed relations not being populated when using read-only API keys
    • Improved handling of negative limit and pageSize in API queries
    • Added creation information display in content detail views
    • Fixed regex validation for empty strings in non-required fields
    • Enhanced admin build process to improve performance
    • Added support for enumeration filters in GraphQL
    • Fixed content copying between locales with dynamic zones

Migration Guide

No specific migration steps are required for upgrading from v4.0.0 to v4.0.1 as this is a maintenance release with bug fixes and minor enhancements.

If you're using API tokens with relations, note that this release fixes an issue where relations were not being populated when using read-only API keys. Your existing code should work better without changes.

If you were working around any of the fixed bugs (like the regex validation for empty strings or issues with copying content between locales), you can now remove those workarounds.

Upgrade Recommendations

This is a recommended upgrade for all Strapi v4.0.0 users as it contains important bug fixes and performance improvements.

To upgrade:

  1. Update your Strapi dependencies in your package.json:

    npm upgrade [email protected] --save
    

    or with yarn:

    yarn upgrade [email protected]
    
  2. Run the installation:

    npm install
    

    or with yarn:

    yarn install
    
  3. Start your application:

    npm run develop
    

    or with yarn:

    yarn develop
    

No database migrations or configuration changes are required for this update.

Bug Fixes

Content Management Fixes

  • Fixed relation field issues in the content manager
  • Fixed copying content from another locale with dynamic zones
  • Fixed regex validation for empty strings in non-required fields
  • Fixed error message display in admin panel
  • Fixed visibility of create component button in production mode

API and Data Handling Fixes

  • Fixed relations not being populated when using read-only API keys
  • Fixed plugin configuration not applying correctly per environment
  • Fixed handling of dependencies which don't export package.json
  • Fixed attribute generation for content type generator
  • Fixed negative limit and pageSize handling in API queries

Authentication and User Management Fixes

  • Fixed login error message display
  • Fixed saving user permissions settings
  • Fixed user filtering functionality
  • Fixed password reset functionality in GraphQL mutations

Media and Upload Fixes

  • Fixed issue with downloading original images in the media library

Performance Improvements

  • Optimized admin build process to build only when necessary
  • Removed admin files from watched files to improve development performance

New Features

Admin Interface Improvements

  • Added interface language help message to assist users with language settings
  • Added creation information display in content detail views, showing who created entries and when
  • Added get-help link for better user support
  • Improved empty content manager with new call-to-action elements
  • Added back link navigation in content manager

CLI Enhancements

  • Added controllers:list command to list available controllers

API Enhancements

  • Added support for fetching all entries with limit=-1 parameter
  • Added enumeration filter support for GraphQL queries

Security Updates

No significant security fixes were included in this release.

Performance Improvements

Admin Build Performance

  • Optimized the admin build process to only build when necessary, serving it from the admin package
  • Removed admin files from watched files during development to reduce unnecessary rebuilds
  • Improved webpack configuration for better build performance

API Query Performance

  • Enhanced handling of pagination and limits in API queries
  • Improved maxLimit handling in API requests
  • Optimized GraphQL query processing with better filter support

Impact Summary

Strapi v4.0.1 is a maintenance release that focuses on bug fixes and quality-of-life improvements following the major v4.0.0 release. The update addresses several critical issues that affected developers and content editors.

For developers, the most significant fixes include resolving issues with API token relation population, plugin configuration handling per environment, and GraphQL functionality improvements. The fix for relations not being populated when using read-only API keys is particularly important for applications using the API in read-only mode.

Content editors will benefit from fixes to the content manager, including relation field improvements, better handling of content copying between locales with dynamic zones, and improved error messages. The addition of creation information in detail views also enhances content tracking capabilities.

Administrators will find improvements in user management, including fixed user filtering and permission settings. The interface has been enhanced with better text consistency and additional translations for international users.

Performance improvements include optimizations to the admin build process and better handling of API queries with large result sets. The release also includes numerous translation updates for Korean, Dutch, Japanese, French, and adds Traditional Chinese support.

Overall, this release significantly improves the stability and usability of Strapi v4 without introducing breaking changes.

Full Release Notes

💅 Enhancement

🐛 Bug fix

  • [cli] Fix the attribute generation for the CT generator (#11749) @Elhebert
  • [core:admin] [Admin] Login error message fix (#11747) @ronronscelestes
  • [core:admin] CM LV Settings Dnd fixes (#11755) @ronronscelestes
  • [core:content-manager] Fix regex validation for empty string in non-required fields (#11808) @jakobsjoqvist
  • [core:content-manager] Fix relation field in the content manager. (#11898) @soupette
  • [core:content-manager] Fix copy from another locale with DZ (#11915) @soupette
  • [core:content-manager] fix error message in admin panel (#11950) @SlavMAK
  • [core:content-type-builder] Set visibility on create component button when in production (#11791) @Webbist-dev
  • [core:strapi] Fix plugin config per environment doesn't apply (#11802) @iicdii
  • [core:strapi] Dealing with dependencies which don't export package.json (#11850) @yuku
  • [core:strapi] Fix relations are not populated when API key is read-only (#11969) @iicdii
  • [core:strapi] Remove admin files from watched files (#11973) @soupette
  • [core:upload] Fix unable to download original image in uploader (#11769) @iicdii
  • [doc:readme] Fix provider config examples for v4 (#11731) @derrickmehaffy
  • [plugin:graphql] Enumeration filter support for GraphQL (#11754) @iicdii
  • [plugin:graphql] Fix unable to reset password in GraphQL mutation (#11964) @iicdii
  • [plugin:users-permissions] Fix saving up settings (#11780) @petersg83
  • [plugin:users-permissions] Fix unable to filter users, add e2e test (#11795) @iicdii

🌏 Translation


📚 Migration guides can be found here 📚

Statistics:

File Changed276
Line Additions8,859
Line Deletions7,634
Line Changes16,493
Total Commits209

User Affected:

  • Fixed issues with API token relation population
  • Improved plugin configuration handling per environment
  • Fixed attribute generation for content type generator
  • Enhanced GraphQL functionality with enumeration filter support
  • Fixed issues with dependencies that don't export package.json

Contributors:

ivanThePleasantfdel-carvincentbproalexandrebodinpetersg83ConvlyderrickmehaffyiicdiiHichamELBSIsoupetteronronscelestesjakobsjoqvistjsprdsmatsubaraDaisukeyukuabdonrdduncanhsiehmeduzenmaximeMDSlavMAK