Home>Support>So Themes Conflict with The Events Calendar

So Themes Conflict with The Events Calendar

I have some formatting problem with a calendar view generated by a shortcode in The Event Calendar Pro plugin. A legend and dropdown menu is missing and the day titles are not formatted correctly.

I have done extensive testing with the TEC developers and pinpointed the problems to be cause by the SiteOrigin Themes. I use the Vantage theme but have also tested with the SiteOrigin Corp theme and get the same errors.

I do not get the formatting errors with a standard WP theme such as Twenty Twenty Three or Twenty Twenty Four.

With the SO themes activated there is a JS console error when the page is loaded causing the errors. This is what the console error says:

Uncaught ReferenceError: tribe is not defined
http://localhost/wp-content/plugins/the-events-calendar/build//js/views/category-color-selector.js?ver=a16d149d24973283f54e:1

Is this something you are able to advise on, fix or a possible work around?

The errors are on a test site on my localhost installation.

Thank you

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 20 days, 12 hours ago Andrew Misplon
    Hi, I Work Here

    Hi, is the shortcode specific to the pro version?

  2. 20 days, 11 hours ago Jupiter1955

    Yes. Shortcodes only work with Pro version.

    Pete

  3. 19 days, 21 minutes ago Andrew Misplon
    Hi, I Work Here

    Thanks.

    Please try testing with only The Events Calendar Pro activated (all other plugins deactivated) to see if the issue persists. Here is a screenshot using Corp and the calendar without errors.

  4. 19 days, 4 minutes ago Jupiter1955

    Hi Andrew,

    I’m away at the moment but will send you some screenshots and more detailed information when I get home on Sunday.

    The errors are related specifically to the colour coding of event categories and only obvious when in month view. I will send you some screenshots showing what it should look like versus what it actually looks like and you will see there are formatting issues and a drop down menu missing. This is also when the JS console error occurs but only in SO themes.

    Thank you for your help so far.

    Regards,

    Pete

  5. 17 days, 17 hours ago Jupiter1955

    Hi Andrew,

    I said in my previous email, I would provide more information.

    Attached is a comprehensive breakdown of the problem with The Events Calendar (TEC) and the SO themes.

    As I mentioned, this is currently a localhost test site hence the screenshots. Hopefully this should provide the information you need. Specifically it relates to the Categories Colors feature of TEC. It is this feature which is not working properly using the SO themes. I have tested with all combinations of plugins on/off and I have tested with standard WP themes and SO themes (Vantage, Corp).

    Only the SO themes display the error and create the JS console error.

    I hope the screenshot will explain more.

    Thank you

    Pete

  6. 17 days, 17 hours ago Andrew Misplon
    Hi, I Work Here

    Hi Pete

    Thanks for the update.

    The forum doesn’t support attachments. Screenshots can be shared by uploading to any accessible location online and posting the link.

    Please confirm that a test has been done with only Events Calendar, Events Calendar Pro (just two plugins activated, nothing else) and Corp.

  7. 17 days, 16 hours ago Jupiter1955

    Hi Andrew,

    Yes I can confirm those tests have been done. There is a screen shot in this folder to show the results/errors. The enclosed PDF is the file I tried to send before which give a detailed breakdown of the issue.

    https://www.dropbox.com/scl/fo/v86m82urn8t3ms5iye52n/AM8uEkjgDItgLJSlcId6B6E?rlkey=c1ncj4d13mbptvf71lit7uzal&st=0zk2bs6j&dl=0
    Files for Site Origin dropbox.com

    Thank you

    Pete

  8. 17 days, 16 hours ago Andrew Misplon
    Hi, I Work Here

    Are the events created in the Classic or Block Editor?

  9. 17 days, 15 hours ago Jupiter1955

    All events are created using the classic (visual) editor not the Pagebuilder.

    Pete

  10. 17 days, 15 hours ago Andrew Misplon
    Hi, I Work Here

    Thanks for the detailed updates.

    Both GeneratePress and Hello Elementor exhibit the same behavior. Perhaps you can confirm that finding? Please try testing with any notable third-party theme that’s not core WP and not SiteOrigin. If you can confirm my finding then it places the responsibility on The Events Calendar to resolve.

    Claude’s Code’s findings below.

    SiteOrigin Corp Theme Difference:
    – Feature-rich functionality: Corp theme includes advanced features like sticky headers, smooth scrolling, mobile menus, fullscreen search, and portfolio filtering.
    – Multiple library integration: The theme integrates several specialized libraries (Isotope for portfolio layouts, FlexSlider for sliders, FitVids
    for responsive videos) to provide enhanced user experience.
    – Script execution timing: This comprehensive functionality creates a different script execution environment that affects when other scripts can access global objects.

    Twenty Twenty Four Works Because:
    – Block-focused approach: Only uses init action for basic block styles and CSS enqueuing.
    – Minimal script footprint: Doesn’t register custom JavaScript, relying on WordPress core and block editor functionality.
    – Simplified execution context: No additional libraries or complex interactions that could affect plugin script timing.

    The Technical Issue:
    SiteOrigin’s comprehensive feature set creates a different JavaScript execution environment where:
    1. WordPress loads scripts in the correct dependency order.
    2. The theme’s feature-rich scripts initialize their functionality.
    3. The Events Calendar’s category-color-selector.js tries to access tribe object.
    4. The timing of when the tribe object becomes available differs from simpler themes.

    Executive Summary: SiteOrigin Theme Compatibility Issue

    Problem:
    The Events Calendar’s category-color-selector.js fails on SiteOrigin themes with “tribe is not defined” error, breaking category color functionality.

    Root Cause:
    TEC assumes the tribe JavaScript object is immediately available when scripts execute. SiteOrigin themes create a different
    script execution environment where this assumption fails.

    Technical Fix Required:
    Add defensive JavaScript checks in TEC’s category color selector script to handle cases where the tribe object isn’t immediately available.

    Implementation:
    Modify the category color selector to either:
    – Check for tribe existence before using it
    – Implement a retry mechanism if tribe isn’t ready
    – Use proper dependency management to ensure load order

    Solution Ownership:
    TEC needs to make their JavaScript more defensive to handle different theme execution environments, rather than assuming immediate object availability.

  11. 17 days, 24 minutes ago Jupiter1955

    Hi Andrew,

    As suggested I have tested the site with other themes (not core WP and not SiteOrigin) and can confirm the problem exists so not unique to SiteOrigin.

    I will pass on my findings and your analysis to TEC to resolve.

    Thank you very much for your help

    Regards,

    Pete

  12. 16 days, 18 hours ago Andrew Misplon
    Hi, I Work Here

    Sounds like a plan! Please let us know how you get on.

    Cheers

    Andrew

Please log in to post on our forums. Signing up is free.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More