I’m bumping in the hopes of a helpful response.
Hi @kwstas778,
I’ve thoroughly tested the issue where the calendar from the Booking Calendar plugin fails to display when the Concatenate JS feature in Jetpack Boost is enabled. It seems that the root of the problem lies in the specific requirement by the Booking Calendar for its JavaScript files to be loaded in the header of the webpage.
Currently, Jetpack Boost does not offer a direct option to specify where scripts should be loaded (header or footer). However, Jetpack Boost does provide a feature that allows you to exclude specific JavaScript files from being concatenated. By using this exclusion feature, we can ensure that the Booking Calendar scripts remain unaffected and load as intended by the plugin’s developers.
To move forward, you would need to identify the exact JavaScript files related to the Booking Calendar that should be excluded. I recommend reaching out to the developers of the Booking Calendar for assistance in pinpointing these files.
Once you have the names or unique identifiers of the JavaScript files used by the Booking Calendar, you can add them to the exclusion list in the settings page of Jetpack Boost when Concatenate JS is enabled. This should allow the calendar to display correctly while still benefiting from the other features of Jetpack Boost.
Please let me know if you require any further assistance or if you would like me to help coordinate with the Booking Calendar developers.
Kind regards,
In the Jetpack Boost Concatenate JS feature there’s a field called “Exclude JS Strings:” I assume that’s the one where I need to put in the excluded scripts. It already has some values “jquery, jquery-core, underscore, backbone”. I’m wondering what’s the syntax here.
For example I have a script function defined by function my_scripts()
in my files which I call with wp_enqueue_script
. How would I exclude that specific my_scripts
script from the Concatenate feature? Just add my_scripts
in the field so it becomes “jquery, jquery-core, underscore, backbone, my_scripts” ?
-
This reply was modified 1 year ago by
kwstas778.
Hello @alinclamba. I contacted the WP Booking Calendar team and they responded to me, which are the js files / scripts that should be excluded from the Concatenate feature. You can see the discussion here https://wordpress.org/support/topic/booking-calendar-is-not-visible-on-my-page/#new-topic-0
So what should I write in the Exclude JS Strings: field to exclude the above scripts?
Edit: I tried putting in the ids like this wpbc-global-vars-js, wpbc-popper-js, ...
but it didn’t work.
-
This reply was modified 1 year ago by
kwstas778.
Hi @kwstas778,
Based on the information provided, here are the specific JavaScript handles you’ll need to exclude in Jetpack Boost:
wpbc-global-vars, wpbc-popper, wpbc-tipcy, wpbc-datepick, wpbc_all, wpbc-main-client, wpbc_capacity, wpbc-times, wpbc-time-selector, wpbc-timeline-flex
Simply copy this list and paste it into the “Exclude JS Strings” field within the Concatenate JS module, which you can find by navigating to Jetpack → Boost in your WordPress dashboard.
This should prevent these scripts from being concatenated, allowing the Booking Calendar to function as expected on your site.
If you need further assistance or have any questions, feel free to ask!
Ah thank you, I just needed to remove the -js affix there at the end. It works now! I’ll go ahead and mark it as solved.
I’m glad I could help, @kwstas778. Stay awesome!