'tribe_events_linked_posts' is not defined error

Home Forums Calendar Products Community Events 'tribe_events_linked_posts' is not defined error

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1219790
    Emilirose
    Participant

    Hi, I’m getting the following console error when attempting to set recurring events:

    Uncaught ReferenceError: tribe_events_linked_posts is not defined

    I’ve attempted using a default theme and deactivating all other plugins except Events Calendar and Events Calendar Pro.

    Seems like wp_localize_script isn’t successfully running, causing an AJAX endpoint issue. I’ve loosely traced it to this file:

    the-events-calendar/src/Tribe/Linked_Posts.php

    Any ideas? Seen similar posts, but no solutions. Thanks!
    Alex

    #1220485
    Nico
    Member

    Hi there Alex,

    Thanks for getting in touch with us!

    I’ve helped a user on a similar issue a while back. In that case the caused of the issue was some coding on the ‘Venedor’ theme blocking the output of the tribe_events_linked_posts variable. Basically the variable was not present in the front-end or in the back-end. For that case I prepared a snippet (to be place in theme’s (or child theme’s) functions.php file) to force this:

    /* Tribe, temp fix for venedor theme conflict */
    function tribe_venedor_fix() { ?>

    <script type='text/javascript'>
    /* <![CDATA[ */
    var tribe_events_linked_posts = {"post_types":{"tribe_venue":"venue","tribe_organizer":"organizer"}};
    /* ]]> */
    </script>

    <?php
    }
    add_action('admin_head', 'tribe_venedor_fix');
    add_action('wp_head', 'tribe_venedor_fix');

    Can you please check if the same is happening in your case? To do this, you can disable all plugins (leave The Events Calendar and add-ons active) and switch to default theme. On this default condition, look for the code ‘ var tribe_events_linked_posts’ in the sourcecode of the event page back-end and events calendar in the front-end. Once you have verified the code is there, activate the theme re-check, then activate the rest of the plugins and re-check.

    Please let me know about it,
    Best,
    Nico

    #1232079
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘'tribe_events_linked_posts' is not defined error’ is closed to new replies.