Support

Home Forums Events Calendar Add-on Problem with calendar after upgrade

Problem with calendar after upgrade

Posted: May 27, 2014 at 6:48 am

Viewing 11 reply threads


gbox

May 27, 2014 at 6:48 am

Hi,

I’ve just upgraded to EE4 and the latest calendar. I de-activated the old plugin and calendar and then installed new and migrated. Events seem to have moved across ok. However since upgrade my events page now displays forthcoming events as a list and not a calendar. I have not made any other changes.

Please help!

By the way the option to now split the total number of tickets on an event into types and set maximums for each type (for example male and female) is a feature I’ve wanted for ages so thanks!

Hope you can help with the calendar problem.
Thanks
Gary

http://www.londonadventuregroup.org


Dean

May 27, 2014 at 6:57 am

Hi,

I will have to make some assumptions here, so I may not be hitting the mark exactly, so sorry about that.

I am assuming you have moved from EE3 to EE4, is that correct?

If so, I am also assuming that your /events/ page contained the calendar?

In EE4 /events/ is now the archive page for the custom post types (the events). As such you would need to create a new page, let’s say /events-calendar/ and add the calendar shortcode to that.

If I’m way off with this, please let me know a little more about your set up so I can help you further.

“By the way the option to now split the total number of tickets on an event into types and set maximums for each type (for example male and female) is a feature I’ve wanted for ages so thanks!”

You are most welcome!


gbox

May 27, 2014 at 7:08 am

Hi Dean,

Thanks for quick reply. OK yes you are correct that I’ve upgraded from EE3 to EE4. Also yes my events page contained the calendar. I’ve looked at this events page and the shortcode states [ESPRESSO_CALENDAR] which I think is the correct code?

I don’t really want to create a new page to display the calendar, can’t I just use an existing page and make sure the shortcode is correct for EE4?

There seems to be another page called event list.

Please advise.

Thanks
Gary


Lorenzo Orlando Caum

  • Support Staff

May 27, 2014 at 8:38 am

Hi there Gary,

The events page in Event Espresso 4 is virtual so you can’t currently replace it with a WordPress page.

You could reassign the default /events/ slug to another slug using something like this:

add_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', 'my_custom_event_slug', 10, 2 );
function my_custom_event_slug( $slug, $post_type ) {
	if ( $post_type == 'espresso_events' ) {
		$custom_slug = array( 'slug' => 'eventslist' );
		return $custom_slug;
	}
	return $slug;
}

That would free up the events slug.

Then you could create a new WordPress page called “events” and add the calendar shortcode and the [ESPRESSO_EVENTS] shortcode on it.


Lorenzo


gbox

May 27, 2014 at 8:54 am

Hi,

OK I think I understand what you mean by virtual. You seem to be saying that I cannot use a wordpress page to display my calendar. That’s fine it does not have to be a page but I still want the calendar to work. So without messing with all the code how do I make sure that people can see my events in calendar form? If I delete the existing page called events how will they navigate to the calendar?

Basically I had things working ok in EE3 and I don’t understand what has changed exactly in EE4. I want one of the new features but I also want events to show on a calendar.

What do I need to do?

Gary


Lorenzo Orlando Caum

  • Support Staff

May 27, 2014 at 9:07 am

On your original response, it sounds like you wanted the calendar to appear on the events list page. Then this page would show both the calendar and the events listings underneath it.

With your latest response, I think you just want to use the calendar on the WordPress page with a slug of ‘events.’

First, ensure that you are running the EE4 calendar and not the EE3 calendar with your Event Espresso 4 software.

Then you can use the following to change the virtual page that Event Espresso uses:

add_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', 'my_custom_event_slug', 10, 2 );
function my_custom_event_slug( $slug, $post_type ) {
	if ( $post_type == 'espresso_events' ) {
		$custom_slug = array( 'slug' => 'eventslist' );
		return $custom_slug;
	}
	return $slug;
}

In the example above the events slug will be replaced with eventslist but you can change it to something else.

The code snippet can be added to a site specific plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Once that plugin is activated, then your calendar will appear on your WordPress page with a slug of events.


Lorenzo


gbox

May 27, 2014 at 9:33 am

Hi Lorenzo,

OK let’s take a few steps back. When I first got Event Espresso many years ago the documentation mentioned some shortcodes, one of which you could add to a wordpress page to display a calendar with the events on it. This is how I have always done things.

After upgrading today the same wordpress page does not display the calendar and looks messy the way events are listed.

I don’t care what I need to do to make the calendar work but so far all you are telling me is to add all this extra code and plugins to achieve this. Surely since there is a compatible calendar for EE4 there should be some easy way for events to display on a calendar? If so how? I’m getting confused by the replies as you seem to be saying that all this extra work needs to be done whereas in EE3 it was very simple. I can confirm I have downloaded the latest EE and calendar and both are activated. In simple terms how should these work together and what do I need to do ‘simply’ to make all my events appear on a calendar and not a list that I can ideally link to for my customers?

I cannot believe that in upgrading you have made such a basic things more complicated and can only assume we are not understanding one another.

Thanks
Gary


Lorenzo Orlando Caum

  • Support Staff

May 27, 2014 at 9:43 am

Event Espresso 4 is different than EE3.

In EE3, the event list page depended on the Espresso Events shortcode. In EE4, that WordPress page with that shortcode is no longer used as the page is now virtual (WP generated endpoint for the event CPT).

If you would like to show your calendar on the ‘events’ page then apply the following filter:

add_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', 'my_custom_event_slug', 10, 2 );
function my_custom_event_slug( $slug, $post_type ) {
	if ( $post_type == 'espresso_events' ) {
		$custom_slug = array( 'slug' => 'eventslist' );
		return $custom_slug;
	}
	return $slug;
}

You can add it to your child theme’s functions.php file or in a site specific plugin that you create: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

The filter above will reassign the ‘events’ page that is in use and make it available for the existing WordPress page.

Your calendar page should then appear on your page with a slug of ‘events’.


Lorenzo


gbox

May 28, 2014 at 7:52 am

Hi Lorenzo,

OK I’ve been playing with this more as your replies did not make sense to me. The shortcode [ESPRESSO_CALENDAR] works fine in EE4 and I can see the calendar display if the page is called events2 or trips (as I’ve now called the page). However if I try and add the shortcode to a page called Events it ignores it and instead displays the events as a list (and not very attractive list either). This seems a shame as my events page had google ranking etc and now I have to call the page something else to get the calendar to appear.

Now when I look at the calendar on my newly created ‘trips’ page I see some other issues. Events that are sold out don’t show up when I would ideally like them to if they are future events. I know EE4 does not support waiting lists yet but it would be nice to be able to see all future events, even those that are sold out.

I’ve also noticed old expired events showing up when the default should be to only show future events. I’ve looked at the events concerned and EE4 clearly shows the status as expired so why are they showing?

Look forward to your reply.

Gary
http://www.londonadventuregroup.org


Dean

May 29, 2014 at 2:15 am

Hi,

If WordPress sees a Custom Post Type with the same “slug” as a page (in this case, your page /events/ and our Custom Post Type /events/) the Custom Post Type wins and will be displayed.

What Lorenzo was suggesting is that through some code you can change what slug our Custom Post Type uses, so instead of it displaying on /events/ it would display on /eventslist/. This would then stop your existing events page from being blocked.

“not very attractive list either”

The events are styled via your theme as they are Custom Post Types.

“Events that are sold out don’t show up when I would ideally like them to if they are future events.”

Sold out events that are in the future should still display on the calendar by default. Can you check the event dates to make sure that they haven’t passed already?

“I’ve also noticed old expired events showing up when the default should be to only show future events”

Hmm this does seem to be the case. Even if it should show expired events, there should be a note in the tooltip which there isn’t. Thank you for reporting this, I will raise a ticket to look into it further.


gbox

May 30, 2014 at 2:53 am

Hi Dean,

OK I’ve finally understood what Lorenzo was saying. For the time being I will display the calendar on a new page called ‘Trips’. I would like to use my old ‘events’ page but I don’t fancy having to do what was suggested via a site specific plugin using FTP. I’m sure most EE3 users probably used the calendar feature which is a more attractive way to display events than the list form. I’m also sure most probably decided to display this calendar on a page called ‘events’. When creating EE4 I wish you had coded it so that you did not use the slug events and picked something users would be less likely to want to use themselves for a wordpress page. Asking users to jump through extra hoops seems the wrong way to approach this.

Please consider this thread still open as I still have issues with forthcoming events not appearing in the calendar (they do however show in list format). The problem seems to be with events that have status ‘sold out’ even though one such event is no longer sold out after cancellations.

The issue with old events appearing in the calendar is also still happening. I’m happy to give access to my website if anyone needs to look deeper.

Example of future event with 2 spaces following cancellations not appearing on calendar:

http://londonadventuregroup.org/events/gower-coastal-walking-weekend-1/

Example of future sold out event not appearing on calendar:

http://londonadventuregroup.org/events/trip-to-iceland-land-of-fire-ice-1/

Example of old event showing in calendar:

http://londonadventuregroup.org/events/volcano-trip-to-sicily-vulcano-stromboli-1/

Thanks
Gary
http://londonadventuregroup.org


Lorenzo Orlando Caum

  • Support Staff

May 30, 2014 at 5:47 pm

Hello,

Please let us know if this information addresses your concerns shared above and in your other support post:

https://eventespresso.com/topic/more-bugs-discovered-with-ee4/#post-99818


Lorenzo

Viewing 11 reply threads

The support post ‘Problem with calendar after upgrade’ 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