Calendar not Displaying when logged out V9.1.1

Hi Folks

Just wondering if anyone has ran in to the same issue? Using concrete V9 and php 7.4

I get this error in the inspector:

Uncaught ReferenceError: moment is not defined
followed by:

jQuery.Deferred exception: $(…).fullCalendar is not a function

The calendar works fine when I am logged in, and then disappears when I log out.

Is the CMS not loading a javascript file when the user is logged out?

Funnily enough the form block has stopped working too, where by the date picker pop up doesnt show. Could these be related?


facing same technical issue with calendar v 9.1.1. if anyone knows please let me know.

Moment.js is a date manipulation library. FullCalendar.js is the calendar library. These should have been loaded with the calendar, but apparently not.

This may be theme related. A lot of presentation related js functionality is now the responsibility of the theme. The calendar ‘feature’ needs to be loaded which will pull in the related js and css.

Perfect thank you John, I just found the documentation for adding themes on Concrete bedrock. I am guessing this should solve the issue when I create the page_theme.php file and call in the right assets?

Still getting used to v9 :man_facepalming:

Either there or in your blocks. Look for ‘Features’ in the docs, these are bundles of assets that are now used in place of the v8 asset loader (though you can still use require asset etc)

So I could call in the assets from the block controller instead?

There is a new block method to getRequiredFeatures that provides a list of features the block requires and an interface UsesFeatureInterface. Assets and Features :: Concrete CMS for the master list.
There is not much documentation on it, so also search core code/blocks for the method and interface to get some examples.

Awesome thank you John. Appreciate it. :+1: