Title: fixe for prime_term_cache()
Last modified: November 19, 2022

---

# fixe for prime_term_cache()

 *  Resolved [shawfactor](https://wordpress.org/support/users/shawfactor/)
 * (@shawfactor)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/)
 * Again if the event_cat taxonomy does not exit then this function will create 
   an error, sof best to change this function to check for an error:
 * if ( ! empty( $terms ) && !is_wp_error($terms)) {
 *  foreach ( $terms as $term ) {
    $cache[ $term->object_id ][ $term->taxonomy ][]
   = $term->term_id; }
 *  }`

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16239327)
 * Hi [@shawfactor](https://wordpress.org/support/users/shawfactor/), apologies 
   for the delay here. I talked to one of our Devs, and it seems like it is related
   to another issue we’re working on.
 * We already created an internal bug ticket for this, and I added your case. Thanks
   for all the details. I will definitely pass it along to our devs.
 * I am unable to provide an exact date or time estimate for when this bug will 
   be fixed, but you’ll be notified when there are any updates.
 * If you do have other concerns or issues you need help with, please create another
   ticket, as it helps us track different issues.
 * Again, thank you for your patience. Hang in there.
 * Best,
    Abz ________________________
 * Internal Bug Ticket Reference:
    ECP-1416
 *  [Guga Alves](https://wordpress.org/support/users/gugaalves/)
 * (@gugaalves)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16245451)
 * Hi there,
 * We’re back with good news! The internal bug ticket ECP-1416 was fixed!
 * Please update your Events Calendar plugins (free and PRO) and that issue will
   be gone forever.
 * Best Regards,
    Guga
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16288999)
 * Hi [@shawfactor](https://wordpress.org/support/users/shawfactor/),
 * Since we haven’t heard from you in a while on this topic we will assume that 
   the problem was fixed or is no longer applicable and with that I will mark this
   as resolved.
 * If that is not the case, please let us know and we will gladly remove the “Resolved”
   tag and try to help you further. Or you can create a new topic with the problem
   if you prefer.
 *  Thread Starter [shawfactor](https://wordpress.org/support/users/shawfactor/)
 * (@shawfactor)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16290876)
 * This is not fixed please reopen
 * The broader issue , which includes this, is if you deregister the event category
   taxonomy. Then there are multiple plugin errors as get_terms returns a wp_error
   which is an array
 * But the plugin just assumes that the taxonomy will exist, which creates errors
 * This could and should be easily be fixed by adding appropriate checks everywhere.
   But it has not happened
 * Please reopen
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16308293)
 * Hi [@shawfactor](https://wordpress.org/support/users/shawfactor/), thanks for
   writing back to us. I wasn’t able to replicate, but let me double check with 
   our devs. Also, will reopen the issue here.
 * I’d get back to you whenever I hear from them.
 * Hang in there,
   Abz
 *  Thread Starter [shawfactor](https://wordpress.org/support/users/shawfactor/)
 * (@shawfactor)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16308388)
 * Did you deviated the event_cat taxonomy?
 * should see the errors if you do that. They are common (not just in prime term
   cache) . Easily fixed though, just add appropriate checks in the code that the
   term(s) exist.
 * jus sick of monkey patching this with every release
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16324477)
 * Hi [@shawfactor](https://wordpress.org/support/users/shawfactor/), thanks for
   the tip. I was able to replicate the issue here.
 * I am really curious about the use case and the need to unregister it. I’d be 
   looking forward to hearing what you’re trying to accomplish here.
 * Please let me know and we’d be glad to work with you on this.
 * Best,
   Abz
 *  Thread Starter [shawfactor](https://wordpress.org/support/users/shawfactor/)
 * (@shawfactor)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16324663)
 * The use case should not be relevant given unregisteting taxonomies is standard
   WordPress functionslitu
 * however I share the post category taxonomy across multiple post types including
   events. This is advantageous as it allows me to relate cpts across different 
   post types. The means event categories are redundant so I unregister them.
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16326866)
 * Hi [@shawfactor](https://wordpress.org/support/users/shawfactor/), thanks for
   sharing more information here. That makes sense, though, and I do understand 
   what you’re trying to accomplish here.
 * I’d definitely share this with our Devs and check with them. I’d update you as
   soon as I hear from the team.
 * Hang in there,
   Abz
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16389476)
 * Hi [@shawfactor](https://wordpress.org/support/users/shawfactor/)
 * I have added your case to our internal ticket. Thanks for all the details.
 * While we don’t have an ETA at the moment, you’ll get notified once there is an
   update and fix.
 * If you do have other concerns or issues you need help with, please create another
   ticket, as it helps us track different issues.
 * Again, thank you for your patience.
 * Best,
   Darian________________________
 * Internal Bug Ticket Reference:
   BTRIA-1601
 *  [Guga Alves](https://wordpress.org/support/users/gugaalves/)
 * (@gugaalves)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16456999)
 * Hi [@shawfactor](https://wordpress.org/support/users/shawfactor/),
 * Good news, the issue was fixed on The Events Calendar version 6.0.8, ensuring
   the code will work correctly when the Events’ category taxonomy is unregistered.
 * Also, part of the problem was fixed on the PRO plugin, so please update both.
   And as the paid plugin is involved in that problem, if you still face that problem
   after updating the plugins, please get in touch with our support team on our 
   website. On this forum, we can only provide help for the free plugin.
 * Best regards
    -  This reply was modified 3 years, 3 months ago by [Guga Alves](https://wordpress.org/support/users/gugaalves/).
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16503181)
 * Hi [@shawfactor](https://wordpress.org/support/users/shawfactor/)
 * We haven’t heard from you in a while, so I’m going to mark this as resolved. 
   Feel free to start a new thread if you have any more questions.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘fixe for prime_term_cache()’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 15 replies
 * 4 participants
 * Last reply from: [Darian](https://wordpress.org/support/users/d0153/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/fixe-for-prime_term_cache/#post-16503181)
 * Status: resolved