Event Calendar Pages do not Refresh

Home Forums Calendar Products Events Calendar PRO Event Calendar Pages do not Refresh

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1043850
    Sean
    Participant

    In our general settings we have “unchecked” the option to “Use Javascript to control date filtering” so that a user must click “Find Events” in the Tribe Events Bar or “Submit” in the Filter Bar to have their search initiated/search results refreshed. However, this does not change when the full pages refresh.

    The only time the page refreshes is when the user changes the View (List, Day, Month, Map, etc). When a search is performed or the user navigates the search results via “Previous Events” or “Next Events”, the page does not refresh.

    The is undesirable for us, as our ad Impressions will be very low. For example, a user could be on our calendar for 30 minutes in List view, but only 1 page view and 1 impression will be counted (the ad server counts impressions by page views and page refreshes). For a site such as ours that will rely on banner ad revenue (and where the calendar will be the primary feature), you can see how this has a substantial impact.

    Is there a snippet we can apply (or a setting elsewhere) that will allow us to have the Event Calendar pages refresh (in full) anytime the user performs a search or navigates the events via “Previous Events” or “Next Events”? If not, can you point us in the right direction to what would need to be modified in TEC (e.g. which files) if we need to hire a contractor to attain this functionality?

    #1044404
    adis
    Participant

    Hi,

    I have the same problem Topic here https://theeventscalendar.com/support/forums/topic/filter-bar-no-search-results-after-find-button-but-correct-after-page-reaload-browser/. = but no solution since yet.

    And similar problems here.

    Disable AJAX in Month View

    You wil find out thath if you are refreshing your browser by typed in words the results are correct.

    The goal is therefore; forcing a page refresh by submitting the find events button.

    The function code of the view change could be a help and replacing them of the find events, but I’m still testing the right.

    Regards

    #1044481
    Brook
    Participant

    Howdy guys,

    I definitely follow what you are after here. The technical term is you want to “disable ajax loads”. We used to try and support this, in a distant past version of the calendar we had a tutorial that allowed you to do this. But peoples sites were constantly breaking with these tutorials, almost every time they updated the plugin. It just proved too time consuming to support disabling ajax, and so we can only provide limited support for it.

    That post Adis linked to does help you disable Ajax for Month View though. Is that what you are looking for: https://theeventscalendar.com/support/forums/topic/disable-ajax-in-month-view/

    You could also request that we reinstate disabling Ajax as a feature. You can do this on UserVoice (feature suggestion page for The Events Calendar). From there we will watch the topic to see if it gets a lot of votes, and if it does we can definitely dedicate the time it will take to build and support this.

    Does that all make sense? Is that what you’re looking for? Please let me know.

    Cheers!

    – Brook

    #1044517
    Sean
    Participant

    Hi Brook,

    Appreciate the background info on this. When you say that sites were breaking each time the plugin was updated, was that simply because it was a complicated tutorial and the users were unable to correctly implement the modification? Or was disabling AJAX actually breaking The Events Calendar? Just want to ensure it was user error and not breaking the plugin itself before I look into hiring someone to tackle this customization.

    With that said, if you guys still have the tutorial available for disabling AJAX in TEC, would you be able to share that privately via direct email (or would it no longer be applicable to 4.0+ of TEC)? If it should still work when implemented correctly, I understand that there would be no support provided for it.

    Thank you.

    #1045062
    Brook
    Participant

    Howdy Karly,

    Appreciate the background info on this. When you say that sites were breaking each time the plugin was updated, was that simply because it was a complicated tutorial and the users were unable to correctly implement the modification? Or was disabling AJAX actually breaking The Events Calendar?

    Disabling ajax was breaking the calendar, and so fairly often we have to come up with new workaround to make the calendar continue working with ajax disabled.

    That said the tutorial and time I am referring to was around two years ago. A lot has changed since then, including getting a new lead developer on our project. One of the things he is helping us change is making our plugin less reliant on JavaScript for navigation, and thus less reliant on Ajax so disabling Ajax might not be as much of a problem now.

    With that said, if you guys still have the tutorial available for disabling AJAX in TEC, would you be able to share that privately via direct email (or would it no longer be applicable to 4.0+ of TEC)?

    The tutorial is very old, I don’t see it being helpful now. But that snippet in the post adis and I linked to is a good start. And the subsequent code the user shared sounds like it will be very helpful. The snippet:

    https://gist.github.com/jesseeproductions/e787d5dd5c0e943f172

    Let me know if you have any more questions. Thanks!

    • Brook

     

    #1045081
    adis
    Participant

    Hi,

    I think disabling Ajax totally is not necessary. disable-ajax-in-mont-view ist not a soluiton becaues it disables the filter bar.

    A “hook” in the search function forcing a page refresh could be the solution. Because the filter loads the query by executing the search (via Find Events). But for displaying the results the refresh is needed. And these results are correct, actually we are so Close…. awww

    I’m still researching the code and where to add him… but if you have any Ideas it would be great.

    Regards

    #1045708
    Brook
    Participant

    I am not aware of any such hook. Though that would be a great thing to add.

    Good point about that snippet disabling the Filter Bar, I had not thought of that.

    As far as I understand it Karly wishes to load the next/prev links without ajax. That JS snippet in the thread you linked is a good start, it does exactly that in Month view. Here’s one that does it in list view as well.

    https://gist.github.com/elimn/308b6a6a6259d4ac3b6b

    That would be the method I would recommend for disabling ajax paging.

    Thanks for helping Adis!

    • Brook
    #1045734
    Sean
    Participant

    Hi guys,

    Thanks for the continued discussion on this. I am indeed looking to load the next/prev links without ajax. I also want to disable ajax when initiating a search via either the Tribe Events Bar’s “Find Events” button or the “Submit” button in the Filter Bar.

    Brook, just to confirm, are you saying the above JS snippet you provided should work fine for loading the next/prev links without ajax? Or does your snippet also disable the Filter Bar?

    Adis, if you are able to figure out a solution I’d be interested in hearing about it, although it sounds like a hook would need to be added to core in order for a stable solution to be crafted?

    #1046656
    Brook
    Participant

    Howdy Karly,

    To my understanding my snippet does exactly what you want and does not disable filter bar. I believe it’s exactly what you wanted. Give it a test and let me know how it works for your needs. 🙂

    Cheers!

    – Brook

    #1047220
    Sean
    Participant

    Good morning Brook,

    I gave this a try on our staging site and it works great for both List and Month views! Thank you! If we also wanted to apply this functionality to Day and Map views, would that be possible? Or since Map view displays the Google Map, would there potentially be issues there?

    Kind regards,
    Karly

    #1050233
    Brook
    Participant

    Howdy Karly,

    It indeed is not possible with Map View, or Photo. However, it is possible with the other views. I just updated that snippet to include all of the views.

    https://gist.github.com/elimn/308b6a6a6259d4ac3b6b

    We are working on improving our JS. A side effect of this will be that eventually you should be able to disable ajax paging on Photo and Map views as well. To be up front though, this is not a very high priority right now and it might a number of months before our JS is fully fleshed out here. It is also possible that once we do have an improved setup it will actually break the above snippet, and I will need to rewrite portions of it to be compatible with that version of The Events Calendar. I know that’s not what you want to hear, but I hope you appreciate me leveling with you. 🙂

    Please let me know if you have any more questions or anything. Cheers!

    – Brook

    #1050724
    Sean
    Participant

    Hi Brook,

    Thank you very much for updating this for the other compatible views, I really appreciate it! And completely understand that it may break in future versions and that the ability to disable ajax paging on all views isn’t likely to happen in the short term. In the meantime, this snippet will be the next best thing 🙂

    Thanks again for all of your help with this!

    #1050858
    Brook
    Participant

    You’re super welcome!

    • Brook
Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Event Calendar Pages do not Refresh’ is closed to new replies.