Questions tagged [yii-components]

Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as "Yee" or [ji:] and it's an acronym for "Yes It Is!"

For more information on Yii components, please see the Yii documentation at:

http://www.yiiframework.com/doc/guide/1.1/en/basics.component

434 questions
0
votes
1 answer

yii2 get filepath of the uploaded local file

I want to ask about how to get the file path of the file i want to upload from file input, the code is like this field($model, 'file')->fileInput() ?> the problem is i want to automatically send the file as attachment of email without…
unknown.person
  • 135
  • 2
  • 11
0
votes
0 answers

Yii 1.1 paths not working on remote server

I'm new to Yii and i'm having troubles setting up the config on a remote server. Locally, everything works great, but on the server, using the exact same GH repo including config/main.php, none of the links seem to work. for example , in…
abreski
  • 81
  • 1
  • 6
0
votes
1 answer

php require($file) : failed to open stream

I am writing code with yii2 advance. Warning: require($file): failed to open stream: No such file or directory in C:\xampp\htdocs\Yii-Dummy\vendor\composer\autoload_real.php on line 66 Fatal error: require(): Failed opening required '$file' …
U anurag
  • 21
  • 5
0
votes
0 answers

Yii2 disable debug mode but allow sending logs via email

I have configured error logs to be sent via email by configuring a email target as shown here. Everything works fine. The thing is that if I disable debug mode (by setting the constant YII_DEBUG to false) the logs are not being sent anymore. I'd…
Fabrizio
  • 127
  • 9
0
votes
1 answer

Using $this when not in object context Yii2

i have error: Using $this when not in object context. i am using this: meysampg/intldate
user3770797
  • 374
  • 5
  • 24
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

Yii - textfield length validation working wrong when i enter spacial characters

I have a city field. which allows all characters. I have written a rule which is not allowed to enter more than 50 characters. UI level it is working perfectly. But php throws an max length error even though i have enter less than 50 characters. I…
StackCoder
  • 87
  • 1
  • 11
0
votes
1 answer

how to fix this session with my CJuiDialog box content in Yii 1.4.x?

The part I am working on is one of the modules of a web application powered by Yii 1.4.x .I have a CGridView in my index view file. Then inside it,I have custom buttons. One of the buttons is popping up a dialog box. here's the snippet for that…
sasori
  • 5,249
  • 16
  • 86
  • 138
0
votes
1 answer

Installing Yii composer asset plugin on composer

I am trying to install "fxp/composer-asset-plugin:^1.2.0" on windows 32bit composer but always failed. Here is the message Installation failed, reverting ./composer.json to its original content. [Composer\Downloader\TransportException] …
0
votes
0 answers

yii1.1 how to use event from external component?

i have event on action "onBeforeSave()" for my Model, and i use it from internal class with $this and it work correctly, may question is :how to change its behavior to use form external component? ,because i want to connect it with external project …
Omar Bahri
  • 11
  • 3
0
votes
2 answers

How to get last insert record - Yii 2

I am making application to create barcode in my application, i want to create Barang but in issue slip i want issue slip filled automatically from the last issue slip what can i do to fix it? this is my view
0
votes
1 answer

percentage format in Kartik GridView (yii2)

I am doing a project how to calculate total in yii2. When i'm building the project, i found trouble when i'm input data to be percent format. When I'm save data,in index look 2,300%, even though it is 23%. What can i do? In my view, format like…
0
votes
0 answers

want to pass parameter values in javascript in yii framework

In Yii framework using html elements for displaying contents. In that want to pass the ($i) values on the onchange method and calculation done in script. Only the first value is coming always on onchange method. Want to get current value of ($i)…
Santhosh Prabu
  • 223
  • 1
  • 9
0
votes
1 answer

DI in yii2, constructor injection

I have created an interface, I'm trying to inject it inside Controller. But I'm getting following error: Argument 1 passed to backend\controllers\AgencyController::__construct() must implement interface common\service\AppServiceInterface, string…
Vipul
  • 655
  • 2
  • 6
  • 22
0
votes
1 answer

Yii 2 Active Query joinWith issue

I have a Active Record model "Event" with a hasOne relation 'getUser'. Now, if I do : $eventModels = Event::find()->joinWith([ 'user' => function($q){ return $q; …
sudip
  • 2,781
  • 1
  • 29
  • 41