Questions tagged [yii2-advanced-app]

Yii 2 Advanced Application Template is a skeleton Yii 2 application best for developing complex Web applications with multiple tiers. The template includes three tiers: front end, back end, and console, each of which is a separate Yii application. The template is designed to work in a team development environment. It supports deploying the application in different environments.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
16 views

login issue in yii2 advance version - forntend login

when i have try to login from frontend so after submit the login form the page go back to the index page. SiteController.php public function actionLogin() { if (!Yii::$app->user->isGuest)...
Dharm Solanki's user avatar
0 votes
0 answers
40 views

Yii2: Create a custom column to filter records based on a condition

I have a table of sales lines which include promo, service, and item columns among others. These 3 columns contain IDs from other tables. A sales line can only have a value for one of these fields e.g....
luigi lopez's user avatar
0 votes
1 answer
38 views

Yii::$app->session->set() is not working in Yii2

The values are successfully registered in the database, but the flash values are not displayed on the redirect new page I also saved the log, but nothing is set in the session main.php 'components' =&...
Mehdi Hashemi's user avatar
0 votes
0 answers
23 views

How to add admin user after installing yii advanced first time?

New to yii. I just installed yii-2 advanced it is all setup but I don't see any admin user's details? When I checked database table, I find no users at all. Wasn't this suppose to create admin user by ...
Raymond's user avatar
  • 1,162
0 votes
0 answers
10 views

Yii2 open typeahead dropdown when text is automatically inserted into a textbox

I am using a typeahead in one of my forms. I type a serial number and a typeahead dropdown appears and then I select the correct number from it. Form <div class="meter-to-sim-mapping-form"...
Moeez's user avatar
  • 536
0 votes
1 answer
32 views

Unable to get data from api response using ajax call in Yii2

I am sending are request from an API to get some data. $.ajax({ url: '$urlmsim', method: 'POST', headers: headers, data:...
Moeez's user avatar
  • 536
0 votes
0 answers
20 views

Yii2 migrating with multiple databases

I am creating databases from my form. At the end of the creation I want to run the migrates that I have inside the migrations folder. I tried using several methods, shell_exec, ConsoleCommandRunner ...
Claudia Ibarra's user avatar
0 votes
1 answer
35 views

Email can't be sent from yii2 application on cpanel

I have developed a yii2 application and deployed it in a CPanel on Bluehost. I created an email account in the CPanel to send emails using swiftmailer. When I use the email in localhost (my pc) it is ...
Zainab's user avatar
  • 1
0 votes
0 answers
29 views

How to create a row span in yii2 gridview?

My gridview wants to implement rowsapn to two columns, Offical MOU sites and Official MOU sites > 2700. I want some logic to bring value to this two columns. What is the best way to implement this ...
Faizan's user avatar
  • 90
0 votes
2 answers
58 views

Yii2 unable to view column chart using highcharts

I am trying to plot a chart via highchart in yii2. I have already installed it and set it. Below is my code in my index.php view <script src="https://code.highcharts.com/highcharts.js">...
Moeez's user avatar
  • 536
0 votes
1 answer
74 views

Yii2 unable to install hightcharts widget as composer is giving errors

I am trying to install Yii2 Hightcharts Widget via composer. But it's not allowing me to install and giving some errors. Install Command composer require miloschuman/yii2-highcharts-widget Problem E:\...
Moeez's user avatar
  • 536
1 vote
0 answers
45 views

How can I export a PDF file using MYExportMenu in Yii?

I'm trying to export a PDF file using MYExportMenu widget in Yii framework. This is currently what it looks like : //...other MYExportMenu configuration MYExportMenu::FORMAT_PDF => [ ...
Abdelilah Dahdahi's user avatar
0 votes
1 answer
219 views

Issue with Yii2 Queue - InvalidJobException: Failed to instantiate component or class

I am working on a project using Yii2 and trying to implement a task queue using the Yii2 Queue extension with the database driver. After installing and setting it up, I am facing a problem I can't ...
The SAndy's user avatar
0 votes
0 answers
15 views

Yii2 advance for Multi version app shared session

I have 2 versions of the app. v1 and v2. Currently, both apps use Yii2 basic template and different servers. Now we need to merge all apps. So users can move from v1 to v2 or vice versa seamlessly. ...
Donny Akhmad Septa Utama's user avatar
0 votes
2 answers
72 views

Insert data into specific column of table in Yii2

How to insert input data into specific column. For example I have column clinicName and clinicArea in Table clinic. I make a form for insert and save clinicName only (model2). When I try register the ...
Meow's user avatar
  • 33
0 votes
2 answers
23 views

how to use number_format on yii2, Im a newbie,

on index.php ` <?= GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], ...
farhan ayubi's user avatar
0 votes
1 answer
24 views

Yii2 Validation not working on the when condition

Scenario $scenarios['sell'] = [ 'deposit']; Rule ['deposit', 'required', 'on' => 'sell', 'message' => 'Deposit cannot be blank', 'when' => function () { ...
Shamnad's user avatar
  • 35
0 votes
1 answer
34 views

Yii2 Gridview Sort By Caculated Field

I have customer table and need to show the customer's balance that need to calculate from another table. Now on Customer Model I have added Getter function public function getBalance(){ $...
Chhorn Soro's user avatar
  • 3,071
0 votes
0 answers
25 views

Kartik Gridview Export to PDF not updating PDF Configuration settings

I am seeing an issue with how the Kartik Gridview and Exporter works. I can create and render the grid with no issue, can enable and disable the various export formats. But when I try to set PDf ...
user1441213's user avatar
0 votes
1 answer
125 views

Telegram Webhook returns a 302 error in yii2

I can't figure out how to configure the address in yii2 so that telegram doesn't return a 302 error in the root and /frontend in the .htaccess files these settings Options +FollowSymLinks IndexIgnore ...
Максим Егоров's user avatar
1 vote
1 answer
54 views

How can I save the data that is loaded in a gridview in the database?

I have a code in yii2 advanced that loads a list of students according to the course they belong to, it is to take attendance, the data of each student is loaded correctly in the gridview but when ...
Saúl Velecela's user avatar
0 votes
0 answers
27 views

putting files on server using yii2-gftp

I am using the gftp extension on my yii2 project, in my config file I have 'ftp' => [ 'class' => '\gftp\FtpComponent', 'driverOptions' => [ 'class' => 'gftp\drivers\SftpDriver', 'user' =&...
Helen Postle's user avatar
0 votes
0 answers
88 views

wbraganca/yii2-dynamic form datepicker not working

I am using wbraganca dynamic form in Yii2 advanced-app ,My DatePicker is not working after I click add button the first datepicker is clickable but the second datepicker field no date show up. How ...
Dulf's user avatar
  • 13
0 votes
0 answers
36 views

An Error occurred while handling another error in yii2

when I add behaviors I get An Error occurred while handling another error yii\base\UnknownClassException: Unable to find 'app\controllers\SiteController' in file: C:\OpenServer\domains\ceotour\backend/...
Javohir Ergashev's user avatar
1 vote
1 answer
143 views

Yii2 using authclient for facebook and google login not working

Sorry people, I'm really new in Yii2 framework!! I'm trying to do a web login using "yiisoft/yii2-authclient" at version 2.2.14 After client autentication, nothing happen and the new user is ...
Mauro S. Sequenzia's user avatar
0 votes
1 answer
287 views

Yii2 Attempt to read property "id" on int

I tried implementing Transactions using example below on Yii2 inside my Model class. <php $transaction = $connection->beginTransaction(); try { $user_model=$connection->...
Quentinb's user avatar
  • 476
0 votes
1 answer
88 views

View not Found – yii\base\ViewNotFoundException Cpanel Yii2

I have create a yii2 project which runs perfectly on my Windows localhost machine. But Since I have deployed application successfully on Cpanel Linux Shared Hosting, I am unable open the pages on my ...
Beelal's user avatar
  • 1
0 votes
1 answer
29 views

Yii2 DropdownList Value not being sent to Model

I have a dropdownList which looks like this: <select id="singleregisterform-titleid" name="SingleRegisterForm[titleId]"> <option value="1">Dr</option> &...
Quentinb's user avatar
  • 476
1 vote
1 answer
155 views

Yii2 Rules Validate When Condition

I have form fields generated by Yii2 using echo $form->field. When I select 'Pay Now' and submit, the validation should NOT validate the payment person's last name. However, when I select 'Pay ...
Quentinb's user avatar
  • 476
0 votes
0 answers
145 views

How to remove specific line breaks in PDF

I have PDF file with unquoted currencies and this file is a little broken. I am using PHP and Smalot\PdfParser\Parser. When I parse the file and get the full text, one line is displayed incorrectly ...
Carlo Pokker's user avatar
0 votes
1 answer
424 views

Missing ext-dom when running composer update in Yii2 project

I am getting this error every time I run composer update in my Yii2 framework project: Problem 1 - phpunit/phpunit[9.5.0, ..., 9.5.28] require ext-dom * -> it is missing from your ...
ciahroyalty's user avatar
0 votes
0 answers
63 views

Yii2 pagination

is it possible to use post id in pagination instead of page number example instead of : &page=2 it will be &id=63 Pagination code is : function actionIndex() { $query = Article::find()-&...
Bynd's user avatar
  • 675
0 votes
1 answer
116 views

Yii2 PostgreSql how to add default value from another column on addColumn in migration

I have PostgreSQL DB table with 4 columns ex. col1, col2, col3, col4. Col3 is unique indexed. I want to add new column with notNull and default value of col3 as after that I want to make newly created ...
Karlis Pokkers's user avatar
1 vote
3 answers
309 views

How to ignore where clause if condition is empty in Yii2

I know this same question is already asked before. But I have tried the solution but it's not working for me. $comp_ids = AllowArea::find() ->select(['comp_code']) ->where(['user_id' =&...
Moeez's user avatar
  • 536
1 vote
2 answers
135 views

Yii2 getting error Area must be string when selecting a text from dropdown

I am working on yii2. I have a below field in my _form $form->field($model, 'area_name') ->widget(Select2::className(),[ 'data' => \common\models\AllowArea::toAreaArrayList(), ...
Moeez's user avatar
  • 536
0 votes
0 answers
32 views

Yii2 generate CRUD with MSSQL

I want to know how we can generate CRUD operations of MSSQL with Gii. I have already added the MSSQL credentials in my config section. But when I try to generate it via Gii I cant see any tables of ...
Moeez's user avatar
  • 536
1 vote
0 answers
179 views

Exclude items from navbar toggle

How do i exclude ['label' => 'Home', 'url' => ['/site/index']], from collapse on bootstrap 4? use yii\bootstrap4\NavBar; use yii\bootstrap4\Nav; NavBar::begin([ 'brandLabel' => 'NavBar ...
Shaho's user avatar
  • 187
0 votes
0 answers
98 views

How use function in where condition

I want build a query that I need to use function in my where condition. In this query I want to make a list of those who are late in their payments. here is my code: $now =Yii::$app->jdate->date(...
Mohammad Aghayari's user avatar
-1 votes
1 answer
75 views

Sort gridview with data from 1:n relationship from junction table

i have a 3 table product_tbl // hold product data specification_tbl // hold all type of specification that my product can have product_specification_tbl // (kind of ...
Narek Abedian's user avatar
1 vote
2 answers
101 views

Yii2 search array and find the matching value

I have created an array $myArray = [ 'JAN' => '01', 'jan' => '01', 'FEB' => '02', 'feb' => '02', 'MAR' => '03', 'mar' => '03', ...
Moeez's user avatar
  • 536
-1 votes
1 answer
124 views

Yii2 lajax/yii2-translate-manager or lajax/yii2-language-picker PHP8.1 throws errors

I am using lajax/yii2-translate-manager and lajax/yii2-language-picker After server upgrade to PHP version 8.1 switching to another language throws an error An Error occurred while handling another ...
Karlis Pokkers's user avatar
0 votes
1 answer
58 views

Pagination dropdown not showing

I've installed Kartik Library in my Yii advanced project, and added the toolbar, but it hides the pagination. How can I make it appear? Correct me if I am doing wrong... <?= GridView::widget([ '...
Rupendra Kumar's user avatar
0 votes
1 answer
69 views

How to display two date on kartik detail view like 01/01/2022-31/12/2022

I have two column in one table expiry_date and new_expiry_date. Now what i want i want to display date on detail view something like below, Here I have two model class one model class is for ...
UNKNOWN's user avatar
  • 11
0 votes
2 answers
199 views

Yii2 Mssql Unknown PDO::PARAM_* constant given

I am working on Yii2. I have added an MSSQL Database. For preventing from SQL injections please see my below is my query $area_ids = []; $s = AllowArea::find()->where(['user_id' => Yii::$app-...
Moeez's user avatar
  • 536
0 votes
1 answer
675 views

Yii2 unable to get response from the API using postman

I am working on yii2 and created some REST API's. One is for authenticating the user and the second one is for getting the data by using the auth keyfrom the 1st API. I am usingxampp` on the local ...
Moeez's user avatar
  • 536
0 votes
0 answers
121 views

When I am trying to display data using stored procedure I get error: Incorrect number of arguments for PROCEDURE db.transaction; expected 11, got 13

Below is the code of my stored procedure. When I run it it throws the following error: SQLSTATE[42000]: Syntax error or access violation: 1318 Incorrect number of arguments for PROCEDURE db....
UNKNOWN's user avatar
  • 11
0 votes
1 answer
90 views

Yii2 controller not saving all data

I am working on yii2. I have a form in which there are 3 dropdowns. use kartik\select2\Select2; <div class="allow-area-form"> <?php $form = ActiveForm::begin(); ?> <?= $form-...
Moeez's user avatar
  • 536
1 vote
1 answer
229 views

Triggering submit event after change when uploading image on Yii2 framework

I am trying to save an image type file by using jquery to trigger the submit. I encountered an issue where it triggers even when the change event is not done. View create.php: <?php \yii\bootstrap4\...
yai's user avatar
  • 72
0 votes
1 answer
40 views

Yii2 using ArrayHelper with another database

I am working on Yii2. I am using mysql and mssql databases. The mssql is on a remote site and I am able to access it. Now I am trying to add a dropdown list. Controller public function actionCreate() {...
Moeez's user avatar
  • 536
3 votes
0 answers
445 views

SES Failed to authenticate on SMTP server with username

in my composer.json i have this "symfony/amazon-mailer": "^6.0", "yiisoft/yii2-symfonymailer": "^2.0", in my main.php i have this 'mailer' => [ ...
Shaho's user avatar
  • 187

1
2 3 4 5
45