ICS Calendar

ICS Calendar
  • Features
    • ICS Calendar Pro
    • Feature Comparison
    • Sample Calendars
    • Preview Your Calendar
    • More WordPress Plugins
    • Standalone Version (Beta)
  • Help
    • User Guide
      • Getting Started
      • General WordPress Settings
      • Shortcode Overview
      • All Parameters (Reference)
      • FAQs and Tips
      • CSS Guide
      • Developer
    • Shortcode Builder
    • WordPress Support Forums
    • Pro Documentation
      • Calendar Builder
      • Block Editor
      • Manual Calendar Setup
      • Admin Utilities and Settings
      • Customizer
      • All Parameters
    • Pro Support Forums
      • Installation and Configuration
      • Licensing
      • Troubleshooting and Bugs
      • CSS and Design
      • Feature Requests
      • Translations
      • General Support
    • Pro 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

  • Testing a new development cycle March 29, 2023
  • Which iCalendar fields should ICS Calendar support? March 24, 2023
  • Enhancements to Widget Availability and Year Availability views in ICS Calendar Pro 4.6.0 March 20, 2023
  • New experimental feature in ICS Calendar v. 10.8.7: combinemultiday… feedback welcomed! March 13, 2023
  • Regenerate Instance… a new option in ICS Calendar Pro 4.4.10 March 1, 2023

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
  • Instagram
  • YouTube
  • Room 34 Creative Services, LLC
  • Minneapolis, Minnesota 55406 USA
  • info@icscalendar.com
  • More WordPress Plugins
  • Privacy Policy
  • Terms & Conditions

Copyright © 2023 Room 34 Creative Services, LLC. All rights reserved.

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

This website uses cookies for necessary functions and to enhance your browsing experience. Accept to continue or find out more in our Privacy Policy.

Accept & Continue