Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter scrp

    (@scrp)

    Solved. Small fix:

    Go to line 328 ( file qtranslate-slug-with-widget.php )

    Find lines:

    // & workaround
    $complete = str_replace('&','&',$home."/".$url);

    and in front of these two lines add add small fix:

    $url = ltrim(str_replace('//', '/', $url),"/");
    // & workaround
    $complete = str_replace('&','&',$home."/".$url);

    ahhh! thanks scrp!

    I follow all scrp suggestions, but doesn’t work!
    That’s my code from line 337 of qtranslate-slug-with-widget.php:

    // see if cookies are activated
    	if(!$q_config['cookie_enabled'] && !$q_config['url_info']['internal_referer'] && $urlinfo['path'] == '' && $lang == $q_config['default_language'] && $q_config['language'] != $q_config['default_language'] && (isset($q_config['hide_default_language'])?$q_config['hide_default_language']:true)) {
    		// :( now we have to make unpretty URLs
    		$url = preg_replace("#(&|\?)lang=".$match[2]."&?#i","$1",$url);
    		if(strpos($url,'?')===false) {
    			$url .= '?';
    		} else {
    			$url .= '&';
    		}
    		$url .= "lang=".$lang;
    	}
    
    	$url = ltrim(str_replace('//', '/', $url),"/");
    
    	// & workaround
    	$complete = str_replace('&','&',$home."/".$url);
    	return $complete;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: qTranslate slug with widget] v0.5 & WP3.3.2 double slash problem’ is closed to new replies.