Tribe-Events-Nav-Next Disappearing when publishing new Event

Home Forums Calendar Products Events Calendar PRO Tribe-Events-Nav-Next Disappearing when publishing new Event

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #1122167
    Craig
    Participant

    An issue came up with the first event we published using the “Add New” event UI. All other events have been imported.

    When the event is published, the link to the next month – tribe-events-nav-next – disappears. I did the same thing on my local machine, and the same thing happened.

    I have disabled all none Tribe plugins and have switched to Twenty Fourteen, but the issue remains. We do have events in the following months, by the way. The one we published was for June (this month).

    #1122172
    Craig
    Participant

    Interestingly, when I added an event for July (next month), the next nav appeared again. To reiterate, though, I did have events for July in the calendar already. I’m just adding this to help with debugging.

    Thanks,
    Craig

    #1122414
    Andras
    Keymaster

    Hi Craig,

    Thanks for posting this issue and testing already for plugin conflicts!

    Could you share your system information with me? Here’s a nice post on how to do that.

    Also, can you share some more details on the process? First, future events were imported (for past current month), then a new event was added for current month?

    How was the import done? File or link? Could you share that perhaps?

    Thanks and cheers,
    Andras

    #1122415
    Craig
    Participant

    This reply is private.

    #1122417
    Craig
    Participant

    Hi Andras,

    I’m beginning to suspect this issue is due to the same problems I had before with the calendar not displaying events.

    As I looked into things further today, I noticed that publishing a new event not only killed the nav-next link. It also deleted all the stock and price information I had in Woocommerce Tickets (Tickets Plus).

    To get all those tickets in there, I used the Woocommerce CSV Import Suite and linked the tickets to the events using the _tribe_wooticket_for_event field.

    I have no idea how Events Calendar could wipe out that information, but it does – completely – just about every time a change is made in Events.

    The process was as follows:
    1. Import Existing Events Using Events Calendar Importer.
    2. Import Tickets Using Woocommerce CSV Import Suite.
    3. Any new events are added using the Events Calendar front end UI.

    This last action killed the next-nav link, and the stock and price information for the Tickets.

    Thanks,
    Craig

    #1123480
    Craig
    Participant

    Hi Andras,

    Can you give me a hand on this still?

    I’ve isolated the problem to just the issue with the next-nav disappearing. Even if we add events in subsequent months, the next-nav still does not appear. If we are using the UI (instead of importing with a third-party plugin), then the system should definitely recognize it as added and display the next nav link.

    Thanks,
    Craig

    #1124435
    Nico
    Member

    Hi Craig,

    Thanks for following up and sorry for the delay. Andras is out sick for a few days now, and this ticket was out of our radar until I saw it today!

    We have just released version 4.2 of all our plugins (take a look) and one of the new features is the ability to import tickets with the CSV importer. Would you like to give this a new try? I see you have lots of events in your site and maybe if they are working correctly it might be a big lift to re-import all of them but can you please test this with a small sample of events in a test site?

    Also, just check if simply updating the plugins fixes this or changes the issue in any way.

    And finally to summarize this issue, it’s only happening for events that were already imported or if you manually create an event in July (for example) it will enable pagination until that month?

    Sorry again for the delay hope we can nail this soon,
    Best,
    Nico

    #1124758
    Craig
    Participant

    Hi Nico,

    Thanks for following up.

    After downloading and manually installing the 4.2 updates on my dev machine, unfortunately, all my stock and ticket sales info from Woocommerce has been wiped out.

    And the problem of the next-nav field is not better either. I’m going to try to delete all the tickets and re-import them using your new feature.

    I’ll get back to you with my progress.

    Thanks,
    Craig

    #1124986
    Nico
    Member

    Thanks for the update Craig and sorry again for the hassle here!

    Have a great weekend,
    Nico

    #1126688
    Craig
    Participant

    This reply is private.

    #1126697
    Craig
    Participant

    You’ll see $latest_date from my the system information dump equals 8/13/16. First of all, we have events scheduled after that, so that’s not being calculated correctly. Second, we’re not seeing even August show up in the “tribe-events-nav-next” link.

    Instead of trying to diagnose what the problems, it would be good for me to be able to make sure the calendar shows up for, say 8 months from the current month.

    Could someone help me write this for my theme’s functions file?

    Thanks,
    Craig

    #1127898
    Nico
    Member

    Hey Craig,

    Sorry for the delay on this! Try pasting the snippet below in your theme (or child theme) functions.php file:


    /* Tribe force next month pagination */
    function tribe_hijack_next_month_link() {

    // hijack date
    $hijack_date = '9/1/2016';

    $html = '';
    $url = tribe_get_next_month_link();
    $text = tribe_get_next_month_text();

    $date = Tribe__Events__Main::instance()->nextMonth( tribe_get_month_view_date() );

    if ( $date <= date( Tribe__Date_Utils::DBYEARMONTHTIMEFORMAT , strtotime($hijack_date) ) ) {
    $html = '' . $text . ' »';
    }

    echo $html;
    }

    if ( class_exists (Tribe__Events__Main) ) {
    add_filter( 'tribe_events_the_next_month_link', 'tribe_hijack_next_month_link' );
    }

    Change the value of the $hijack_date variable to the first day of the month you want to force this to show.

    Also, I think you are right and there’s an issue with how the plugin is calculating the latest day with events in your calendar. If you would like to continue to troubleshoot this please let me know!

    Best,
    Nico

    #1128025
    Craig
    Participant

    Hi Nico,

    Hmm…now I’m getting some really strange behavior. I put the code in (after replacing the HTML Entities with the PHP code needed).

    I see the links to the next month. When I click the link, though, it is now showing me January 2001 (which has no events). The URL says /2016-07/. If I hit that URL without hitting the next-nav link, then I get the July 2016 calendar (as I should).

    It does not matter what month I click on for the Next-Nav link. It always goes back to January 2001. I checked to see if this was the $earliest_date, but it isn’t. It also doesn’t matter what date I set as the $hijack_date.

    If you want to see this, you can go to http://1de.e4c.myftpupload.com/sewing-classes/

    So I guess we’ll have to debug more…

    Thanks,
    Craig

    #1128770
    Nico
    Member

    This reply is private.

    #1132614
    Nico
    Member

    This reply is private.

Viewing 15 posts - 1 through 15 (of 20 total)
  • The topic ‘Tribe-Events-Nav-Next Disappearing when publishing new Event’ is closed to new replies.