• Our site uses CoAuthors plus, which utilizes the terms system, plus we have hundreds, if not thousands of tags, categories, and other custom taxonomies. Our terms table is VERY large, and that makes an unqualified call to get_terms() highly problematic. When this piece of code is in play, our site simply will not run, due to constant memory overages (i.e. PHP Fatal error: Allowed memory size of ######## bytes exhausted).

    I believe I made a post about this a long time ago, but I am here to bring it up again because it continues to be something we have to manually comment out after every update. With this code removed, everything works great, and we love the plugin, in general. I think we are just getting lucky that removing this doesn’t break our setup.

    Could y’all please have the developers take a look at replacing this code with something that only grabs the terms that are being used for podcasting? I would be happy to help test it, or help think of a solution, but I can’t find any public repo for the plugin. Thanks for your consideration. Here’s the problematic code:

    if( version_compare($GLOBALS['wp_version'], 4.5, '>=' ) )
    {
    	if( !empty($GeneralSettings['taxonomy_podcasting']) )  // Taxonomy Podcasting
    	{
    		$PowerPressTaxonomies = get_option('powerpress_taxonomy_podcasting');
    		if( !empty($PowerPressTaxonomies) )
    		{
    			$terms = get_terms();
    			$ttid_found = 0;
    			$TaxonomySettings = false;
    
    			foreach( $terms as $index=> $termObj )
    			{
    				// Skip the default taxonomies
    				if( $termObj->taxonomy == 'category' || $termObj->taxonomy == 'link_category' || $termObj->taxonomy == 'post_tag' || $termObj->taxonomy == 'nav_menu' )
    					continue;
    
    				if( !empty($PowerPressTaxonomies[ $termObj->term_taxonomy_id ]) )
    				{
    					$ttid_found = $termObj->term_taxonomy_id;
    
    					$TaxonomySettings = get_option('powerpress_taxonomy_'.$ttid_found);
    					// Found it???
    					if( !empty($TaxonomySettings['redirect']) )
    					{
    						$Redirects['redirect0'] = $TaxonomySettings['redirect'];
    						$Redirects['redirect1'] = '';
    						$Redirects['redirect2'] = '';
    						$Redirects['redirect3'] = '';
    						break;
    					}
    				}
    			}
    		}
    	}
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shawn

    (@shawnogordo)

    This has been passed on to the Blubrry dev team. Will post another message here when I get something back from them.

    Plugin Support Shawn

    (@shawnogordo)

    An update for PowerPress was released today that should address this issue.

    Thread Starter justinmaurerdotdev

    (@360zen)

    OMG thank you!!! I got so excited when I saw that changelog item, and realized that I hadn’t checked back here for updates. This is a huge win for our update process. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error on a site with many Terms’ is closed to new replies.