0

I'm working on yii1 web application, i will mention my problem in simple way: i have home view page, i have created url as the following :

 <a href="<?php echo  yii::app()->createUrl('home/Test') ; ?>">link</a>

in my Home controller i have this simple code :

 public  function actionTest(){
        var_dump(Yii::app()->language) ;
         exit() ;
 }

my project supports two languages Arabic and English, when user change language between Arabic and English , every thing is working fine, layout , language and every thing except the previous code. after user change the language if he click on previous link the result will be EN whatever the language of app, if Arabic or English, after var dumping the language. and please note that every link in the app was created in the same way and it's working fine except this link . why ?

any one can advise me please ?

1 Answers1

0

For problem described above, the problem was in routing. Application in some links doesn't route to the correct controller action. The reason for that was in my project itself . because I have received the project after handing over of another developer so I wasn't know all functions and rules that he used. So the problem was all actions that were not have spcifce role to render on home page,that was making the application routed to default action so it was returned to the default status of course as .httaccess said and give 302 status code as a response . Thank you stack overflow