Results 1 to 10 of 1697

Threaded View

  1. #11
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Ultimate SEO URLs 2.207!

    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
    Code:
    case 'products_id':
    	switch(true) {
    		case ($page == FILENAME_PRODUCT_REVIEWS):
    to
    Code:
    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):
    And around line 1454 change
    Code:
    // 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);
    }
    to
    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);
    }
    Last edited by lhungil; 8 Nov 2012 at 05:21 PM. Reason: clarification
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 

Similar Threads

  1. Ultimate Fade-In Slidehow Support thread
    By outeredge2 in forum All Other Contributions/Addons
    Replies: 158
    Last Post: 4 Feb 2017, 03:10 AM
  2. Ultimate Cross Sell [Support Thread]
    By ultimate_zc in forum All Other Contributions/Addons
    Replies: 239
    Last Post: 17 May 2015, 03:25 AM
  3. Ultimate Content Glider [Support Thread]
    By ultimate_zc in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 4 Sep 2012, 05:16 AM
  4. Re: Simple SEO URL [support thread]
    By creamcrackers in forum General Questions
    Replies: 2
    Last Post: 16 Aug 2009, 03:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg