ICS Calendar

ICS Calendar
  • Features
    • ICS Calendar Pro
    • Feature Comparison
    • Sample Calendars
    • Preview Your Calendar
    • More WordPress Plugins
  • Help
    • User Guide
      • Getting Started
      • General WordPress Settings
      • ICS Calendar Settings
      • Shortcode Overview
      • Shortcode Reference
      • FAQs and Tips
      • CSS Guide
      • Developer Resources
      • GDPR
    • Pro Documentation
      • Calendar Builder
      • ICS Events
      • Manual Calendar Setup
      • Admin Utilities and Settings
      • Customizer
      • Block Editor
      • Parameters Reference
    • Shortcode Builder
    • Support Request Form
    • Translation Suggestions
  • Blog
  • Download
  • Buy Now
  • Cart
  • My Account
Search
More...

Sometimes you just have to admit defeat… at least temporarily

February 1, 2023

ICS Calendar version 10.6 introduced a new feature that changed how and when the plugin’s JavaScript and CSS files get loaded, deferring loading to the end of the page (including the CSS), and only loading them on pages that actually include a calendar.

It’s a good goal! Not loading extra assets on pages that don’t use them is better for site performance, SEO and PageSpeed analytics. Unfortunately, as I learned through a couple of weeks of troubleshooting, it can also introduce a wide range of seemingly unrelated issues, especially with regard to:

  • Optimization plugins that consolidate JS and CSS files
  • Custom CSS (both in the Customizer and in themes)
  • The FullCalendar library

The last item, which only affects Pro users who are using the new Full view, is perhaps the most confounding, because Full view loads, and its CSS gets applied, but certain parts of its CSS are not working properly, specifically the block height for events in the week and day time grid views.

I found this deferred loading was also causing the Pro version’s Customizer settings not to get applied. And on top of this, numerous users were contacting me about problems they were having with their CSS customizations getting lost, or their optimization plugins causing the calendar or sometimes the entire page the calendar is on not to load.

After spending the better part of two days trying several different approaches to salvaging this conditional/deferred loading, I am — temporarily — acknowledging defeat, and restoring the old functionality that enqueues ICS Calendar’s JS and CSS files in the standard way.

The “standard way” has two problems for modern, highly optimized web pages: 1) it includes some render-blocking CSS, and 2) it loads JS and CSS assets on pages where they’re not needed. But! It’s the way WordPress is basically designed to work.

The problem was compounded in my testing by the fact that some of these things work differently in Block Themes than in classic themes. Getting certain things to work in one type of theme has been breaking them in the other, and I haven’t been as comprehensive in my testing as I apparently need to be.

So, for now, ICS Calendar 10.7.1.1 and Pro 4.4.3.1 revert to the pre-10.6 functionality, while I look for a more reliable permanent solution to the conditional loading conundrum.

—Scott

Category: Bug Squashing

Categories

  • Uncategorized
  • New Features
  • Bug Squashing
  • Just for Fun
  • Web Design & Development
  • Translation
  • Deep Dives

Recent Posts

  • ICS Calendar Pro 5.10.0 and ICS Calendar 11.5.9 updates April 24, 2025
  • Big improvements to ICS Events in versions 5.9.0 and 5.9.1 February 26, 2025
  • Happy Holidays from Room 34! December 8, 2024
  • Update to version 5.6.1.1 ASAP to resolve possible database performance issues introduced in 5.6.0 November 14, 2024
  • ICS Calendar Block is officially deprecated in version 5.6, will be removed in version 6.0 November 7, 2024

Related Links

  • Room 34 Creative Services
    Developer of ICS Calendar
  • Underdog of Perfection
    Room 34’s general blog
  • More Plugins by Room 34
    Available in the WordPress Plugin Directory

Room 34 Creative Services, LLC

  • Facebook
  • YouTube
  • Bandcamp
  • Room 34 Creative Services, LLC
  • Minneapolis, Minnesota 55406 USA
  • info@icscalendar.com
  • More WordPress Plugins
  • Privacy Policy
  • Terms & Conditions

Copyright © 2025 Room 34 Creative Services, LLC. All rights reserved.
"ICS Calendar", "ICS Calendar Pro", "ICS Events", the ICS Calendar logo and ICS icon are trademarks of Room 34 Creative Services, LLC.

https://icscalendar.com/sometimes-you-just-have-to-admit-defeat-at-least-temporarily

This website uses cookies solely for necessary functions, such as accessing your account orders and license details. Accept to continue or find out more in our Privacy Policy.

Accept & Continue