Blog Blogyii Posts 2014-12-23T01:22:00+00:00 Robert Went http://blogyii.com/blog Issues Adding the Yaml Response Formatter in Chapter 4 http://blogyii.com/blog/chapter-4-yaml-formatter-not-working 2014-12-23T01:22:00+00:00 2014-12-23T01:22:00+00:00 In chapter 4 (around pages 97-99) we are shown how to create a new output formatter which will render the page in Yaml syntax, but it results in:

This webpage is not available (Chrome, with a console error of 'net::ERR_INVALID_RESPONSE')
File not found (Firefox)

]]>
Fatal Error Class Response not found When Setting Renderer to JSON http://blogyii.com/blog/class-response-not-found 2014-12-22T20:56:00+00:00 2014-12-22T20:56:00+00:00 In chapter 4 (around pages 95-96) we are shown a throwaway snippet as an example of outputting a view in JSON format which results in a fatal error:

PHP Fatal Error – yii\base\ErrorException Class 'app\controllers\Response' not found

]]>
Fatal Error Html::csrfMetaTags() When Updating the Layout File http://blogyii.com/blog/undefined-method-csrfmetatags 2014-12-16T05:38:00+00:00 2014-12-16T05:38:00+00:00 In chapter 3 (around pages 72-73) we update the layout file to use some assets to make our pages look better, but this can result in a fatal error:

PHP Fatal Error – yii\base\ErrorException Call to undefined method yii\helpers\Html::csrfMetaTags()

]]>
Unknown Method and Wrong Redirect after Creating First Form http://blogyii.com/blog/unknown-method-and-wrong-redirect 2014-11-03T02:21:00+00:00 2014-11-03T02:21:00+00:00 In chapter 2 (around pages 54-56) we should now be able to save a record using our new form but you may run into some errors such as being redirected to the wrong page after submission and an unknown method error.

]]>
Class Not Found Errors after Creating First Form http://blogyii.com/blog/class-customerrecord-not-found 2014-11-03T00:39:00+00:00 2014-11-03T00:39:00+00:00 In chapter 2 (p53) we should be able to view our newly created form, but it's likely (if you are just following along with the book) that you will be getting errors such as 'Class 'app\controllers\CustomerRecord' not found' when trying to view the page.

]]>
Returning Views from Controllers http://blogyii.com/blog/returning-views-from-controllers 2014-11-02T23:56:00+00:00 2014-11-02T23:56:00+00:00 In chapter 2 (p50) we start to build the user interface for the project, but the actions in the controller are not given correctly in the book. This is already noted on the packtpub site in the book errata but I'm adding it here for completeness.

]]>
Running yii 2 Console Commands on Windows http://blogyii.com/blog/running-yii-console-commands-on-windows 2014-11-02T22:23:00+00:00 2014-11-02T22:23:00+00:00 In chapter 2 (p42) we need to start using the yii command line in order to create our database migrations. As the book assumes that you run a unix base system, the directions given will not work on a Windows based computer.

]]>
Installing yii2 With Composer http://blogyii.com/blog/installing-yii2-with-composer 2014-11-02T19:45:00+00:00 2014-11-02T19:45:00+00:00 In chapter 2 (p34) we start to install yii2 into the application. The require line given in the book will not work with our original composer.json file which will need some edits.

]]>
Setting up Codeception to Run on Windows http://blogyii.com/blog/setting-up-codeception-on-windows 2014-11-02T18:31:00+00:00 2014-11-02T18:31:00+00:00 In chapter 2 (p21) we install codeception for application testing, but the instructions are specific to unix based systems and won't work on Windows systems (The book assumes a unix based sysetm throughout).

]]>
Web Application Development with Yii 2 and PHP Book Errors http://blogyii.com/blog/web-application-development-with-yii2-and-php-errors 2014-10-26T21:47:00+00:00 2014-10-26T21:47:00+00:00 Published through Packt publishing, 'Web Application Development with Yii 2 and PHP' is the first practical book released on the latest Yii 2 framework. Unfortunatly, it was written several months ago whilst the framework was in beta and it seems that things have changed enough that you run into issues very early on in the book. Determined to get through it, I'm planning on documenting my issues here.

]]>