Questions tagged [yii2]
Yii 2 is the latest version of the Yii framework - a high-performance, component-based PHP framework
yii2
15,545
questions
0
votes
1
answer
20
views
Yii2 How to keep modified data when rules fail
I am going mad trying to figure this out. I have a form which loads data from a current user in my database. When I click on submit, the rules are fired and I get my error message, however the new ...
0
votes
0
answers
15
views
How identity stores AR custom fields
Record who jumped from the background to the foreground and what operations they did.
type here
'user' =\> \[
'identityClass' =\> 'app\\models\\Merchant',
'enableAutoLogin' =\> true,
\],
Yii::...
0
votes
0
answers
18
views
Yii2 azure hosting
I have created a web app on a Linux profile.
After that, I followed these steps:
cd path/to/your/yii2-app
git init
git add .
git commit -m "Initial commit"
git remote add azure <your-...
0
votes
1
answer
28
views
Yii2 passing of Data from model to view throws undefined array key exception even after render
In Yii Frontend, I have learned that to pass the data from Model to view, you have to use the siteController or a dedicated Controller then make sure they are included in the data array passed to the ...
0
votes
0
answers
24
views
I want to create a group on Zoho Cliq, assign member to the group and able to fetch the chat
I want to create a group on Zoho Cliq, assign member to the group and able to fetch the chat.
I'm getting error invalid url
I've tried this=
Request method: POST
API endpoint.: https://cliq.zoho.com/...
0
votes
1
answer
33
views
How to get the sql of CreateCommand in Connection
Yii::$app->db->createCommand($sql)->queryAll();
How to get $sql
Need to record all sql in createCommand
It has been used in many places. How to record which sql is executed for each request ...
0
votes
0
answers
25
views
Yii2 form submitting twice when using imageuploadify
I have a Yii2 form that uses imageuploadify to load images. The form is being submitted twice, resulting in multiple entries on the create action.
My controller function is checking for Ajax but the ...
0
votes
0
answers
44
views
How to dynamically change which site is servered
I have a scenario where I need to basically deliver a different website based on the time of year. In Dec they want a Christmas site delivered, other wise the regular one. To the visitor they shouldn'...
0
votes
1
answer
28
views
How to manage routes in Yii2 when 'urlManager' array does not exist?
I have inherited a Yii2 application to maintain, and although I use plain PHP and Laravel, I do not know enough about this framework. Therefore, I feel very insecure and confused at times.
For example,...
0
votes
0
answers
31
views
how to send multiple files and some data in a single response
I'm writing online-library using Vue and Yii2. I need to somehow send books info and related pics.
I tried to send at least pictures but in postman i see that response contains only 1 picture
public ...
0
votes
0
answers
16
views
not able to add or update fileds which is added manually in mailwizz tables
i am getting strange issue, i am using mailwizz extension, i added 4 fields in customer company table, those fields are state,way,mc and subscribers, this is my controller where i am storing data
$...
0
votes
1
answer
39
views
How to add a new attribute to thousands of Mongodb documents in yii2 performant?
I have php + yii2 + mongodb running on linux in virtualbox (10 cores, 12 GB RAM). yii2-mongodb is installed. I have a csv file that contains 100.000+ records in 2 columns: custom identifier (not _id), ...
1
vote
2
answers
43
views
Creating default object from empty value in YII2
Code that causes problem
foreach ($items as $itemData) {
$item = new PurchaseItem();
$item->internal_product_id = (int)$itemData['internal_product_id'];
$item->quantity = (float)$...
0
votes
1
answer
45
views
Why is the column name's alias in lowercase and not the expected one?
On the staging, I am working with PHP 7 on the Yii2 framework, where I have a connection with MySQL 8 database.
On the production, the code is run on PHP 5.6 with the same Yii2 framework, where I have ...
0
votes
1
answer
40
views
Unable to view a pop-up modal properly in yii2
I am trying to show a pop-up modal on a button click. But when I click on the button it shows for a small time and then vanishes leaving the screen to black.
Below is my code
<?PHP
use kartik\...