Wiki

Articles in category "faqs", sorted by date (updated)X
Displaying 1-7 of 7 result(s).

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

Updated 7 months ago by Kartik VFAQs1 comment – viewed 4,307 times – ( +30 / -4 ) – version 2.0
With Yii Framework 2.0, one of the many changes, that Yii 1.x developers will face is removal of all client helpers and revamp of the CClientScript functionality. For example no more CHtml::ajaxLink or Html::ajaxLink. How do you cater to such requirements in Yii 2.0?

Relations: BELONGS_TO versus HAS_ONE

Updated about a year ago by JorgeeFAQs9 comments – viewed 84,566 times – ( +67 ) – version 1.1
It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

Understanding the view rendering flow

Updated about a year ago by JorgeeFAQs15 comments – viewed 143,618 times – ( +91 / -3 ) – version 1.1
There is a lot of confusion surrounding what is happening behind the scenes when you render a view.

Understanding "Safe" Validation Rules

Updated 2 years ago by GismoFAQs11 comments – viewed 78,220 times – ( +92 / -1 ) – version 1.1
A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.

Creating a parameterized LIKE query

Updated 3 years ago by AsgarothFAQs6 comments – viewed 55,030 times – ( +22 ) – version 1.1
It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column

Common Yii questions

Updated 3 years ago by migajekFAQs2 comments – viewed 34,625 times – ( +21 ) – version 1.1
Here I suggest to list the most common questions you meet in the forum or freenode irc. Feel free to edit this wiki article, and add another question with answer

"Why do I get a 403 error when trying to use Gii?"

Updated 3 years ago by Steve FriedlFAQs3 comments – viewed 44,634 times – ( +7 ) – version 1.1
After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error:
tags: Gii, config