rileywebdev
Forum Replies Created
-
Hi Darian,
I’ve found out that removing the event header and footer in single-event.php prevents the error from popping up. Essentially, getting rid of tribe_the_prev_event_link and tribe_the_next_event_link solves the problem. This is the code I removed:
Header:
<!-- Event header --> <div id="tribe-events-header" <?php tribe_events_the_header_attributes() ?>> <!-- Navigation --> <nav class="tribe-events-nav-pagination" aria-label="<?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?>"> <ul class="tribe-events-sub-nav"> <li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>«</span> %title%' ) ?></li> <li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>»</span>' ) ?></li> </ul> <!-- .tribe-events-sub-nav --> </nav> </div> <!-- #tribe-events-header -->Footer:
<!-- Event footer --> <div id="tribe-events-footer"> <!-- Navigation --> <nav class="tribe-events-nav-pagination" aria-label="<?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?>"> <ul class="tribe-events-sub-nav"> <li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>«</span> %title%' ) ?></li> <li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>»</span>' ) ?></li> </ul> <!-- .tribe-events-sub-nav --> </nav> </div> <!-- #tribe-events-footer -->I’m using PHP 8.1, MySQL 8.0.33, WordPress 6.2.2.
Viewing the events/venues on the frontend doesn’t trigger the error. Could this be related to a cron job? I can’t find any way to trigger the error, other than waiting for about a day — then it will pop up seemingly randomly. The error always comes in sets of two: one error mentions tribe_the_prev_event_link, and the other error mentions tribe_the_next_event_link. Sometimes just one set of errors shows up, sometimes its multiple sets, and sometimes more sets of errors pop up throughout the day.
I’m using a custom single-event.php template but I’ve set it to the default code for this course of testing.
I was able to prevent the error from popping up, but I want to keep the prev/next event buttons without it producing an error.
- This reply was modified 2 years, 11 months ago by rileywebdev.