Yii Framework Forum: Identified Issues - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Identified Issues Scratching your head about something in the book? Start here

#21 User is offline   nkd 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 28-September 12

Posted 17 November 2012 - 11:04 AM

View Postdhimes, on 17 November 2012 - 10:46 AM, said:

Did they deliver it? That sites looks like a pre-order- with delivery (hopefully) sometime in December 2012.


Yes. I received the ebook immediately. When the FINAL version is released (maybe they add an extra chapter,etc) then the people who bought the raw version will receive the final version also. That is how it works.
0

#22 User is offline   jefftulsa 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 168
  • Joined: 06-October 08
  • Location:Austin, TX

Posted 26 November 2012 - 10:00 PM

View Postdhimes, on 17 November 2012 - 10:46 AM, said:

Did they deliver it? That sites looks like a pre-order- with delivery (hopefully) sometime in December 2012.


Yes, the book has been now been published and is available in electronic and print formats.



0

#23 User is offline   betelgeuse 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 99
  • Joined: 12-January 09

Posted 29 November 2012 - 01:25 PM

I´m trying to use trackstar code from github repository, but for unknown reason "yiic migrate" does not work on my system.
Is there a place where I can download a full SQL dump ?
a code snippet says more than a thousand words
0

#24 User is offline   jefftulsa 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 168
  • Joined: 06-October 08
  • Location:Austin, TX

Posted 29 November 2012 - 06:55 PM

View Postbetelgeuse, on 29 November 2012 - 01:25 PM, said:

I´m trying to use trackstar code from github repository, but for unknown reason "yiic migrate" does not work on my system.
Is there a place where I can download a full SQL dump ?


Are you referring to the codebase accompanying the new edition (2nd edition)?

If so, then sure:

https://github.com/j.../protected/data


0

#25 User is offline   Kashif Nadeem 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 04-May 12

Posted 16 May 2013 - 07:57 AM

visit this website to learn yii http://www.yiitutorial.com/

View Postjefftulsa, on 24 September 2010 - 10:38 PM, said:

NOTE: All of the examples provided in the book were completed with Yii version 1.1.2. Many readers are using the latest stable version of Yii (currently 1.1.5) to following along with the examples in the book. There are some subtle API/method signature differences (esp in some of the Gii auto-generated code) between these two versions. If you are using any version other than 1.1.2 to following along, you may have to make some adjustments to the examples used in the book.


  • Typo/Printing: Preface, Page 1 -
    The first section title reads: "What this book cover" it should read: "What this book covers" or "What is covered in this book"
  • Typo/Printing: Preface, Page 3 -
    Under the Conventions section, it is describing how code words in the text are shown and it uses the sentence: "You can type in help to see a list of commands available to you within his shell" It should be "...this shell" (i.e. 'his' should be 'this')
  • Style Formatting: Page 20 -
    The sentence:
    "Your application has been created successfully under /Webroot/demo/"
    should still be in code format style, as it is still part of the output from running the shell command.
  • Code Fragment: Page 105 -
    The code does not explicitly include the class in which the method should reside. The function is fine, but it could be misleading. The public function
    testGetTypes()
    needs to reside in a class. The full code is
    class IssueTest extends CDbTestCase 
    { 
    	public function testGetTypes() 
    	{ 
    		$options = Issue::model()->typeOptions; $this->assertTrue(is_array($options)); 
    	} 
    } 
  • Typo/Printing: Page 131 - The following line is missing a closing > bracket to delimit the end of the php statement:

    <b><?php echo CHtml::encode($data->getAttributeLabel('status_id')); ?:</b>
    It should be:

    <b><?php echo CHtml::encode($data->getAttributeLabel('status_id')); ?>:</b>
  • Typo/Printing: Page 142 -
    The very beginning sentence on this page has several issues. The sentence as it is printed is impossible to understand. The entire sentence should read: "As these links originate from the issue details page, we can take advantage of the associated project, and alter the links to pass in the specific project id. We can then use that project id as the criteria to limit the Issues returned by the query in both the IssueController::actionIndex(), and IssueController::actionAdmin() methods."
  • Type/Printing: Page 142 -
    There is a word 1/2 way down the page that is printed as "conssue", it should be "context": "...implemented a filter to enforce a valid project context"
  • Dated Code Snippet: Page 163 -
    The auto-generated code displayed for the
    UserIdentity::authenticate()
    method is from a version of the yiic webapp command that is prior to 1.1.2. It should be:
    public function authenticate()
    	{
    		$users=array(
    			// username => password
    			'demo'=>'demo',
    			'admin'=>'admin',
    		);
    		if(!isset($users[$this->username]))
    			$this->errorCode=self::ERROR_USERNAME_INVALID;
    		else if($users[$this->username]!==$this->password)
    			$this->errorCode=self::ERROR_PASSWORD_INVALID;
    		else
    			$this->errorCode=self::ERROR_NONE;
    		return !$this->errorCode;
    	}
  • Code Typo: Page 190 -
    sql query line
    primary key (projectId,userId,role)
    should be
    primary key (project_id,user_id,role)
  • Code Typo: Page 193 -
    $command->execute
    is missing the parentheses. It should be
    $command->execute()
  • Informational Note: Page 198 -
    You might need to define the foreign key relationship on tbl_project_user_role.project_id to automatically handle deletes of rows in the project table. Otherwise, you might get a constraint violation error when the unit test ProjectTest::testDelete() is run.
    in MySQL, something like
    ON DELETE CASCADE ON UPDATE CASCADE

    NOTE: The book is attempting to stay database independent, and the low level DDL statements for tables are intended to be general (i.e. not MySQL specific). However, the code available for download does have all of the MySQL specific statements used.
  • Code Typo: Page 249 -
    In url manager configuration, site/commentFeed is printed, but it should be just comment/feed:
    'urlManager'=>array(
    			'urlFormat'=>'path',
    			'rules'=>array(
    				'commentfeed'=>array('comment/feed', 'urlSuffix'=>'.xml', 'caseSensitive'=>false),
    				'<pid:\d+>/commentfeed'=>array('comment/feed', 'urlSuffix'=>'.xml', 'caseSensitive'=>false),
    				), 
    			'showScriptName'=>false,   
     		),	
  • Typo: Page 210 -
    In the 3rd paragraph down, it refers to the view file as show.php but should be view.php.
  • Code/Yii version mismatch: Page 210 - The example 1/2 way down the page of creating the link is not consistent with the other menu items. It should be:
    $this->menu[] = array('label'=>'Add User To Project', 'url'=>array('adduser', 'id'=>$model->id)); 
    rather than using the CHtml::link method directly. (this format will still work, but is not consistent with the other menu items)
  • Code Typo: Page 91 - In the listed testCreate() function, the project column fields names need to be updated: 'createTime' should be 'create_time', 'createUser' should be 'create_user_id', 'updateTime' should be 'update_time' and 'updateUser' should be 'update_user_id'. The code still works and the test passes because the database will accept null values for these. But the names should be corrected.
  • Code comment at the bottom of page 205 incorrectly references password, when it should be "role" - code is correct, but the code comment is not accurate Should be // username and role are required
  • Typo - Page 113 First paragraph under the heading "Adding a Filter", last sentence. IssueCcontroller should read: IssueController
  • Code Typo - Page 204 - in the testUserProjectAssignment() test method, 'project1' is incorrectly referenced, as it should be 'project2'. The correct method is:
    public function testUserProjectAssignment()
    {
      //since our fixture data already has the two users assigned to project 1, we'll assign user 1 to project 2
      $this->projects('project2')->associateUserToProject($this->users('user1'));
      $this->assertTrue($this->projects('project2')->isUserInProject($this->users('user1')));
    }


0

#26 User is offline   Kashif Nadeem 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 04-May 12

Posted 16 May 2013 - 07:58 AM

visit this website to learn yii http://www.yiitutorial.com/

View Postjefftulsa, on 29 November 2012 - 06:55 PM, said:

Are you referring to the codebase accompanying the new edition (2nd edition)?

If so, then sure:

https://github.com/j.../protected/data

0

#27 User is offline   Yerok 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 23-April 14

Posted 14 May 2014 - 03:29 PM

I found this in the view file from the addUserAction:

....

<?php if(Yii::app()->user->hasFlash('success')):?>

<div class="successMessage">
<?php echo Yii::app()->user->getFlash('success'); ?>
</div>

<?phpendif; ?> <--- here is the error!

...



should be:


...

[code]<?php if(Yii::app()->user->hasFlash('success')):?>

<div class="successMessage">
<?php echo Yii::app()->user->getFlash('success'); ?>
</div>

<?php endif; ?> 

...


Don't know the exectly site, cause i use the ebook version but i would guess its round about site 200.
0

#28 User is offline   jecartas 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-November 14

Posted 28 November 2014 - 03:35 AM

I'm still fairly new to PHP and web development in general and taking it one step at a time. I love the long tutorial format of your book and I'm working through it from start to finish. After that I'll look at building my own app with Yii. (we use it in work for a frontend of a large ecommerce site and it was my first exposure to a framework, so even though I'm not on that project anymore, I'm gonna stick with yii as a "first step" to learning how frameworks work.)
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

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