Mysterious Url Problem

hi, I’ve got a very rare problem concerning URL. If you go to this website http://ho33.com and look on the footer you will see the “Terms”, “Privacy” and “Links”. For example, the URL of the “Terms” is http://ho33.com/en/terms(This is correct). However, if you go to http://ho33.com/en/blog and look on the “terms” URL again you will see that the URL has mysteriously changed to http://ho33.com/blog/site/terms/lang/en. The word “blog” is appearing in this URL, which is wrong. (Please note that “blog” is the name of a module that I have) What should I do?

I checked your site, it’s may be issue with jquery.

paste this code into your config directory in main.php, between components primary array -




'clientScript'=>array(

  'class'=>'CClientScript',

   'scriptMap'=>array(

	'jquery.ba-bbq.js'=>false,

   ),

 'coreScriptPosition'=>CClientScript::POS_BEGIN,

),



after check your blog link.

thank you for your help, but this hasn’t solved the problem

have you added above scripts in your config file???

yes, I did so, but it doesn’t work:


	'components'=>array(

		'clientScript'=>array(

		  'class'=>'CClientScript',

		   'scriptMap'=>array(

		        'jquery.ba-bbq.js'=>false,

		   ),

		 'coreScriptPosition'=>CClientScript::POS_BEGIN,

		),

I saw your code once again, most of your code doesn’t match with another page source code. first i suggest you, because of your footer links are same for all pages so put this into your view main.php (views/layouts/main.php).

these footer links are already in the views/layouts/main.php

but i saw and match some pages like tutorials, blog, contact. these all are having something mismatch. also your blog page only having jquery.ba-bbq.js file. please put clientScript array (Already give you) in your component array and also show me views file main.php from layouts directory. if your having clientScript array in component array, then it should be cache issue because jquery.ba-bbq.js file still in blog page.

please update and show me the blog links.

I put the clientScript only on localhost. I’ve just uploaded it to the server. How can I clear cache?

The links are these:


<?php echo CHtml::link('Terms', array('site/terms', 'lang' => $lang)); ?>

<?php echo CHtml::link('Privacy', array('site/privacy', 'lang' => $lang)); ?>

<?php echo CHtml::link('Links', array('site/links', 'lang' => $lang)); ?>

your not having any issue related jquery. but i’m sure your blog view having some mismatch. because it’s different from other views. also when i’m changing the languages, blog still showing in default EN language. Can you show me your full page source code of main.php(layouts), blog view and also any others like tutorial page source code?

What is about the languages of the blog, I’ve only implemented it in English

I am attaching you the files you require

hey man use this below code instead of your old footer code.


<?php echo CHtml::link('Terms', array('site/terms', 'lang' => Yii::app()->getLanguage())); ?>

<?php echo CHtml::link('Privacy', array('site/privacy', 'lang' => Yii::app()->getLanguage())); ?>

<?php echo CHtml::link('Links', array('site/links', 'lang' => Yii::app()->getLanguage())); ?>

this hasn’t worked

hi everybody!

I’ve just solved the problem myself!! I just needed to add a slash in front of the controller name. Like this:


<?php echo CHtml::link('Terms', array('/site/terms', 'lang' => $lang)); ?>

<?php echo CHtml::link('Privacy', array('/site/privacy', 'lang' => $lang)); ?>

<?php echo CHtml::link('Links', array('/site/links', 'lang' => $lang)); ?>

:) :D ::)