Description
The "SEO" cache is generated before all filters are loaded. This causes the "PCRE" and "character" filters to not run before generated URLs are placed in the cache.
Affected environments
Ultimate SEO URLs version 2.210 and 2.211.
Solution (until next version)
Change the following lines in "includes/classes/seo.url.php" from around line 74 - 93
From:
Code:
if(defined('SEO_USE_CACHE_GLOBAL') && SEO_USE_CACHE_GLOBAL == 'true'){
$this->cache_file = 'seo_urls_v2_';
$this->cache_gc(); // Cleanup Cache
// Generate enabled caches
if(SEO_USE_CACHE_PRODUCTS == 'true') $this->generate_products_cache();
if(SEO_USE_CACHE_CATEGORIES == 'true') $this->generate_categories_cache();
if(SEO_USE_CACHE_MANUFACTURERS == 'true') $this->generate_manufacturers_cache();
if(SEO_USE_CACHE_EZ_PAGES == 'true') $this->generate_ezpages_cache();
}
$this->check_canonical();
if(defined('SEO_USE_REDIRECT') && SEO_USE_REDIRECT == 'true') {
$this->check_redirect();
}
$this->filter_pcre = defined('SEO_URLS_FILTER_PCRE') ? $this->expand(SEO_URLS_FILTER_PCRE, true) : 'false';
$this->filter_char = defined('SEO_URLS_FILTER_CHARS') ? $this->expand(SEO_URLS_FILTER_PCRE) : 'false';
To:
Code:
$this->filter_pcre = defined('SEO_URLS_FILTER_PCRE') ? $this->expand(SEO_URLS_FILTER_PCRE, true) : 'false';
$this->filter_char = defined('SEO_URLS_FILTER_CHARS') ? $this->expand(SEO_URLS_FILTER_PCRE) : 'false';
if(defined('SEO_USE_CACHE_GLOBAL') && SEO_USE_CACHE_GLOBAL == 'true'){
$this->cache_file = 'seo_urls_v2_';
$this->cache_gc(); // Cleanup Cache
// Generate enabled caches
if(SEO_USE_CACHE_PRODUCTS == 'true') $this->generate_products_cache();
if(SEO_USE_CACHE_CATEGORIES == 'true') $this->generate_categories_cache();
if(SEO_USE_CACHE_MANUFACTURERS == 'true') $this->generate_manufacturers_cache();
if(SEO_USE_CACHE_EZ_PAGES == 'true') $this->generate_ezpages_cache();
}
$this->check_canonical();
if(defined('SEO_USE_REDIRECT') && SEO_USE_REDIRECT == 'true') {
$this->check_redirect();
}
Bookmarks