Calendar Not Visible When Logged Out

Permalink
I've created a new calendar in Concrete5 v8.3.2 using the theme supermint 3.
Everything works fine while logged in. I can create events, etc. Everything looks great I also added an event list that looks fine. However, when I log out I can no longer see the calendar. I can still see the event list. I checked permissions and it shows viewable by guests.

I've looked through the forums but can't find anyone having a similar problem.

Does anyone have any ideas of something I've missed, incompatibility with the theme, or if this is a bug in 8.3.2.

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi ewc07,

I am unable to reproduce this issue.

What is the URL for the page with a Calendar block on it?
ewc07 replied on at Permalink Reply
ewc07 replied on at Permalink Reply
Sorry, below is the url with the calendar.
http://www.arcilinc.org/index.php/calendar...
MrKDilkington replied on at Permalink Reply
MrKDilkington
@ewc07

There are JavaScript errors that are preventing the calendar from displaying.
ReferenceError: moment is not defined[Learn More] fullcalendar.js:6:122
ReferenceError: moment is not defined[Learn More] lang-all.js:1:122
TypeError: $(...).fullCalendar is not a function[Learn More] calendar:175:13

The errors may be caused by the theme, add-ons, or custom code.
ewc07 replied on at Permalink Reply
Is there any way to tell what is causing the js error?
MrKDilkington replied on at Permalink Reply
MrKDilkington
@ewc07

One approach is to backup your site to recreate it online or locally. Using the backup, you can start eliminating the possible sources of the error in steps.
- switch to the default Elemental theme
- remove custom blocks and add-ons
- remove custom code
Pixelfixer replied on at Permalink Reply
Pixelfixer
I'm having the same issue. I have a page with nothing but the Calendar block on it and it won't show. Inspector shows an apparent jquery conflict, but I can't resolve it with nothing on the page to remove. The calendar block works fine on my Home page with a much more complex layout. Does anyone have any ideas for me?

site:https://www.brandontennis.org/calendar...
MrKDilkington replied on at Permalink Reply
MrKDilkington
@Pixelfixer

It looks like you are using the Framework theme. Have you modified it in any way?

Have you tried switching to the default Elemental theme to see if you still get the error?
Pixelfixer replied on at Permalink Reply
Pixelfixer
Yes, I'm using the Framework theme. I don't think I have modified it in any major way other than color / font tweaks. I haven't tried switching to the Elemental Theme yet - I can give that a try. But, if it was the fault of the theme, why does the same block work fine on the Home page, yet not on a blank page?
Pixelfixer replied on at Permalink Reply
Pixelfixer
I switched to the Elemental theme and same result. The calendar works fine on the Home page but doesn't show on the Calendar page.
Then I switched back to Framework theme and changed the page type on the Calendar page from "Full" to "Home", first deleting the Calendar block then re-adding it to the page after switching the page type to "Home", since the Calendar block is working fine on the Home page. Still no change.
Everything works as it should while logged into the editor, but fails when logged out.
Baffling.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Have you fixed this because the calendar is displaying for me now?
http://www.arcilinc.org/index.php/calendar...
Pixelfixer replied on at Permalink Reply
Pixelfixer
No. It will not display on the Calendar page for me on my Mac using Chrome. It will display for me on my PC using Chrome, but the calendar entries will not display on the calendar.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@Pixelfixer

When viewing your calendar page in Firefox and Chrome on Windows, there is a console error.
"Uncaught TypeError: element.attr(...).magnificPopup is not a function"

When you switched to the Elemental theme, did you clear the cache after switching?

The calendar is not working on the home page, it throws errors.
fullcalendar.js:6 Uncaught ReferenceError: moment is not defined
    at fullcalendar.js:6
    at fullcalendar.js:6
(anonymous) @ fullcalendar.js:6
(anonymous) @ fullcalendar.js:6
lang-all.js:1 Uncaught ReferenceError: moment is not defined
    at lang-all.js:1
    at lang-all.js:1
(anonymous) @ lang-all.js:1
(anonymous) @ lang-all.js:1
(index):453 Uncaught TypeError: $(...).fullCalendar is not a function
    at HTMLDocument.<anonymous> ((index):453)
    at j (jquery.js:2)
    at Object.fireWith [as resolveWith] (jquery.js:2)
    at Function.ready (jquery.js:2)

Also, what happens if you disable caching and clear the cache?
Pixelfixer replied on at Permalink Reply
Pixelfixer
MrKDilkington,
Thanks for taking a look at this.
I'm also seeing the same console errors.
I did clear cache, both C5 and Chrome, after switching to the Elemental theme.
I have been experimenting with various cache settings and I'm not seeing any improvement.

Also, there is an "intermittent" element to this. Sometimes it works, and then it doesn't, without having made any changes. I'm also seeing the background video on the home page is not loading intermittently. I'm going to remove that and see if it is the source of these problems.
Pixelfixer replied on at Permalink Reply
Pixelfixer
Well, removing the video background had no effect. I thought it may have been consuming too much RAM and causing the squirrely behavior in the Calendar. Back to the drawing board.
Pixelfixer replied on at Permalink Reply
Pixelfixer
MrKDilkington,
Does the fact that everything works fine while logged in give you any clues to a specific conflict? Is there possibly a link to a javascript file I need to comment out somewhere?
Gondwana replied on at Permalink Reply
Gondwana
When something works when logged in and not otherwise, that often indicates that you're relying on some javascript that's automatically loaded when logged in only. The classic case is jquery, but there are other possibilities.
Pixelfixer replied on at Permalink Reply
Pixelfixer
Thanks, but what could be missing when logged out? I'm using the core Calendar block only, on a blank page where it breaks. It appears that maybe javascript causing the conflict is maybe being blocked when in Edit mode. But, I don't know how to find where to disable it, if indeed that's the case. Any other ideas out there?
dmeller replied on at Permalink Reply
Hi Pixelfixer, were you able to figure this out? I am experiencing the same issue
Pixelfixer replied on at Permalink Reply
Pixelfixer
Not entirely. On a test site, I recreated the situation by installing everything clean and it all works. So, it appears to be some sort of hard-to-find glitch that goes away with a clean install. I still haven't done that on my site with the problem since I'm still hoping to find the problem before I have to totally re-do the site.
dmeller replied on at Permalink Reply
It looks like clearing the cache fixed the issue for me for the time being. I am waiting to see if the issue comes back.
simonchilton replied on at Permalink Reply
simonchilton
Hey MrK. I'm getting the same issue with the backbone theme on 8.4.4. When logged out, magnific-popup.js looks like it is being included but in some sort of cached way, and after the calendar.

<script type="text/javascript" src="/concrete/js/fullcalendar/fullcalendar.js"></script>
<script type="text/javascript" src="/concrete/js/fullcalendar/locale-all.js"></script>
<script type="text/javascript" src="/application/files/cache/js/535db848734021d11edbdafc1763a2b480d34e89.js" data-source="/concrete/js/jquery-magnific-popup.js /concrete/js/lightbox.js"></script>

This might explain why clearing the cache sometimes works but isn't a permanent fix.

Thanks!

Do you know if this javascript caching method is a core c5 behaviour?
TMDesigns replied on at Permalink Reply
TMDesigns
I had the same issue and clearing the cache worked for me also. Strange!!
dmeller replied on at Permalink Reply
After some time, the issue did resurface for me so I would keep an eye on the issue
core77 replied on at Permalink Reply
To solve this I require the core/lightbox asset in my page_theme.php in the registerAssets function.

Though it's not necessary for the theme, but it helps to show up the full calendar, events and the details lightbox.

$this->requireAsset('javascript', 'core/lightbox');
Pixelfixer replied on at Permalink Reply
Pixelfixer
Thanks for the tip! Can you provide more details on where to install that line of code?
core77 replied on at Permalink Reply
Depends how you installed your theme:
application/themes/yourtheme/page_theme.php

or

packages/yourpackage/themes/yourtheme/page_theme.php

There you simply add the above line of code in the registerAssets function. It's described in the docs:https://documentation.concrete5.org/developers/designing-for-concret...
Pixelfixer replied on at Permalink Reply
Pixelfixer
Found it. Installed it.
I did something else, randomly, a while back and it started working. So, I don't have a change to view, but I like the insurance. :-)

Thanks!