Home › Forums › Calendar Products › Community Events › 'tribe_events_linked_posts' is not defined error
- This topic has 3 replies, 4 voices, and was last updated 7 years, 2 months ago by Emilirose.
-
AuthorPosts
-
January 17, 2017 at 12:23 pm #1219790EmiliroseParticipant
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!
AlexJanuary 18, 2017 at 1:38 pm #1220485NicoMemberHi 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,
NicoFebruary 9, 2017 at 8:35 am #1232079Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘'tribe_events_linked_posts' is not defined error’ is closed to new replies.