Calendar Display Issue v9.2.4

Since I upgraded some sites to version 9.2.4 from 9.0.2, it was noticed that the built-in Calendar block type does not display at all on our public sites (cannot login here) but does on our private sites (whether logged in or not). When I compared the Concrete code between the two versions, I noticed on 9.2.4 the following code was changed in config\app.php:

‘fullcalendar’ => [
[‘javascript’, ‘js/fullcalendar.js’, [‘minify’ => false, ‘combine’ => false]],
[‘css’, ‘css/fullcalendar.css’],
],

In version 9.0.2, it looks like this:

‘fullcalendar’ => [
[‘javascript’, ‘js/fullcalendar.js’],
[‘css’, ‘css/fullcalendar.css’],
],

When I changed the ‘combine’ value to true in version 9.2.4 and cleared the cache, the calendar then appears on the public sites. I don’t feel like that is the correct way to fix this issue. Any ideas on how to fix this properly?

I’m using an older theme that I have tweaked to make work with version 9 and I suspect that may be the true source of the problem. What’s confusing me is why this is an issue on our public sites and not our private sites. In case you’re wondering, the page_theme.php file contains the following lines of code for assets:

public function registerAssets() {

$this->providesAsset('css', 'bootstrap/*');
$this->providesAsset('css', 'blocks/form');
$this->providesAsset('css', 'core/frontend/*');
$this->providesAsset('css', 'font-awesome');

$this->requireAsset('javascript', 'jquery');
$this->requireAsset('javascript', 'bootstrap/tooltip');
$this->requireAsset('css', 'bootstrap/tooltip');
$this->requireAsset('javascript', 'picturefill');
$this->requireAsset('javascript', 'core/lightbox');

$this->requireAsset('core/cms');
$this->requireAsset('javascript', 'fullcalendar.js');
$this->requireAsset('vue');
$this->requireAsset('bootstrap');
$this->requireAsset('moment');

}

1 Like

Are you noticing any JavaScript errors or PHP errors when the page renders?

1 Like

It is throwing a JavaScript error:

Uncaught TypeError: $(…).fullCalendar is not a function

Turns out the change I made to the config/app.php file did not truly fix it. It seems that clearing the cache temporarily fixed and only if I loaded a page with a calendar first after clearing the cache. I’m attempting to identify a pattern, but it almost seems intermittent. Sometimes the fullcalednar.js is a part of the JS cache and sometimes it’s not on a page with a Calendar block.

Here are the cache settings on one of the sites having the issue:

‘cache’ => [
‘blocks’ => false,
‘assets’ => true,
‘theme_css’ => true,
‘overrides’ => true,
‘pages’ => ‘0’,
‘full_page_lifetime’ => ‘custom’,
‘full_page_lifetime_value’ => ‘60’,
‘doctrine_dev_mode’ => false,
‘last_cleared’ => 1706028830,
‘clear’ => [
‘thumbnails’ => true,
],
],

1 Like

Does it work if you turn off all caching?

How would one achieve that? Would the following work?

‘cache’ => [
‘blocks’ => false,
‘assets’ => false,
‘theme_css’ => false,
‘overrides’ => false,
‘pages’ => ‘0’,
‘full_page_lifetime’ => ‘custom’,
‘full_page_lifetime_value’ => ‘60’,
‘doctrine_dev_mode’ => false,
‘last_cleared’ => 1706028830,
‘clear’ => [
‘thumbnails’ => true,
],
],

You can manage cache settings via the dashboard here:
/index.php/dashboard/system/optimization/cache

Quite honestly, none of my sites have any caching turned on. I have never noticed any appreciable speed increase BUT my sites are ultra-small. Perhaps big sites need it. I FIGHT caching on a daily basis as I develop stuff so why would I intentionally add to that nonsense?

Changing ‘assets’ to ‘false’ in the Concrete configuration file worked. I don’t understand why, but since it is fixed, I won’t worry about it.