Events automatically end & archive after a few hours

The events my client's users are creating are ticket based and do not occur at a specific time, nor do they end until all tickets have been purchased. Milan Savaliya on your staff previously created a custom extension for me to remove the end time (Thank you Milan :slight_smile: ).

However, after the WP update, the extension started causing some quirks in the event posting and editing functionality, so I have disabled it. Events may be created no problem, but now the events automatically end and change to "archived" after just a few hours. I'm also seeing some issues with the date and time format.

1) Has anyone created a way to disable the date and time option all together yet?
2) Is there a way to disable just the time?

If not, can Milan, or someone possibly look at the extension in my plugins and get it back to working status?

My clients users aren't technically savvy whatsoever, so I'm just trying to make the interface as simple possible. Otherwise, I fear my client will lose users rapidly, and obviously, that's not good for him, or I.

Thanks in advance guys :slight_smile:

  • Tyler Postle

    Hey there Ashley,

    Hope you're doing well today. There isn't a way to disable the date and time from within the plugin yet; however, I'm going to flag this for Milan so he can have a look at the extension and see if he can make it compatible with the most recent WP update.

    Given that this involves some custom work, his reply might take a little longer :slight_smile: but soon as he sorts it out he'll reply back here.

    Enjoy the rest of your day and we'll talk to you soon. Let us know if you have any further questions in the meantime.

    Cheers,
    Tyler

  • Milan

    Hello Ashley ,

    Hope you are doing well. :slight_smile:

    I am glad that at least solution worked till now. There has been many changes took place in latest WordPress so it may be possible that my extension is not playing well with that. :slight_smile:

    But before i start my digging on my extension, I would like to know few things first here, so please hold on with me and answer my few questions first. :slight_smile:

    However, after the WP update, the extension started causing some quirks in the event posting and editing functionality, so I have disabled it. Events may be created no problem, but now the events automatically end and change to "archived" after just a few hours. I'm also seeing some issues with the date and time format.

    You are saying that you've disabled extension after some quirks. But will you be kind enough and explain me what are those ? Also second part of this question


    Events may be created no problem, but now the events automatically end and change to "archived" after just a few hours. I'm also seeing some issues with the date and time format.

    is this happening when extension is in active mode or its happening even if extension is disabled ? It will help me to determine is it extension which is causing this or its issue with plugin itself. :slight_smile:

    I'm also seeing some issues with the date and time format.

    Like what ?

    1) Has anyone created a way to disable the date and time option all together yet?

    No, no one yet except me for you. :slight_smile:

    Looking forward to hearing back Ashley . :slight_smile:
    Cheers,
    Milan

  • Ashley

    Hi, sorry about the massive delay. Okay, so, I don't think the extension is causing any issues anymore, if in fact it ever was. At the time I submitted the inquiry, I was working with Memberships 2 and BuddyPress, which weren't playing nice AT all. I could only visualize tangled Christmas lights, as I was trying to troubleshoot the issues between the two. Long story short, I removed Memberships and replaced it with a very basic role editor. When I did that, a lot of the little glitches I had been experiencing disappeared.
    So, moving here's the updated version on what I'm facing now--
    I've tested events with the extension disabled, as well as active. Results are identical as far as I can tell, were the two main issues are :

    1) Time Format:
    I can't get the event time to switch from 24hr format to 12hr, despite my settings being set for 12hr. Also, is there a drop down that can be used for the time instead of manual input?

    2) Event Auto Archive:
    When events are posted from the front end, they auto archive after an hour or two. Note, they only have the start date fields on the front end.
    So, I tested the auto archiving occurrence with two events, one posted with the time field untouched, and another posted with the time set at 00:01.
    I did 00:01, because I noticed when posting from the dashboard, that if you set the time to 00:01, it bypasses the end time, and the event stays "open", rather than archiving.
    I was hoping this would be true for posting from the frontend as well, but unfortunately, it's not.
    End result-- Both events auto archived after a few hours.

    ----end info----

    Not to overload you, but there have been a few things that have made me wonder if something is off in my Events+ install--
    A) No Status Change Notice on Event:
    When an event is archived or cancelled, it doesn't show a notice reflecting the status change anywhere. (not on the event, or the archive ("events" page), nor on the BP profile events section)
    - Is this how it's built, or are there actually supposed to be notices when an events status' changes?

    B) The site is set up for manual payment, which basically walks the user through an agreement to commit to purchase the ticket, after they have clicked the "purchase ticket" button. I tested the process, and after completing the manual purchase prompt (essentially "paying"), I returned to my BP profile events section, but the event shows as unpaid. Upon returning to that specific event's page, I expected there to be a message notifying me that I've already paid for this event, but there wasn't. It was actually the same page requesting that I complete my manual purchase.

    Let me know if you want me to submit a separate ticket for any of these items. I know it's a lot.

    Thanks so much in advance though. I really appreciate you creating the extension. That alone was more than I could ask for! :slight_smile:

  • Milan

    Hello Ashley

    Hope you are well today and thanks for getting back to me. :slight_smile:

    I don't think the extension is causing any issues anymore, if in fact it ever was

    Glad to know. Now we can focus our finding in context of plugin only. :slight_smile:

    1) Time Format:
    I can't get the event time to switch from 24hr format to 12hr, despite my settings being set for 12hr. Also, is there a drop down that can be used for the time instead of manual input?

    There isn't any dropdown which we can use to select time. :slight_smile: Actually the way our Events+ plugin handles time is like, "You can enter time in 12 hours format but it will be converted to 24 hours once you save/update your event""

    But if your time format in Settings > General > Time Format set to 12 hours, then our plugin will display time in 12 hours format on front end. Please see these screenshots for confirmation. :slight_smile:

    2) Event Auto Archive:
    When events are posted from the front end, they auto archive after an hour or two. Note, they only have the start date fields on the front end.
    So, I tested the auto archiving occurrence with two events, one posted with the time field untouched, and another posted with the time set at 00:01.
    I did 00:01, because I noticed when posting from the dashboard, that if you set the time to 00:01, it bypasses the end time, and the event stays "open", rather than archiving.
    I was hoping this would be true for posting from the frontend as well, but unfortunately, it's not.
    End result-- Both events auto archived after a few hours.

    If I am not wrong then you have hidden end date input right ? If yes then by default [eab_event_editor] shortcode sets event's ending date just one hour after its ending date. Please see this attached screenshot.

    If you also wants to set it to too far from its starting date, then please do use this custom snippet I've written for you. :slight_smile:

    jQuery(document).ready(function($) {
    	$("#eab-events-fpe-start_date").change( function() {
        var startDateInput = $(this);
           var endDateInput = $("#eab-events-fpe-end_date");
    
           var startDateAsRawString = startDateInput.val();
           var startDate = new Date(startDateAsRawString );
    
           //console.log( startDate );
    
           var endingDate = new Date( startDate.getFullYear() + 2, startDate.getMonth(), startDate.getDay() );
           endingDate.setHours( startDate.getHours(), startDate.getMinutes(), startDate.getSeconds() );
    
           endDateInput.val( endingDate.getFullYear() + "-"
                            + endingDate.getMonth() + "-"
                            + endingDate.getDay() );
      });
    });

    You may want to use this snippet manager plugin to manage this,
    https://wordpress.org/plugins/code-snippets/

    A) No Status Change Notice on Event:
    When an event is archived or cancelled, it doesn't show a notice reflecting the status change anywhere. (not on the event, or the archive ("events" page), nor on the BP profile events section)
    - Is this how it's built, or are there actually supposed to be notices when an events status' changes?

    Yes this is how it's built. But I think adding this functionality could be very good feature. So I am going to create feature request for this. If this gets approved by our higher authority then this will be added in future. For now there isn't any way to get such notices.

    B) The site is set up for manual payment, which basically walks the user through an agreement to commit to purchase the ticket, after they have clicked the "purchase ticket" button. I tested the process, and after completing the manual purchase prompt (essentially "paying"), I returned to my BP profile events section, but the event shows as unpaid. Upon returning to that specific event's page, I expected there to be a message notifying me that I've already paid for this event, but there wasn't. It was actually the same page requesting that I complete my manual purchase.

    For this I suggest you to open new thread as its quite off context to our this thread. :slight_smile:

    Looking forward to hearing back!
    Cheers,
    Milan

  • Ashley

    Alrighty, thank you for everything!

    1) The time now appears correct as 12hr format!

    2) I added a snippet via the plugin you suggested and pasted in the JQuery code above. This is definitely working (woohoo!!), but I just noticed that the events still disappear from the "Upcoming Events" widget :disappointed:
    Is this an entirely new problem to solve or do you think it's fairly simple?

    A) Okay, thank you!

    B) I went ahead and opened a new ticket with this item.

  • Milan

    Hello Ashley

    Hope you are well today and thanks for getting back to me. :slight_smile:

    1) The time now appears correct as 12hr format!

    Glad to know. :slight_smile: Thanks for confirming.

    2) I added a snippet via the plugin you suggested and pasted in the JQuery code above. This is definitely working (woohoo!!), but I just noticed that the events still disappear from the "Upcoming Events" widget
    Is this an entirely new problem to solve or do you think it's fairly simple?

    Do you mean that events are not being archived now ? But those are also not showing on "Upcoming Events" right ? If this is the case then I would like to take closer look at your setup one more time and for that you'll need to enable support staff access to your site. In addition to staff access, please also include page link where I can see "Upcoming Events" widget in action.

    A) Okay, thank you!

    No problem. :slight_smile:

    B) I went ahead and opened a new ticket with this item.

    You are really well follower of instructions. Thanks you for this. :slight_smile:

    Looking forward to hearing back Ashley :slight_smile:
    Cheers,
    Milan

  • Ashley

    The events are being archived, but just not showing on the active events widget. The widget can be seen almost from every page, but you can see both items at /events. I also included the url in the support section of the dashboard.

    Need to extend event end time within snippet--
    I tested an event and it ended after a day or so. Ideally, the event would end or be marked as "sold out" once all of the tickets have been purchased . I suspect this would be an in depth revision, so I just need to extend the time period in which the events are active. Can you easily direct me how to do so in the snippet?

  • Milan

    Hello Ashley

    Hope you are well today ?

    The events are being archived, but just not showing on the active events widget. The widget can be seen almost from every page, but you can see both items at /events. I also included the url in the support section of the dashboard.

    Thanks for directing me to widget's location. Actually you have set widget to look up events 2 week ahead. And it is showing events without any issue. I confirmed this by creating one dummy event which was about to take place in next 13th of this month. Please take a look at these screenshots. ( For now I've deleted that event :slight_smile: )

    Need to extend event end time within snippet--
    I tested an event and it ended after a day or so. Ideally, the event would end or be marked as "sold out" once all of the tickets have been purchased . I suspect this would be an in depth revision, so I just need to extend the time period in which the events are active. Can you easily direct me how to do so in the snippet?

    You are talking about snippet for front end right ? If yes then snippet should set ending date 2 years ahead of its starting date. That's how I written it !! Can you please copy it again and save ?

    Let me know how it goes.
    Cheers,
    Milan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.