Support

Home Forums Event Espresso Premium My List not sorting & newly added rss

My List not sorting & newly added rss

Posted: January 28, 2024 at 5:50 pm


Amy

January 28, 2024 at 5:50 pm

I’m using the short table version of My Events. Recently it stopped sorting in chronological order and the datetime is no longer showing up.

Also, is there a way to create a list of events based on create date? I want to show events recently added to the calendar.

Thanks!


Rio

  • Support Staff

January 28, 2024 at 8:53 pm

Can you send us the URL where i can see that list? Also, can you tell us how are you showing them? are you using shortcode? can you also send the shortcode you’re using?

thanks


Amy

January 29, 2024 at 3:07 am

You can’t see the page without logging in. https://htxoutdoors.com/my-events/

I’m using this short code. [ESPRESSO_MY_EVENTS template=simple_list_table]

I think there was actual code that I put in the child theme but I can’t remember.

I think it might be sorting by date signed up but can’t be sure.

Here’s a picture of the table that’s showing up.
View of my events


Rio

  • Support Staff

January 29, 2024 at 6:13 am

We’re not able to see the picture, if you can upload it to drive and share it to us, it would be great. Another option is to use loom https://loom.com/ or monosnapp app.

You can see parameters here.
https://eventespresso.com/wiki/wp-user-integration/

It is possible that you put some code in the child theme, you can share to us, and we might be able to point out what code is it.

thanks


Amy

January 29, 2024 at 6:36 am

This brings up another problem. Something is changing my Default_role every night from Subscriber to Administrator. So everyone who registers is getting full admin rights.

My Events

https://www.dropbox.com/scl/fi/fndyybvl8o9fjaz63f81i/My-events-error.png?rlkey=in8ayrfijsv9kw65hnkyyb7qq&dl=0

User Integration Setting:


Amy

January 29, 2024 at 6:40 am

This reply has been marked as private.


Amy

January 29, 2024 at 6:45 am

This reply has been marked as private.


Tony

  • Support Staff

January 29, 2024 at 3:10 pm

Hi there,

Just to answer this so it isn’t missed:

Also, is there a way to create a list of events based on create date? I want to show events recently added to the calendar.

We don’t have an event list based on the creation date within EE, we use the Datetime Start/End dates but I do see how the above could be useful and will add it for further discussion.

As it stands you would need custom code for this.

I’m using the short table version of My Events.

Short table? Do you mean the simple_list_table template?

Can you post the full shortcode for the My Events output you are using, please?

I added the customization. This is Tony’s github code to add the cancel button. I checked github and didn’t see any recent updates.

That snippet does 2 things.

The first adjusts the query args used on the My Events section.

It sets the My Events section to stop loading ‘expired’ events and adjusts the query args for the event_section template to loading based on Datetime in ASC order.

It does NOT adjust the simple_list_table template to load the events based on Datetime order. For that you would need to add:

$query_args['order_by'] = array('Event.Datetime.DTT_EVT_start' => 'ASC');

The condition for the simple_list_table is this section:

if ($template_args['object_type'] === 'Registration') {

So that would look like this:

if ($template_args['object_type'] === 'Registration') {
	$query_args[0]['Event.Datetime.DTT_EVT_end'] = array( '>=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_end'));
	$query_args['order_by'] = array('Event.Datetime.DTT_EVT_start' => 'ASC');
}

The second part of that snippet adds the cancel reg icon.

You mentioned the Datetime isn’t showing up?

The simple_list_table section doesn’t display a DateTime, are you using a custom template with that in which now isn’t loading?

—-

This is another customization file but I don’t think it has anything to do with My_events.

Your are correct, it doesn’t do anything to My Events but thank you for adding it in to be sure 🙂

The support post ‘My List not sorting & newly added rss’ 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