URLs not being generated
First do a "repair" of the 'zen_db_cache' table using a tool such as phpmyadmin. This table being corrupted is most likely the cause of URLs not being generated on your pages.
The table 'zen_db_cache' is only used internally to cache SQL lookups by Zen Cart. You can safely "Truncate" this table after doing the repair. Additionally, you can disable Zen Cart SQL caching (not query cache) by using the following in your configure.php files: define('SQL_CACHE_METHOD', 'none'); if desired. I do use Zen Cart SQL caching and have not yet encountered this error under 1.51 *knocks on wood*.
Why does this matter? "Ultimate SEO URLs" will use Zen Cart SQL caching if enabled in 'configure.php'.
Shopping Cart
I think I've found the root cause for the product page redirecting to an invalid URL. Looks like in the past the built-in php parse_url and the Zen Cart uprid did not play well together. There was still some code to handle this from pre-2.200 releases. Try the following changes and let me know if they fix the problem for you.
In seo.url.php around line 410 change
toCode:case 'products_id': switch(true) { case ($page == FILENAME_PRODUCT_REVIEWS):
And around line 1454 changeCode:case 'products_id': // Make sure if uprid is passed it is converted to the correct pid $p2[1] = zen_get_prid($p2[1]); switch(true) { case ($page == FILENAME_PRODUCT_REVIEWS):
toCode:// damn zen cart attributes use illegal url characters if ($this->is_attribute_string($this->uri)) { $parsed_url = parse_url($this->uri); $this->uri_parsed = parse_url($parsed_url['scheme']); $this->uri_parsed['query'] = preg_replace('/products_id=([0-9]+)/', 'products_id=$1:' . $parsed_url['path'], $this->uri_parsed['query']); } else { $this->uri_parsed = parse_url($this->uri); }
Code:// damn zen cart attributes use illegal url characters if ($this->is_attribute_string($this->uri)) { $parsed_url = parse_url($this->uri); if(array_key_exists('scheme', $parsed_url) && zen_not_null($parsed_url['scheme'])) { $this->uri_parsed = parse_url($parsed_url['scheme']); } else { $this->uri_parsed = $parsed_url; } $this->uri_parsed['query'] = preg_replace('/products_id=([0-9]+):[^&]*/', 'products_id=$1', $this->uri_parsed['query']); } else { $this->uri_parsed = parse_url($this->uri); }


Reply With Quote
