Home › Forums › Calendar Products › Events Calendar PRO › Tribe-Events-Nav-Next Disappearing when publishing new Event
- This topic has 20 replies, 4 voices, and was last updated 9 years, 9 months ago by
Craig.
-
AuthorPosts
-
June 3, 2016 at 8:18 am #1122167
Craig
ParticipantAn 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).
June 3, 2016 at 8:26 am #1122172Craig
ParticipantInterestingly, 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,
CraigJune 3, 2016 at 4:03 pm #1122414Andras
KeymasterHi 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,
AndrasJune 3, 2016 at 4:06 pm #1122415Craig
ParticipantThis reply is private.
June 3, 2016 at 4:16 pm #1122417Craig
ParticipantHi 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,
CraigJune 7, 2016 at 10:11 am #1123480Craig
ParticipantHi 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,
CraigJune 9, 2016 at 6:56 am #1124435Nico
MemberHi 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,
NicoJune 9, 2016 at 1:54 pm #1124758Craig
ParticipantHi 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,
CraigJune 10, 2016 at 5:29 am #1124986Nico
MemberThanks for the update Craig and sorry again for the hassle here!
Have a great weekend,
NicoJune 14, 2016 at 7:54 am #1126688Craig
ParticipantThis reply is private.
June 14, 2016 at 8:02 am #1126697Craig
ParticipantYou’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,
CraigJune 16, 2016 at 8:17 am #1127898Nico
MemberHey 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,
NicoJune 16, 2016 at 10:34 am #1128025Craig
ParticipantHi 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,
CraigJune 17, 2016 at 10:37 pm #1128770Nico
MemberThis reply is private.
June 27, 2016 at 2:33 pm #1132614Nico
MemberThis reply is private.
-
AuthorPosts
- The topic ‘Tribe-Events-Nav-Next Disappearing when publishing new Event’ is closed to new replies.
