Questions tagged [yii1.x]

Old version of PHP framework Yii.

Yii Framework

Yii is a generic Web programming framework, meaning that it can be used for developing all kinds of Web applications using PHP. Because of its component-based architecture and sophisticated caching support, it is especially suitable for developing large-scale applications such as portals, forums, content management systems (CMS), e-commerce projects, and so on.

Yii 1 is the first version of the Yii framework. Yii 1.0 was released in December 2008 and it is no longer supported. Yii 1.1 was released in January 2010 and reached the end of life in November 2015. Since then it only receives security bugfixes and fixes that improve compatibility with new versions of PHP. In October 2014 the successor of Yii 1.1 was released: .

Official documentation can be found in the Definitive Guide to Yii 1.1. Further important resources:

270 questions
0
votes
1 answer

Yii1 - Declaration of model::validate() should be compatible with CModel::validate($attributes = NULL, $clearErrors = true)

I am getting this error when I try to run the index method inside the controller: Declaration of OneTokenAuth::validate() should be compatible with CModel::validate($attributes = NULL, $clearErrors = true) My controller:
Sasha
  • 8,521
  • 23
  • 91
  • 174
0
votes
1 answer

Yii1 accessRules

I need to allow a certain kind of user access to a controller's actions, while denying other users who have the same roles plus an additional role. For example, user x has the role 'building', and user y has the role 'building' and 'admin'. I want…
hutch90
  • 341
  • 3
  • 15
0
votes
1 answer

Yii 1 query return incorrect data

I have query: $listings = Yii::app()->db->createCommand('SELECT * FROM listings')->where(['or like','c_sales_stage',['Needs Refresh','Active']])->andWhere('c_listing_featured_c = 1')->queryAll(); Returns all the listings even where…
user3844579
  • 485
  • 1
  • 8
  • 29
0
votes
1 answer

Yii 1.1: Forms --> define correct minimum rule

since hours i am trying to find out what the problem could be here: --> I have a Yii Form looks like this: beginWidget('CActiveForm', array( 'id'=>'withdrawal-request-form', …
WEBGONDEL UG
  • 147
  • 1
  • 2
  • 12
0
votes
1 answer

CKEditor Loading Content in Dialog window

I am working on a file manager plugin for CKEditor & Yii 1. I have created a button on the editor toolbar and on clicking that button i am opening a dialog window. For loading the content / html of the window i am making an ajax call to my…
Muhammad Omer Aslam
  • 22,976
  • 9
  • 42
  • 68
0
votes
1 answer

Yii 1.1 Message files generation Unicode

I have a web app based in yii 1.1 and we are making it multilingual. I generate the translation files through the command: php yiic message messages/config.php The files are being generate with all Yii::t() defined, the problem is in the content,…
0
votes
0 answers

CGridView in yii 1.1 sorts date as number rather than date

Well Im new to YII 1.1 framework and I have to debug a code.Here the widget CGridView sorts date as number rather than date. That is 01-02-2017,10-01-2017,15-01-2017,21-12-2016. It should sort with month and year that is…
0
votes
1 answer

Showing and hiding widget in ascending order

I have following code in my view file: widget('application.components.FileUploadWidget',array( 'model'=>$model, 'attribute'=>'f__10_'.$x, …
phpdev
  • 511
  • 4
  • 22
0
votes
1 answer

Check if records are more than one for a record in joined table

I have two tables: business and sms_content_business And this is the schema for both tables: For business Table: For sms_content_business Table: Now what I want to achieve is to get all the businesses for which is_topbrand = 1 there is at least…
Saani
  • 791
  • 7
  • 28
  • 68
0
votes
1 answer

PHP two modules exclude eachother

On my site I have panel control and some content. Site is build on Yii framework. panel menu: breadcrumbs=array( 'Muzyka media'=>array('admin'), 'Lista', ); $this->renderPartial('_submenu',array('model'=>$model)); ?> and…
Qriyo
  • 43
  • 6
0
votes
1 answer

Yii 1.1 UrlManager method parseUrl runs twice

In config.php I have 'urlManager'=>array( 'class'=>'UrlManager', ... In UrlManager.php I have class UrlManager extends CUrlManager { public function parseUrl($request) { ... …
venoel
  • 463
  • 3
  • 13
0
votes
1 answer

how to get all the languages array in yii1?

the directory structure is like this modules/ /module1 /messages/ /en /admin.php /profile.php /ru/ …
sasori
  • 5,249
  • 16
  • 86
  • 138
0
votes
1 answer

how to accept corect date format in yii 1

I have following code in my view file: widget('zii.widgets.jui.CJuiDatePicker', array( 'model' => $model, 'attribute' => 'time', 'language' => 'ru', 'htmlOptions' => array( …
phpdev
  • 511
  • 4
  • 22
0
votes
1 answer

How to impliment email template to email in yii 1?

I have following code in my contoller called MessageController: $letter = $this->renderPartial('temp'); $message=$letter; $mail = new YiiMailer('contact',array('message'=>$message,'name'=>'Message','description' =>…
phpdev
  • 511
  • 4
  • 22
0
votes
1 answer

How to get arrays from another php class

I have following code in my class called lang.php: These array is not defined inside any function and class. I need to get these array values in other controller class. (For…
phpdev
  • 511
  • 4
  • 22