Error which then stops all posts on main blog feed

Home Forums Calendar Products Events Calendar PRO Error which then stops all posts on main blog feed

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1110840
    simon
    Participant

    woke up this morning to find that no blog posts where showing in the main wordpress feed – even though all the past were still in the relevant individual pages.

    i have my events calendar pro set to show events in the main blog feed

    i have checked and disabled /enabled all the plugins and events calendar pro is the source of the conflict.

    so events calendar pro is now deactivated and the site appears to work fine – obviously though this causes a lot or problems in my calendar as have extensively used recurring events

    this is the error code that appears, but i’m at a loss to understand what it means

    [05-May-2016 05:08:08 UTC] WordPress database error Unknown column ‘EventStartDate’ in ‘order clause’ for query
    SELECT
    SQL_CALC_FOUND_ROWS *
    FROM (
    SELECT DISTINCT bc_posts.* FROM bc_posts INNER JOIN bc_term_relationships ON (bc_posts.ID = bc_term_relationships.object_id) LEFT JOIN bc_postmeta as bc_postmeta on bc_posts.ID = bc_postmeta.post_id AND bc_postmeta.meta_key = ‘_EventStartDate’ WHERE 1=1 AND (
    bc_term_relationships.term_taxonomy_id IN (4784)
    ) AND bc_posts.post_type IN (‘post’, ‘tribe_events’) AND (bc_posts.post_status = ‘publish’) ORDER BY post_date DESC
    ) a
    GROUP BY IF( post_parent = 0, ID, post_parent )
    ORDER BY EventStartDate DESC
    LIMIT 0, 8
    made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

    Thank you for any help

    #1110868
    Geoff B.
    Member

    Good evening Simon and welcome back!

    Thank you for reaching out to us.

    We are sorry to hear about the events not showing up in your WordPress feed.
    I would love to help you with this topic.

    Just to get started on the right foot, could you confirm if by feed you mean your site’s home page ?

    Secondly, could you tell me which version of Events Calendar Pro you are using ?

    Finally, could you tell me if the problem persists if you temporarily switch back to a default WordPress theme such as twenty-fifteen ?

    Best regards,

    Geoff B.

    #1110885
    simon
    Participant

    Hi Geoff

    the problem is that, since about 12 hours ago, if i have events calander pro activated – no posts at all or events appear in the main blog feed. the page is just white and says no events found in that archive.

    in wordpress settings i have settings/reading -front page: show your latest posts –
    this page is also set as my home page

    all versions of events calander are uptodate – see attached image (from memory the last update was just a few days ago)

    as a theme i’m using a child them of twenty-eleven with no complex customisation. havent changed any part of the theme for quite a while.

    the error message included in the above post started occurring 04-May-2016 17:58:44 UTC – crumbs does that mean a whole day with a blank fornt page..

    i have checked back to the events added on the 4 may, but cant see any obvious problems with them

    cheers

    #1111330
    Geoff B.
    Member

    Hey Simon,

    Thank you for your detailed answer. That helps a lot.

    Based on what I am seeing, the most likely potential cause I see is that you might have some template customization that needs updating in your child theme to work with the latest version of Pro.

    This is usually found in either the <b>/tribe-events/</b> folder of your WordPress theme’s directory or in its <b>functions.php</b> file.

    Displaying in the latest post feed is not default WordPress behaviour, so I would start by looking in the following places: functions.php, archive.php, index.php

    In fact, if you don’t mind, could you send me a copy of your child theme in a zip file (in a private reply)

    Let me know if you find anything there ?

    Best regards,

    Geoff B.

    #1111358
    simon
    Participant

    This reply is private.

    #1111726
    Geoff B.
    Member

    Hey Simon,

    Thank you for providing all that information.

    Based on looking at your files and based on your specific situation, I would like to clarify what I said earlier:

    1. As we release different updates of our plugins, there are some functions that change or get deprecated.
    2. As a result, if you have customizations that use some of these functions, they might break
    3. Furthermore, there were some important changes made in WordPress 4.5.x in the way some the filter queries are made

    All that to say that I am pretty sure that the code that is causing the error is found in lines 15 to 22 of the functions.php file of your child theme.

    Just to set expectations, as you might know, the scope of our support is mostly to get our customers started on the right track and to help them in case of issues. We unfortunately do not provide complete support for customization.

    So my recommendation would be to temporarily remove these lines (if I’m not mistaking, this will also remove the events from your latest post feed) until you can repair that function OR hire one of our recommended customizers to fix the customization for you.

    As per your second question, as far as I know, when you deactivate Pro, recurring events just become a bunch of separate events.

    I wish I had a better answer for you, but for now it’s the best one I have.

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1111752
    simon
    Participant

    Hi Geoff

    Thanks for taking a look

    lines 15-22 is the code snippet from these forum pages which displays the events in published date rather than event date

    add_action( ‘pre_get_posts’, ‘tribe_post_date_ordering’, 51 );

    function tribe_post_date_ordering( $query ) {
    if ( ! empty( $query->tribe_is_multi_posttype ) ) {
    remove_filter( ‘posts_fields’, array( ‘Tribe__Events__Query’, ‘multi_type_posts_fields’ ) );
    $query->set( ‘order’, ‘DESC’ );
    }

    does this code now not work?

    have removed the above lines from functions.php and all appears well

    is there a revised snippet of code that displays events on the date published as opposed to the event date. From reading the forums before and again today this is a snippet that many people use.

    Thank you for your help.

    #1112193
    Geoff B.
    Member

    Hey Simon,

    First, I am happy that removing these lines managed to get things working for you again.

    There has been a substantial number of changes lately (including in WordPress 4.5.x). So as with any other piece of code (including the ones found on this forum), sometimes they need updating in order to continue working properly.

    Recently, I have seen cases where there is a need to suppress filters for queries to work properly.
    I suspect this might be the case here.

    I can’t promise you anything, but I’d like to run the snippet by one of our DEV people to see if they can’t come up with an updated version.

    Have a great day!

    Geoff B.

    #1112437
    simon
    Participant

    Dear Geoff

    Understood, and that the wordpress changes are outside of Modern Tribe’s control

    I have not ticked issue resolved, because being unable to include events in the main blog/news feed removes a large chunk of information from my readers.

    I hope some new code can be posted as i’m far from the only person who wants to include events in their feed on the published date rather than the event date.

    Rather than as an add on piece of code, could the option not be included in the main code of the next release? Maybe as a yes/no tick box in the sidebar when creating a new event?

    Thank you for your time in locating the problem.

    #1112735
    Geoff B.
    Member

    Hey Simon,

    Alright, as promised, I went ahead and ran this past one of our top Dev.

    His best working theory is that there might be an incompatibility between that snippet AND the Recurring Event Instances​ box in Events > Settings > General

    Would you mind unchecking that box and adding the snippet again to see if that works ?

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1112833
    simon
    Participant

    Hi Geoff

    Thanks for doing that.

    Seems to work fine now, events are showing in the main feed and the main feed is displaying fine.

    Please thank him/her for taking a look and spotting the conflict. Thank you for your help in solving the problem.

    Cheers

    Simon

    #1113057
    Geoff B.
    Member

    Hey Simon,

    I’m stoked that this worked for you and I will make sure to pass the thanks along.

    You are welcome back on our support forums any time 🙂

    For now, I am going to close this thread.

    Have a great week!

    Geoff B.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Error which then stops all posts on main blog feed’ is closed to new replies.