Support

Home Forums Event Espresso Premium Calendar won't appear

Calendar won't appear

Posted: July 9, 2013 at 9:36 am


Becky Thomas

July 9, 2013 at 9:36 am

I have added the [ESPRESSO_CALENDAR cal_view=”month”] code to my page, but the calendar will not appear. http://miyoartstudio.com/calendar/


Josh

  • Support Staff

July 9, 2013 at 9:53 am

Hi Becky,

I checked and this looks like there might be a plugin in the mix that’s creating a conflict.

What’s happening is where the event content gets loaded into the calendar it’s throwing this error:

Uncaught SyntaxError: Unexpected identifier

Normally this will not happen unless there’s something that’s altering the event content. Can you try temporarily deactivating any non-EE plugins to see if that helps?


Becky Thomas

July 9, 2013 at 11:44 am

WordPress Importer and Jetpack are the only 2 plugins that are activated.


Josh

  • Support Staff

July 9, 2013 at 1:07 pm

Hi Becky,

Thanks for checking. Can you try temporarily switching to the twentytwelve theme so we can rule out whether it’s an issue with the theme?


Becky Thomas

July 9, 2013 at 3:55 pm

This is a live site. I would prefer not to, but if I do, can we do it late at night or something? How quickly will you check back to offer support? I am nervous about doing that. If I switch themes, I shouldn’t lose anything, correct?


Josh

  • Support Staff

July 9, 2013 at 4:07 pm

You can switch themes as the admin without changing the look of the site for everyone else by using the theme test drive plugin


Becky Thomas

July 9, 2013 at 5:37 pm

I checked it and it was working in twentytweleve. So, now what?


Josh

  • Support Staff

July 9, 2013 at 5:56 pm

We typically encourage anyone having problems with the calendar due to a theme conflict to contact the theme author for support. It may be that there is a function within the theme that’s overriding a standard WordPress function (like wpautop) that ends up breaking the calendar.


Becky Thomas

July 18, 2013 at 3:38 pm

From the theme’s developer –

I tried to setup the Event espresso but I could not make it to work in VibeCom and Twenty Twelve in your server (it was working previously when I took the screenshot.). Maybe I was doing something incorrectly.

Just checked the code : WPAutop is nowhere edited in VibeCom, so you can ask for their support.


Josh

  • Support Staff

July 18, 2013 at 8:54 pm

Hi Becky,

I’m sorry to hear that they replied this way. I don’t think it’s an wpautop issue, it could be a number of things that the theme is doing that’s breaking the web page that has the calendar on it. I’d be interested in taking a look at the theme’s code and see what its doing that’s affecting the calendar. Can you upload a copy of the theme to dropbox and post a link here -or- send a copy of the theme to support @ eventespresso.com so we can take a look at the code and investigate?


Josh

  • Support Staff

July 19, 2013 at 12:03 pm

Hi Becky,

I installed the VibeCom theme on my test server and found that if none of the event descriptions contained images, then the calendar would appear. As soon as I posted an image in an event description though, then calendar stopped working.

So I looked in the theme’s code for a filter being added to the_content that would affect images. Sure enough, on line 332 of func.php there is this little gem:

add_filter('the_content', 'seo_friendly_images', 100);

What this is doing is changing the way the images get marked up with some regular expressions and altering the markup of the image tags. Somewhere along the way this breaks the calendar if there are images in the event’s description.

It turns out that this functionality is actually from a plugin you can download at wp.org for free, but they’ve bundled into their theme with no user configurable way to turn it off.

Since there isn’t a way turn this feature off (or at least I could not find one) the filter can be removed by commenting out the line of code with two slashes at the beginning of the line like this:

// add_filter('the_content', 'seo_friendly_images', 100);

The downside to the above fix is it will get overwritten when the theme is updated. I do see that they bundle in a child theme which you can use to keep all your customizations safe from an update. If you install the child theme per their documentation, you can add this function to the child theme’s functions.php file at the end, just before the closing ?>

add_action ( 'init', 'cwa_remove_friendly_images' );
function cwa_remove_friendly_images() {
	remove_filter('the_content', 'seo_friendly_images', 100);
}

The above code will make it so the image tags do not get filtered.

You might contact the theme author and request that they add an option that allows this feature to be turned off.


Becky Thomas

July 24, 2013 at 9:11 am

Thank you so much!!!! It works!!


Becky Thomas

July 24, 2013 at 9:12 am

Now, do you know how I can have less room at the top of the page? http://miyoartstudio.com/calendar/


Josh

  • Support Staff

July 24, 2013 at 9:39 am

That’s being set by the WordPress theme, if you ask the theme’s support staff they may have a best practice way of changing this.

I checked and the code that is adding the space around the top of the page is in the theme’s style.css on line 1612:

h2.page_title {
padding: 20px 0;
margin: 30px 10px;
border-bottom: 1px solid #e7ecee;
}

If you have set up a child theme you can copy the above rules into the child theme’s style.css and modify it.

The first numbers after padding: and margin: are setting pixel dimensions on top of and underneath the page title, which add up to 50px above and below the page title.

The support post ‘Calendar won't appear’ 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