Support

Home Forums Event Espresso Premium Calendar UI

Calendar UI

Posted: October 24, 2016 at 8:27 am

Viewing 5 reply threads


rsthrive

October 24, 2016 at 8:27 am

Hi All,

I’ve been using the calendar plugin and noticed that if the calendar shortcode is not ran on a page, the following error is thrown: “Uncaught ReferenceError: eeCAL is not defined” and any subsequent JS code is not run because it stops with the calendar.

In the meantime I have placed the calendar in the footer:
<?php echo do_shortcode(‘[ESPRESSO_CALENDAR show_expired=false]’); ?>

Judging from the existing forum posts it looks to be an issue with the theme caching? I’m using Sage roots 8.4.2 (https://roots.io/sage/).

I’ll continue looking into it but if anyone has any advice or a solution, please let me know.

Thanks


Tony

  • Support Staff

October 24, 2016 at 9:04 am

Hi there,

When loading the calendar using do_shortcode you need to load the calendar scripts on the page also, you can find some details on this here:

https://eventespresso.com/wiki/events-calendar-add-on/#ee4customizations

Note that the snippet needs to be added to your template before wp_head() is called.

So if you add the snippet from that page to your template, does it work then?


rsthrive

October 31, 2016 at 4:30 am

Hi Tony,

Apologies for the late response. I have that snippet but it doesn’t appear to have had any effect and it is above the wp_head() function in head.php.

In addition to this, the workaround I put in place to get round the error:

<div style="display:none">
    <?php echo do_shortcode('[ESPRESSO_CALENDAR show_expired=false]'); ?>
</div>

in footer.php

does not always work as the calendar sometime shows.

Many thanks


Tony

  • Support Staff

November 2, 2016 at 6:09 am

Can you post an example of your template within a gist or pastebin so I can review this please.

In addition to this, the workaround I put in place to get round the error:

So your displaying a second calendar within the template and just hiding it?

You should not need to do that.


rsthrive

November 8, 2016 at 4:17 am

So your displaying a second calendar within the template and just hiding it?

Yes, were you looking for the end html or the template php file?

Thanks again


Josh

  • Support Staff

November 8, 2016 at 1:52 pm

The PHP file.

Viewing 5 reply threads

The support post ‘Calendar UI’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso