Home

>

Tools

>

Ghost

>

Releases

>

4.27.1

Ghost Release: 4.27.1

Tag Name: v4.27.1

Release Date: 12/8/2021

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Ghost v4.27.1 is a minor bug fix release that addresses an issue with card scripts executing before the DOM is fully parsed. This fix ensures that toggle cards and other interactive elements work correctly by changing script loading from async to defer attribute, allowing scripts to safely access DOM elements after parsing is complete.

Highlight of the Release

    • Fixed an issue with card scripts executing before DOM is fully parsed
    • Changed script loading from async to defer attribute for better DOM interaction
    • Improved reliability of toggle cards and other interactive elements

Migration Guide

No migration steps are required for this update. The fix is applied automatically when you update to Ghost v4.27.1.

Upgrade Recommendations

This update is recommended for all Ghost users, especially those who use toggle cards or other interactive card elements in their content. The update ensures these elements function correctly by fixing script execution timing.

To upgrade:

  1. Back up your Ghost installation
  2. Follow the standard Ghost update procedure for your installation method
  3. No configuration changes or additional steps are required after updating

Bug Fixes

Card Script Execution Timing Fix

Fixed an issue where card scripts were executing before the DOM was fully parsed, causing toggle cards and potentially other interactive elements to malfunction. The problem occurred because scripts were using the async attribute, which downloads scripts in parallel with DOM parsing but executes them immediately upon download completion, regardless of whether DOM parsing has finished.

The fix changes these scripts to use the defer attribute instead, which still allows parallel downloading but ensures scripts only execute after the DOM parsing is complete. This ensures that all DOM elements are available when the scripts run, resolving the issues with toggle cards not working properly.

New Features

No new features were introduced in this release. This is a bug fix release focused on improving the reliability of existing functionality.

Security Updates

No security fixes were included in this release.

Performance Improvements

No specific performance improvements were included in this release. The primary focus was on fixing the script execution timing issue.

Impact Summary

This release addresses a specific bug that affected the functionality of toggle cards and potentially other interactive elements in Ghost content. By changing how scripts are loaded (from async to defer), the update ensures that scripts only execute after the DOM is fully parsed, allowing them to safely access all DOM elements.

While this is a minor fix, it significantly improves the reliability of interactive content elements, providing a better experience for both content creators and site visitors. Content creators will no longer experience unexpected behavior when using toggle cards, and site visitors will benefit from properly functioning interactive elements.

The change is fully backward compatible and requires no action from users beyond updating to the latest version.

Full Release Notes

Statistics:

File Changed3
Line Additions3
Line Deletions3
Line Changes6
Total Commits3

User Affected:

  • Toggle cards and other interactive elements now work correctly in their content
  • No more unexpected behavior when using card-based content features

Contributors:

allouisdaniellockyer