Yii Framework Forum: Problem with the issue table.. - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Problem with the issue table.. Change in schema.

#1 User is offline   Ash_R 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 22-January 12
  • Location:India

Posted 10 August 2012 - 07:48 AM

While creating tbl_issue i forgot to mention the create_time field. Later when i discovered my mistake I corrected the table schema. After that I inspected the whole issue related code generated by gii tool & made the necessary changes manually. (Inserted create_time wherever it was absent.) Does this at all hamper project in any kind?

Because now I have reached to page no. 131 where we list issues in the project tab itself (/trackstar/index.php?r=project/view&id=1) & all I get is a blank screen with no error or warning.
I checked with the projectcontroller code & made the necessary changes mentioned in the book in actionView method. Here $issueDataProvider is returning CActiveDataProvider object & loadmodel is also working. I am further attaching projectcontroller file with the post. Can anyone help in this matter?

Attached File(s)


0

#2 User is offline   alirz23 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,102
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 10 August 2012 - 08:24 AM

it does not really matter as long as you added that field
0

#3 User is offline   Ash_R 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 22-January 12
  • Location:India

Posted 10 August 2012 - 12:53 PM

View Postalirz23, on 10 August 2012 - 08:24 AM, said:

it does not really matter as long as you added that field


& any luck finding why the blank page is getting displayed?
0

#4 User is offline   Ash_R 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 22-January 12
  • Location:India

Posted 11 August 2012 - 01:32 AM

I have found out that whenever I click on the project id link in the project listing page that is (/trackstar/index.php?r=project) I am redirected to the blank page which is (/trackstar/index.php?r=project/view&id=1). I am unable to find out where problem lies. I am now specifically stating the code where I have made changes.

This is from projectcontroller.php

public function actionView($id)
	{
		$issueDataProvider = new CActiveDataProvider('Issue',array(
			'criteria' => array(
				'condition' => 'project_id = :projectId',
				'params' => array(
					':projectId' => $id),
				),
			'pagination' => array(
				'pageSize' => 1,
				),
			));
		$this->render('view',array(
			'model'=>$this->loadModel($id),
			'issueDataProvider' => $issueDataProvider,
		));
	}


This is from /project/view.php
widget('zii.widgets.CListView', array(
		'dataProvider' => $issueDataProvider,
		'itemView' => '/issue/_view',
	)); ?>


& this is from /issue/_view.php
[b]getAttributeLabel('name')); ?>:[/b]
	name), array('issue/view', 'id' => $data->id)); ?>
	


	[b]getAttributeLabel('description')); ?>:[/b]
	description); ?>
	


	[b]getAttributeLabel('type_id')); ?>:[/b]
	type_id); ?>
	


	[b]getAttributeLabel('status_id')); ?>:[/b]
	status_id); ?>
	

0

#5 User is offline   Ash_R 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 22-January 12
  • Location:India

Posted 11 August 2012 - 08:12 AM

Seems like my own fault while editing the /project/view file. There was a mismatch in the opening & closing php angular brackets. Regret any inconvenience caused to viewers. Thank you very much. Closing this topic as well.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users