TEC conflict with AIT Themes City Guide theme

Home Forums Calendar Products Events Calendar PRO TEC conflict with AIT Themes City Guide theme

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1296011
    bearlakecvb
    Participant

    Hi,
    The events calendar has stopped working with my AIT Themes City Guide theme on http://www.bearlakevacation.org/events/. It only shows some text. The problem goes away when I change to the Twenty Sixteen theme. I know that it is AIT theme that is causing the issue but they are unwilling to help and we cannot afford to change themes. Could you please see if there is anything you can do?
    Thank you,
    Bear Lake CVB

    #1296015
    bearlakecvb
    Participant

    This reply is private.

    #1296986
    Cliff
    Member

    Hi ?!

    Technically, we only support WordPress default themes like Twenty Fifteen, Twenty Sixteen, Twenty Seventeen, etc., per our Scope of Support / Terms.

    My best guess is that this theme has some default content when the Post ID is not set (same thing if Post ID = zero)

    Your theme needs to be able to support custom post types, the tribe_events custom post type in this case.

    Since the theme basically runs the site, it’s really difficult to know why it might be doing what it’s doing.

    One thing that may help: please enable WP_DEBUG and WP_DEBUG_LOG (which will create a file on your server at /wp-content/debug.log if there are any WP_DEBUG messages) and share any debug messages you see while trying to replicate this issue and doing other things on your site relevant to this ticket (such as visiting your site’s home page, events page, single-event pages, and anything else you can think to do).

    I also noticed a console error at this link of yours: https://cl.ly/0K1u2E2e2H2x
    (If needed, you may reference our KB article Using Google Chrome Developer Tools.)

    Please let me know how this goes for you.

    #1297466
    bearlakecvb
    Participant

    Hi,
    I enabled debugging and the error does looks like it is related to the custom post problem.

    Notice: Undefined property: WP_Post_Type::$post_type in /home/content/a2pnexwpnas01_data02/32/3445432/html/wp-content/themes/cityguide/ait-theme/@framework/libs/wplatte/wplatte.min.php on line 593

    How do I create a new post type? I found some plugins to create new custom post types but am not sure that is what I am supposed to do. This is our launching site for our new website so we can debug without bothering visitors.
    Thanks again for your help!
    Bear Lake CVB

    #1297620
    Cliff
    Member

    Yes, a plugin to create a new custom post type is likely what you’d need unless you want to write custom code.

    The WP_DEBUG message you shared says it’s from Line 593 in the referenced file within the “cityguide” theme. You should report it to the theme developer.

    #1300188
    bearlakecvb
    Participant

    Thanks for your reply and advice!
    Here is the code from line 593 of the Ait Theme (I have also posted it on AIT’s forum but can guarantee that they will say that they don’t support plugins):

    singularTemplate($template){$templates=array();$post=get_queried_object();$originalType=$post->post_type;$unprefixedType=WpLatteUtils::stripPrefix(‘post’,$post->post_type);$custom=get_post_meta(get_queried_object_id(),”_wp_{$unprefixedType}_template”,true);if(!$custom){$custom=get_post_meta(get_queried_object_id(),”_wp_{$originalType}_template”,true);}if($custom){$templates[]=$custom;}if(is_attachment()){$mimeType=explode(‘/’,get_post_mime_type());$templates[]=”{$mimeType[0]}-{$mimeType[1]}.php”;$templates[]=”attachment-{$mimeType[0]}-{$mimeType[1]}.php”;$templates[]=”attachment-{$mimeType[0]}.php”;$templates[]=”attachment-{$mimeType[1]}.php”;}else{$templates[]=”{$originalType}-{$post->post_name}.php”;$templates[]=”{$originalType}-{$post->ID}.php”;if($originalType!=$unprefixedType){$templates[]=”{$unprefixedType}-{$post->post_name}.php”;$templates[]=”{$unprefixedType}-{$post->ID}.php”;}}$templates[]=”{$originalType}.php”;if($originalType!=$unprefixedType){$templates[]=”{$unprefixedType}.php”;}$templates[]=”single-{$originalType}.php”;if($originalType!=$unprefixedType){$templates[]=”single-{$unprefixedType}.php”;}$templates[]=’single.php’;$templates[]=”singular.php”;$templates=array_unique($templates);return

    I have installed CPT UI Custom Post plugin. It has several fields that I don’t have any idea what text to type into the fields. Would it work to create a new Post Type if the theme doesn’t support other post types? I think that AIT doesn’t want to help because the City Guide theme has an Events Pro plugin that they want people to buy.
    Thanks for your help!
    Bear Lake CVB

    #1300291
    Cliff
    Member

    Thanks for the details, but I cannot tell which line is 593.

    Regardless, I really cannot assist in troubleshooting their theme code, especially if it might only be a temporary fix for you and you plan to continue using a theme that doesn’t follow WordPress coding best practices (as best I understand the situation).

    Please let me know if you think there’s any additional help I can offer you regarding this issue.

    #1302015
    bearlakecvb
    Participant

    Hi,
    Could you just tell me what to put in the CPT UI Custom Post plugin fields to attempt to create a custom post type that will make your Events plugin work? It has several fields that I don’t have any idea what text to type into the fields.
    Thanks, BLCVB

    #1302110
    bearlakecvb
    Participant

    Sorry,
    That entire code is all on line 593
    ((Line 593)) singularTemplate($template){$templates=array();$post=get_queried_object();$originalType=$post->post_type;$unprefixedType=WpLatteUtils::stripPrefix(‘post’,$post->post_type);$custom=get_post_meta(get_queried_object_id(),”_wp_{$unprefixedType}_template”,true);if(!$custom){$custom=get_post_meta(get_queried_object_id(),”_wp_{$originalType}_template”,true);}if($custom){$templates[]=$custom;}if(is_attachment()){$mimeType=explode(‘/’,get_post_mime_type());$templates[]=”{$mimeType[0]}-{$mimeType[1]}.php”;$templates[]=”attachment-{$mimeType[0]}-{$mimeType[1]}.php”;$templates[]=”attachment-{$mimeType[0]}.php”;$templates[]=”attachment-{$mimeType[1]}.php”;}else{$templates[]=”{$originalType}-{$post->post_name}.php”;$templates[]=”{$originalType}-{$post->ID}.php”;if($originalType!=$unprefixedType){$templates[]=”{$unprefixedType}-{$post->post_name}.php”;$templates[]=”{$unprefixedType}-{$post->ID}.php”;}}$templates[]=”{$originalType}.php”;if($originalType!=$unprefixedType){$templates[]=”{$unprefixedType}.php”;}$templates[]=”single-{$originalType}.php”;if($originalType!=$unprefixedType){$templates[]=”single-{$unprefixedType}.php”;}$templates[]=’single.php’;$templates[]=”singular.php”;$templates=array_unique($templates);return
    ((Line 594)) locate_template($templates);}}class

    #1303211
    Cliff
    Member

    Sorry, but I’m not sure how I can advise you going forward. I don’t have any experience with your theme, and I am not sure how the CPT UI Custom Post plugin plays in here.

    Maybe this information will help. Here are the custom post types:

    • Events: tribe_events
    • Organizers: tribe_venue
    • Venues: tribe_organizer

    Please let me know if you have any additional follow-up questions.

    #1321920
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘TEC conflict with AIT Themes City Guide theme’ is closed to new replies.