• Resolved idearius

    (@idearius)


    Hello. From a date we could not specify, the calendar looks empty though there are several future and past events saved. When trying to view an event from the WP admin or logged out, the event URL returns a 404 error. There are no error messages.

    We tried this:

    • Look for related tickets here and elsewhere.
    • Follow recommended TEC testing procedures.
    • Check the TEC Troubleshooting section (only detected an issue with the Google Maps API key).
    • Clear cache, and disable cache (currently off).
    • Reset permalinks.
    • Check and simplify .htaccess.
    • Check hosting account PHP version (7.4 updated) and settings.
    • Test with the Twenty Twenty default WP theme.
    • Disable all plugins and enable one by one.
    • Check the db and even clean old tables and lines from plugins no longer installed.
    • Check php.error.log (mostly Toolset Types errors).
    • Export events / places / organizers using WP All Export, delete every event / place / organizer, uninstall the plugin, clean the db, reinstall the plugin, import events with WP All Import (Beware that dates and times of the events are not maintained! That’s a known issue for TEC.).

    Plugin and theme info:

    • Events Shortcodes For The Events Calendar 2.3.1
    • The Events Calendar 6.0.12
    • Astra theme 4.1.3
    • WordPress 6.2
    • All other active plugins updated.

    Any ideas of what to do next?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter idearius

    (@idearius)

    PS: Lately errors like this one are accumulating in the log:

    [24-Apr-2023 18:53:53 UTC] WordPress database error Table 'XXXXXXXX_XXXXXXXX.wp_tec_occurrences' doesn't exist for query 
    			SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID
    			FROM wp_posts  INNER JOIN wp_tec_occurrences ON wp_posts.ID = wp_tec_occurrences.post_id
    			WHERE 1=1  AND ( 
      CAST(wp_tec_occurrences.end_date_utc AS DATETIME) < '2214-04-27 03:00:00'
    ) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish'))
    			GROUP BY wp_tec_occurrences.occurrence_id
    			ORDER BY wp_posts.post_date ASC
    			LIMIT 0, 11
    		 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/the-events-calendar/src/views/v2/default-template.php'), Tribe\Events\Views\V2\Template_Bootstrap->get_view_html, Tribe\Events\Views\V2\View->get_html, Tribe\Events\Views\V2\Views\List_View->setup_template_vars, Tribe\Events\Views\V2\View->setup_template_vars, Tribe\Events\Views\V2\Views\List_View->next_url, Tribe\Events\Views\V2\Views\List_View->get_upcoming_url, Tribe__Repository->count, WP_Query->get_posts, apply_filters_ref_array('posts_pre_query'), WP_Hook->apply_filters, TEC\Events\Custom_Tables\V1\WP_Query\Modifiers\Events_Only_Modifier->filter_posts_pre_query, TEC\Events\Custom_Tables\V1\WP_Query\Custom_Tables_Query->get_posts, WP_Query->get_posts

    I’ve now seen some other posts referring to errors with the wp_tec_occurrences table…

    Plugin Support Darian

    (@d0153)

    Hi @idearius

    Thanks for reaching out. Let me help you with this one.

    To clarify, did you add all your events through WP All Import/Export plugin? If so, then this could be the reason why you’re having this issue since we currently have incompatibility with WP All Import (Internal Bug Ticket: TEC-4516).

    If that’s not the case, could you try creating a test event and see if it will show in your events page?

    Let me know how it goes.

    Thread Starter idearius

    (@idearius)

    Hello, @d0153. Thanks for answering.

    Events were already there. WP All Import was just a (failed, due to the bug you mentioned) way to try not to lose them after a full uninstallation of the plugin. I had to restore the whole database, instead of just the events’ entries. ??

    I created a test event and it SHOWS just fine! How is this possible?

    There are about 200 past and future events in the system. Should we recreate each one of them to have the calendar back again with all past events included??

    Plugin Support Darian

    (@d0153)

    Hi @idearius

    To clarify, does the issue only occur after you have migrated your events, or have you not migrated your events yet? You can check it by navigating to Events > Settings > Upgrade.

    Could I ask the value of the following from your System information (Events > Troubleshooting).

    • Custom Tables Migration Status
    • Custom Tables Health Check

    Please do not include all your system information in your response. This is to follow WordPress Forum Guidelines.

    Looking forward to your response.

    Thread Starter idearius

    (@idearius)

    Hello again, @d0153.

    The migration was just part of an attempt to solve the problem once it had already surfaced. In my original post, please look at the last item of the “We tried this:” bullet list.

    In fact, the export/import operations ended up having no effect whatsoever, as I finally had to delete all tables and restore a prior full backup of the database (which had all the events there from the start) due to the inability of WP All Import to restore the time of each event. That full backup, regrettably, already had the problem, too.

    Here’s the troubleshooting info you asked for:

    Custom Tables Migration Status
    Not Required
    Custom Tables Health Check
    Good!

    Let me know if there’s anything else you need or I can do.

    Best.

    Plugin Support Darian

    (@d0153)

    Hi @idearius

    Could you try editing the date/time of an event that has an issue, click update, and see if that makes a difference?

    If that helps, then you could try doing the same thing with your other events. Or you could try reverting the event migration and migrating them again.

    Follow these steps to revert:

    1. Install the free Code Snippets plugin.
    2. In your dashboard, go to Snippets > Add New and copy the snippet below.
    3. Select Only run once.
    4. Save and Activate the snippet.
    add_action( 'init', function () {
      // Will attempt to force a revert of tables and metadata
      tribe( \TEC\Events\Custom_Tables\V1\Migration\Process_Worker::class )->undo_event_migration( ['started_timestamp' => 1] );
    } );

    After that, go to?Events > Settings > Upgrade. From there, follow the instructions to go through the migration preview and then the migration itself. Once the migration is complete, check if you’re still having the same issue.

    Please do the re-migration on your?staging site.

    Plugin Support Darian

    (@d0153)

    Hi @idearius

    I hope you are well. Are you still experiencing the issue after trying the recommendation above?

    If you do have other concerns or issues you need help with, please create another support topic as indicated in the www.ads-software.com support guidelines.

    Thread Starter idearius

    (@idearius)

    Hello, @d0153. Many thanks for your help.

    The problem has been solved with the plugin and code you mentioned, forcing a new migration to the event data format used in the plugin version 6.

    It’d be great if The Events Calendar included such solution, instead of having to rely on an additional plugin and custom code. Also, as it seems this problem is rather common, improving the visibility of the solution you provided could help many users and save you guys some time.

    Finally, regarding your second answer to this ticket, at first I thought your reference to the migration of events was related to my attempts to backup the events data, not to the migration to the event data format used in the plugin version 6. It would help if in future responses to similar tickets you could include an explicit reference to what migration you are referring to.

    Best regards.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Calendar looks empty and direct access to events return 404 errors’ is closed to new replies.