Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

About guyk

Profile Information

  • Real Name
    Guy Kastenbaum
  1. seo urls + buy_now + ksort -- resolved Hi again, I have the same bug as everybody , the "buy_now" bug. I don't know if I have the latest patched version of SEO but anyway while re-reading "parse_parameters" I found out that the order of parameters is very relevant (better to print a product url than a path url) and was sorted only by a 'krsort' . which does not make sense... So this code is to properly sort parameters by importance. (please check : 'manufacturers_id','info_id','articles_id','products_id','pID','cPath','tPath' ) fix, change : function parse_parameters($page, $params, &$separator){ $p = @explode('&', $params); krsort($p); by this code : function parse_parameters($page, $params, &$separator){ $params = str_replace('&','&', $params); //gk : pfff $p = array();//stack parameters in seokeyorder (and unknown keys queued) $tseokeyorder=array('tPath','cPath','pID','products_id','articles_id','info_id','manufacturers_id'); foreach($tseokeyorder as $seokeyorder) foreach(@explode('&', $params) as $pseo) if (preg_match("/^$seokeyorder=/",$pseo)) array_push($p,$pseo); foreach(@explode('&', $params) as $pseo){ $is_seokeyorder=false; foreach($tseokeyorder as $seokeyorder) if (preg_match("/^$seokeyorder=/",$pseo)) $is_seokeyorder=true; if (!$is_seokeyorder) array_push($p,$pseo); } by the way this is where y change & amp ; in the url (sigh..) Guy Kastenbaum --
  2. Hi all, I had a bug with an infinite loop of redirections, on this link appeared on a "buy now" button on cross selling items seo should rewrites this link to s05myprod-p-4650.html unfortunately it does not rewrites to this new form, it detects that this link should be rewritten check_seo_page() and need_redirect() says true "index.php" is in $seo_pages but href_link and parse_parameters does not consider that "index.php" is not rewritable so seo redirects to the same url a fix : it should not do_redirect() on an unchanged url to avoid looping my real fix : seo should rewrite url for index.php, I added the case ( $page == FILENAME_DEFAULT && !$this->is_attribute_string($p2[1]) ): in seo.class.php around line 790 function parse_parameters($page, $params, &$separator){ [...] switch ($p2[0]){ case 'products_id': switch(true){ case ( $page == FILENAME_PRODUCT_INFO && !$this->is_attribute_string($p2[1]) ): case ( $page == FILENAME_DEFAULT && !$this->is_attribute_string($p2[1]) ): //GK may2008 the same bug should appear for FILENAME_POPUP_IMAGE Thanks for this contribution :-) GuyK