Yannis P.
Yannis P.

Reputation: 833

Yii renderPartial working on localserver (xampp) but not on normal host

I am using Yii's user module and I have in the profile view a renderPartial view of another controller's action

<div class="row">
<?php $model2 = new Symptomhistory; ?>
<?php $this->renderPartial('//symptomhistory\_usersHistory',array('model'=>$model2)); ?>
</div>

This code works perfectly when I run it on my local server, but when I upload it to my host I get the following error:

CException

ProfileController cannot find the requested view "//symptomhistory\usersHistory". 

I tried going to the path with "....\ect.. ect..\views\symptomhistory\usersHistory" too but it doesn't work. Is it a problem with my server? Because if it is it's a weird one since all the other renderPartials work fine, it's just this one that it can't find.

Thank you for your time.

Upvotes: 0

Views: 58

Answers (1)

chris---
chris---

Reputation: 1546

You are likely running xampp on windows right? Don't ever use backslashes as path separators, always use forward slashes.

So your command should be:

<?php $this->renderPartial('//symptomhistory/_usersHistory', array('model' => $model2)); ?>

Upvotes: 1

Related Questions